> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useautumn.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Feature

> Retrieves a single feature by its ID.

Use this when you need to fetch the details of a specific feature.

export const DynamicResponseExample = ({json, statusCode = "200"}) => {
  const toCamelCase = str => {
    return str.replace(/_([a-z])/g, (_, c) => c.toUpperCase());
  };
  const convertKeysToCamelCase = obj => {
    if (Array.isArray(obj)) {
      return obj.map(item => convertKeysToCamelCase(item));
    }
    if (obj !== null && typeof obj === "object") {
      return Object.keys(obj).reduce((acc, key) => {
        const camelKey = toCamelCase(key);
        acc[camelKey] = convertKeysToCamelCase(obj[key]);
        return acc;
      }, {});
    }
    return obj;
  };
  const [isTypeScript, setIsTypeScript] = useState(() => {
    if (typeof window !== "undefined") {
      try {
        const lang = localStorage.getItem("code");
        return JSON.parse(lang) === "typescript";
      } catch {
        return true;
      }
    }
    return true;
  });
  useEffect(() => {
    const onMintlifyStorage = event => {
      if (event.detail?.key === "code") {
        try {
          const value = JSON.parse(event.detail.value);
          setIsTypeScript(value === "typescript");
        } catch {}
      }
    };
    const pollInterval = setInterval(() => {
      try {
        const lang = localStorage.getItem("code");
        const value = JSON.parse(lang);
        setIsTypeScript(value === "typescript");
      } catch {}
    }, 300);
    document.addEventListener("mintlify-localstorage", onMintlifyStorage);
    return () => {
      document.removeEventListener("mintlify-localstorage", onMintlifyStorage);
      clearInterval(pollInterval);
    };
  }, []);
  const camelCaseJson = useMemo(() => convertKeysToCamelCase(json), [json]);
  const snakeCaseString = JSON.stringify(json, null, 2);
  const camelCaseString = JSON.stringify(camelCaseJson, null, 2);
  return <ResponseExample>
			{isTypeScript ? <CodeBlock language="json" filename={statusCode}>
					{camelCaseString}
				</CodeBlock> : <CodeBlock language="json" filename={statusCode}>
					{snakeCaseString}
				</CodeBlock>}
		</ResponseExample>;
};

export const DynamicResponseField = ({children, name, ...props}) => {
  const convertToCamelCase = str => {
    if (typeof str !== "string") return str;
    return str.replace(/[_-](\w)/g, (_, c) => c.toUpperCase());
  };
  const [lang, setLang] = useState(() => {
    if (typeof window !== "undefined") {
      const stored = localStorage.getItem("code");
      return stored || '"typescript"';
    }
    return '"typescript"';
  });
  useEffect(() => {
    const onMintlifyStorage = event => {
      const key = event.detail?.key;
      if (key === "code") {
        setLang(event.detail.value);
      }
    };
    const pollInterval = setInterval(() => {
      const current = localStorage.getItem("code");
      if (current && current !== lang) {
        setLang(current);
      }
    }, 500);
    document.addEventListener("mintlify-localstorage", onMintlifyStorage);
    return () => {
      document.removeEventListener("mintlify-localstorage", onMintlifyStorage);
      clearInterval(pollInterval);
    };
  }, [lang]);
  const resolvedName = useMemo(() => {
    try {
      const value = JSON.parse(lang);
      const useCamelCase = value === "typescript";
      return useCamelCase ? convertToCamelCase(name) : name;
    } catch {
      return name;
    }
  }, [name, lang]);
  return <ResponseField name={resolvedName} {...props}>
			{children}
		</ResponseField>;
};

export const DynamicParamField = ({children, body, path, ...props}) => {
  const convertToCamelCase = str => {
    if (typeof str !== "string") return str;
    return str.replace(/[_-](\w)/g, (_, c) => c.toUpperCase());
  };
  const [lang, setLang] = useState(() => {
    if (typeof window !== "undefined") {
      const stored = localStorage.getItem("code");
      return stored || '"typescript"';
    }
    return '"typescript"';
  });
  useEffect(() => {
    const onMintlifyStorage = event => {
      const key = event.detail?.key;
      if (key === "code") {
        setLang(event.detail.value);
      }
    };
    const pollInterval = setInterval(() => {
      const current = localStorage.getItem("code");
      if (current && current !== lang) {
        setLang(current);
      }
    }, 500);
    document.addEventListener("mintlify-localstorage", onMintlifyStorage);
    return () => {
      document.removeEventListener("mintlify-localstorage", onMintlifyStorage);
      clearInterval(pollInterval);
    };
  }, [lang]);
  const resolvedBody = useMemo(() => {
    try {
      const value = JSON.parse(lang);
      const useCamelCase = value === "typescript";
      return useCamelCase ? convertToCamelCase(body) : body;
    } catch {
      return body;
    }
  }, [body, lang]);
  const resolvedPath = useMemo(() => {
    try {
      const value = JSON.parse(lang);
      const useCamelCase = value === "typescript";
      return useCamelCase ? convertToCamelCase(path) : path;
    } catch {
      return path;
    }
  }, [path, lang]);
  return <ParamField body={resolvedBody} path={resolvedPath} {...props}>
			{children}
		</ParamField>;
};

### Body Parameters

<DynamicParamField body="feature_id" type="string" required>
  The ID of the feature.
</DynamicParamField>

### Response

<DynamicResponseField name="id" type="string">
  The unique identifier for this feature, used in /check and /track calls.
</DynamicResponseField>

<DynamicResponseField name="name" type="string">
  Human-readable name displayed in the dashboard and billing UI.
</DynamicResponseField>

<DynamicResponseField name="type" type="'boolean' | 'metered' | 'credit_system' | 'ai_credit_system'">
  Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit\_system' for unified credit pools, 'ai\_credit\_system' for model-based token pricing.
</DynamicResponseField>

<DynamicResponseField name="consumable" type="boolean">
  For metered features: true if usage resets periodically (API calls, credits), false if allocated persistently (seats, storage).
</DynamicResponseField>

<DynamicResponseField name="event_names" type="string[]">
  Event names that trigger this feature's balance. Allows multiple features to respond to a single event.
</DynamicResponseField>

<DynamicResponseField name="credit_schema" type="object[]">
  For credit\_system features: maps metered features to their credit costs.

  <Expandable title="properties">
    <DynamicResponseField name="metered_feature_id" type="string">
      ID of the metered feature that draws from this credit system.
    </DynamicResponseField>

    <DynamicResponseField name="credit_cost" type="number">
      Credits consumed per unit of the metered feature.
    </DynamicResponseField>
  </Expandable>
</DynamicResponseField>

<DynamicResponseField name="model_markups.{key}" type="object | null">
  Per-model markup overrides for AI credit systems.

  <Expandable title="properties">
    <DynamicResponseField name="markup" type="number" />

    <DynamicResponseField name="input_cost" type="number" />

    <DynamicResponseField name="output_cost" type="number" />
  </Expandable>
</DynamicResponseField>

<DynamicResponseField name="default_markup" type="number">
  Default percentage markup for AI credit systems. Use -100 to make usage free.
</DynamicResponseField>

<DynamicResponseField name="provider_markups.{key}" type="object | null">
  Per-provider default markup percentages for AI credit systems.

  <Expandable title="properties">
    <DynamicResponseField name="markup" type="number" />
  </Expandable>
</DynamicResponseField>

<DynamicResponseField name="display" type="object">
  Display names for the feature in billing UI and customer-facing components.

  <Expandable title="properties">
    <DynamicResponseField name="singular" type="string | null">
      Singular form for UI display (e.g., 'API call', 'seat').
    </DynamicResponseField>

    <DynamicResponseField name="plural" type="string | null">
      Plural form for UI display (e.g., 'API calls', 'seats').
    </DynamicResponseField>
  </Expandable>
</DynamicResponseField>

<DynamicResponseField name="archived" type="boolean">
  Whether the feature is archived and hidden from the dashboard.
</DynamicResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "api-calls",
    "name": "API Calls",
    "type": "metered",
    "consumable": true,
    "archived": false,
    "display": {
      "singular": "API call",
      "plural": "API calls"
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi POST /v1/features.get
openapi: 3.1.0
info:
  title: Autumn API
  version: 2.3.0
servers:
  - url: https://api.useautumn.com
    description: Production server
security:
  - secretKey: []
paths:
  /v1/features.get:
    post:
      tags:
        - features
      description: |-
        Retrieves a single feature by its ID.

        Use this when you need to fetch the details of a specific feature.
      operationId: getFeature
      parameters:
        - name: x-api-version
          in: header
          required: true
          schema:
            type: string
            default: 2.3.0
          x-speakeasy-globals-hidden: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                feature_id:
                  type: string
                  description: The ID of the feature.
              required:
                - feature_id
              title: GetFeatureParams
              examples:
                - feature_id: api-calls
            example:
              feature_id: api-calls
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: >-
                      The unique identifier for this feature, used in /check and
                      /track calls.
                  name:
                    type: string
                    description: >-
                      Human-readable name displayed in the dashboard and billing
                      UI.
                  type:
                    enum:
                      - boolean
                      - metered
                      - credit_system
                      - ai_credit_system
                    type: string
                    description: >-
                      Feature type: 'boolean' for on/off access, 'metered' for
                      usage-tracked features, 'credit_system' for unified credit
                      pools, 'ai_credit_system' for model-based token pricing.
                  consumable:
                    type: boolean
                    description: >-
                      For metered features: true if usage resets periodically
                      (API calls, credits), false if allocated persistently
                      (seats, storage).
                  event_names:
                    type: array
                    items:
                      type: string
                    description: >-
                      Event names that trigger this feature's balance. Allows
                      multiple features to respond to a single event.
                  credit_schema:
                    type: array
                    items:
                      type: object
                      properties:
                        metered_feature_id:
                          type: string
                          description: >-
                            ID of the metered feature that draws from this
                            credit system.
                        credit_cost:
                          type: number
                          description: Credits consumed per unit of the metered feature.
                      required:
                        - metered_feature_id
                        - credit_cost
                    description: >-
                      For credit_system features: maps metered features to their
                      credit costs.
                  model_markups:
                    anyOf:
                      - type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type: object
                          properties:
                            markup:
                              type: number
                              minimum: -100
                            input_cost:
                              type: number
                              minimum: 0
                            output_cost:
                              type: number
                              minimum: 0
                      - type: 'null'
                    description: Per-model markup overrides for AI credit systems.
                  default_markup:
                    type: number
                    minimum: -100
                    description: >-
                      Default percentage markup for AI credit systems. Use -100
                      to make usage free.
                  provider_markups:
                    anyOf:
                      - type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type: object
                          properties:
                            markup:
                              type: number
                              minimum: -100
                          required:
                            - markup
                      - type: 'null'
                    description: >-
                      Per-provider default markup percentages for AI credit
                      systems.
                  display:
                    type: object
                    properties:
                      singular:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: >-
                          Singular form for UI display (e.g., 'API call',
                          'seat').
                      plural:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: >-
                          Plural form for UI display (e.g., 'API calls',
                          'seats').
                    description: >-
                      Display names for the feature in billing UI and
                      customer-facing components.
                  archived:
                    type: boolean
                    description: >-
                      Whether the feature is archived and hidden from the
                      dashboard.
                required:
                  - id
                  - name
                  - type
                  - consumable
                  - archived
                examples:
                  - id: api-calls
                    name: API Calls
                    type: metered
                    consumable: true
                    archived: false
                    display:
                      singular: API call
                      plural: API calls
              example:
                id: api-calls
                name: API Calls
                type: metered
                consumable: true
                archived: false
                display:
                  singular: API call
                  plural: API calls
      x-codeSamples:
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { Autumn } from 'autumn-js'

            const autumn = new Autumn()

            const result = await autumn.features.get({
              featureId: "api-calls",
            });
        - lang: python
          label: Python (SDK)
          source: |-
            from autumn_sdk import Autumn

            autumn = Autumn(secret_key="am_sk_test...")

            res = autumn.features.get(feature_id="api-calls")
components:
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      bearerFormat: JWT

````