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

# Feature catalog

> Query public capabilities, quality tiers, limits, audience defaults, media budgets, and live credit pricing without authentication.

The `featureCatalog` GraphQL query returns a single public snapshot of APOB's
user-facing generation features, purchasable offerings, surface availability,
validation limits, audience defaults, media reference budgets, display groups,
and live credit pricing.

Use `featureCatalog` to discover supported quality/resolution combinations,
validation bounds, and current configured rates at runtime instead of
hardcoding pricing tables or tier matrices in your client.

## Authentication and access

`featureCatalog` is **public and requires no authentication**. Guests,
authenticated APOB API-key clients, and Firebase-authenticated sessions receive
the exact same non-user-specific snapshot.

> [!NOTE]
>
> If you include an `Authorization: Bearer apob_...` header on a request to
> `POST /graphql`, the API-key filter authenticates that key first and fails
> closed with HTTP `401` if the key is invalid or revoked. Invalid API keys
> never fall back to anonymous or Firebase access. Omit the `Authorization`
> header when making unauthenticated catalog requests.

## Query the catalog

### cURL (no authentication required)

```bash cURL theme={"system"}
curl --request POST "$APOB_GRAPHQL_URL" \
  --header 'Content-Type: application/json' \
  --data '{
    "operationName": "FeatureCatalog",
    "query": "query FeatureCatalog { featureCatalog { schemaVersion version creditScale groups { id groupType iconUrl displayOrder features } features { feature mediaCategory groupId surfaces preserveOptions billingRule { billingUnit quantityRounding scalesWithSampleCount } liveRules { minDurationMs minCandidateDurationMs maxDurationMs durationStepMs voteDurationOptionsMs sceneMinDurationMs sceneMaxDurationMs minCustomVoteRawCredit } surfaceSpecs { surface operationName canonicalWorkflowId supportedTiers supportedWireQualities supportedResolutions audienceDefaults { audience tier resolution wireQuality wireResolution durationMs numSamples aspectRatio { width height } enableBgm preserveOptions resolutionDefaultsByTier { tier resolution wireResolution } } limits { minDurationMs maxDurationMs durationStepMs allowedDurationsMs minSourceVideoDurationMs maxSourceVideoDurationMs minSourceAudioDurationMs maxSourceAudioDurationMs minSamples maxSamples allowedSamples maxPromptLength maxVoiceScriptLength minVoiceSpeed maxVoiceSpeed defaultVoiceSpeed longSidePixels minShortSidePixels dimensionAlignment aspectRatios { width height } maxReferences maxUploads } } } offerings { offeringKey feature tier resolution resolutionToken priceSet surfaces wireMapping { apiQuality apiResolution chatQuality chatResolution legacyReadbackQuality } limits { minDurationMs maxDurationMs durationStepMs allowedDurationsMs shotLimitsByDuration { durationMs maxShots } minSourceVideoDurationMs maxSourceVideoDurationMs minSourceAudioDurationMs maxSourceAudioDurationMs minSamples maxSamples allowedSamples longSidePixels minShortSidePixels dimensionAlignment aspectRatios { width height } } mediaBudget { maxElements maxImageReferences maxVideoReferences maxAudioReferences maxVideoElementDurationMs maxAudioElementDurationMs minAudioElementDurationMs totalVideoProcessingBudgetMs baseVideoReservedDurationMs baseVideoReservedSlots reservedCoreImageSlots portraitConsumesImageBudget firstFrameConsumesImageBudget lastFrameConsumesImageBudget voiceModelConsumesAudioBudget additionalImagesShareElementBudget supportsImageElements supportsVideoElements supportsAudioElements } surfaceOverrides { surface limits { minDurationMs maxDurationMs allowedDurationsMs } mediaBudget { maxElements maxImageReferences maxVideoReferences maxAudioReferences } capabilities { supportsVoiceModel supportsLastFrame supportsMultiShot supportsCameraMovement supportsInputPrompt nativeAudioAlwaysOn supportsBgmAddOn supportsSourceAspectRatio } } capabilities { supportsVoiceModel supportsLastFrame supportsMultiShot supportsCameraMovement supportsInputPrompt nativeAudioAlwaysOn supportsBgmAddOn supportsSourceAspectRatio } pricing { subtypeCode subtypeName taskType isBorrowedPriceEntry isActive isPriced cost unitAmount displayUnit displayUnitAmount isDisplayable displayOrder isUltra groupId creditCategories missingRowPolicy billingRule { billingUnit quantityRounding scalesWithSampleCount } addOns { feature subtypeCode subtypeName isActive cost unitAmount } } } } }",
    "variables": {}
  }'
```

### JavaScript

```javascript JavaScript theme={"system"}
async function fetchFeatureCatalog(url) {
  const response = await fetch(url, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      operationName: "FeatureCatalogSummary",
      query: `
        query FeatureCatalogSummary {
          featureCatalog {
            schemaVersion
            version
            creditScale
            features {
              feature
              mediaCategory
              surfaces
            }
            offerings {
              offeringKey
              feature
              tier
              resolution
              wireMapping { apiQuality apiResolution }
              pricing { isActive isPriced cost unitAmount creditCategories }
            }
          }
        }
      `,
      variables: {},
    }),
  });
  const result = await response.json();
  if (!response.ok || result.errors?.length) {
    throw new Error(`featureCatalog request failed (${response.status})`);
  }
  return result.data.featureCatalog;
}
```

## Response structure

### `FeatureCatalog`

| Field | Type | Meaning |
| - | - | - |
| `schemaVersion` | `Int!` | Monotonic structural contract version (currently `1`). Incremented only for breaking structural changes. |
| `version` | `String!` | Deterministic content hash (`fc-<16-hex>`) covering compiled feature/offering specs, live active pricing rows, and raw display-group metadata. Changes whenever capabilities or live prices change, and stays stable across icon URL re-signing. |
| `creditScale` | `Int!` | Divisor converting raw credit integers to displayed credits (`100` raw units = `1` displayed credit). |
| `groups` | `[FeatureCatalogGroup!]!` | Ordered display groups linking related public features. |
| `features` | `[FeatureCatalogFeature!]!` | User-facing features with per-surface specifications, audience defaults, and billing rules. |
| `offerings` | `[FeatureCatalogOffering!]!` | Individual feature × tier × resolution offerings with limits, media budgets, capabilities, wire mappings, and live pricing. |

### `FeatureCatalogGroup`

| Field | Type | Meaning |
| - | - | - |
| `id` | `String!` | Stable group identifier. |
| `groupType` | `String!` | Group category (`"image"`, `"video"`, or `"audio"`). |
| `iconUrl` | `String` | Downloadable group icon URL when configured. May be a temporary presigned URL (valid for \~24 hours); **do not persist presigned URLs across sessions**. |
| `displayOrder` | `Int` | Relative sort order (lower appears first). |
| `features` | `[String!]!` | Public `feature` codes assigned to this group. |

### `FeatureCatalogFeature`

| Field | Type | Meaning |
| - | - | - |
| `feature` | `String!` | Canonical feature code (for example `"TEXT_TO_IMAGE"`, `"IMAGE_EDIT"`, `"IMAGE_TO_VIDEO"`, `"EXTEND_VIDEO"`, `"LIVE_VIDEO"`, `"RE_VIDEO_REFERENCE_IMAGE"`, `"IDEA_TEXT"`, `"TEXT_OPTIMIZATION"`). |
| `mediaCategory` | `String!` | Coarse media category: `"IMAGE"`, `"VIDEO"`, `"AUDIO"`, or `"OTHER"` (user-facing text and script utilities such as `"IDEA_TEXT"` and `"TEXT_OPTIMIZATION"`). |
| `groupId` | `String` | Primary `FeatureCatalogGroup.id` linked to this feature, if configured. |
| `surfaces` | `[String!]!` | Surfaces where this feature is exposed: subset of `["WEB", "API", "MCP", "CHAT"]`. |
| `surfaceSpecs` | `[FeatureCatalogSurfaceSpec!]!` | Per-surface entrypoint name, supported tiers/resolutions, audience defaults (`"GUEST"` / `"FREE"` / `"PAID"`, or `[]` when a surface has no configured defaults), and base surface limits. |
| `billingRule` | `FeatureCatalogBillingRule!` | Default server billing unit, quantity rounding mode (`"CEIL_UNIT"` or `"FLAT"`), and sample-scaling flag. |
| `preserveOptions` | `[String!]!` | Allowed preserve option strings when supported (for example `["outfit", "pose", "background"]` on `CLONE_IMAGE`). |
| `liveRules` | `FeatureCatalogLiveRules` | Channel duration, scene duration, and voting bounds; populated on `LIVE_VIDEO` and `null` for other features. |

### `FeatureCatalogOffering`

| Field | Type | Meaning |
| - | - | - |
| `offeringKey` | `String!` | Canonical key in `FEATURE/TIER/RESOLUTION/PRICE_SET` format (for example `"IMAGE_TO_VIDEO/ULTRAS_FAST/FHD/CURRENT"`, or `"IDEA_TEXT/-/-/CURRENT"` for untiered flat-per-task utilities). |
| `feature` | `String!` | Parent feature code. |
| `tier` | `String` | Quality tier code (`"FAST"`, `"BEST"`, `"ULTRA_FAST"`, `"ULTRA"`, `"ULTRAS_FAST"`, `"ULTRAS"`), or `null` for untiered features. |
| `resolution` | `String` | Canonical resolution code (`"SD"`, `"HD"`, `"FHD"`, `"QHD"`, `"UHD_4K"`, `"IMAGE_1K"`, `"IMAGE_2K"`, `"IMAGE_4K"`, `"P480"`, `"P768"`, `"SOURCE"`), or `null`. |
| `resolutionToken` | `String` | Short display token (for example `"SD"`, `"FHD"`, `"4K"`, `"2K"`, `"768P"`). |
| `priceSet` | `String!` | `"CURRENT"` for active current pricing entries or `"LEGACY"` for backwards-compatible request aliases. |
| `surfaces` | `[String!]!` | Surfaces exposing this exact offering. |
| `wireMapping` | `FeatureCatalogWireMapping!` | Exact wire strings (`apiQuality`, `apiResolution`, `chatQuality`, `chatResolution`, `legacyReadbackQuality`) accepted by mutations and readback fields. |
| `limits` | `FeatureCatalogLimits` | Offering-specific duration, sample count, source-media duration, prompt/script, pixel geometry, and aspect-ratio bounds. Overrides `surfaceSpecs[].limits`. |
| `mediaBudget` | `FeatureCatalogMediaBudget` | Shared element count, image/video/audio reference slot caps, duration budgets, reserved core slots, and supported element types. |
| `surfaceOverrides` | `[FeatureCatalogOfferingSurfaceOverride!]!` | Explicit per-surface `limits`, `mediaBudget`, or `capabilities` overrides when an offering intentionally differs on a specific surface (empty when uniform across surfaces). |
| `capabilities` | `FeatureCatalogCapabilities!` | Feature flags such as `supportsVoiceModel`, `supportsLastFrame`, `supportsMultiShot`, `supportsCameraMovement`, `supportsInputPrompt`, `nativeAudioAlwaysOn`, `supportsBgmAddOn`, and `supportsSourceAspectRatio`. Resolve effective per-surface capabilities as `surfaceOverrides[surface]?.capabilities ?? capabilities`. |
| `pricing` | `FeatureCatalogOfferingPricing!` | Live pricing row joined with server missing-row policy, restricted credit categories, effective billing rule, and eligible add-ons. |

For image generation, editing, and cloning, the catalog advertises Fast at 2K,
Ultra at 2K and 4K, and UltraS at 1K, 2K, and 4K.

### `FeatureCatalogOfferingPricing`

| Field | Type | Meaning |
| - | - | - |
| `subtypeCode` | `Int!` | Stable numeric pricing subtype identifier. |
| `subtypeName` | `String!` | Wire subtype name as a plain string. |
| `taskType` | `String!` | Task type name as a plain string. |
| `isBorrowedPriceEntry` | `Boolean!` | `true` when the offering shares another pricing row rather than owning a dedicated subtype code. |
| `isActive` | `Boolean!` | `true` when an active pricing row is configured. |
| `isPriced` | `Boolean!` | `true` when the offering satisfies `missingRowPolicy` and can currently be billed and submitted. |
| `cost` | `Int` | Live raw cost in hundredths of a credit (`creditScale = 100`), or `null` if inactive/absent. |
| `unitAmount` | `Int` | Live billing unit divisor (for example `1` image or `1000` milliseconds), or `null`. |
| `displayUnit` | `String` | Display unit label (`"times"`, `"images"`, or `"milliseconds"`), or `null`. |
| `displayUnitAmount` | `Int` | Display unit divisor (falls back to `unitAmount` when unset). |
| `isDisplayable` | `Boolean!` | Whether the underlying pricing row is flagged for allowance display. |
| `displayOrder` | `Int` | Relative display order for allowance listings. |
| `isUltra` | `Boolean!` | Whether the pricing row is marked as an Ultra-tier offering. |
| `groupId` | `String` | Pricing row's `FeatureCatalogGroup.id`, if set. |
| `creditCategories` | `[String!]!` | Dedicated credit pools eligible before common credits (for example `["ultraS"]`; `[]` means common credits only). |
| `missingRowPolicy` | `String!` | Server policy when the primary row is missing or invalid: `"CHARGE_ZERO"`, `"FAIL_PER_IMAGE_UNIT_ONE"`, `"FAIL_ULTRAS_FAST"`, or `"FAIL_POSITIVE_RATE"`. Lip Sync Ultra S requires an active row with a positive cost and billing unit. |
| `billingRule` | `FeatureCatalogBillingRule!` | Effective server billing math for this offering (may differ from feature default on `"LEGACY"` entries). |
| `addOns` | `[FeatureCatalogPriceAddOn!]!` | Conditional add-ons eligible for this offering (such as `BGM_VIDEO` on eligible video offerings) with their live active status and rate. |

For Lip Sync, clients that submit an explicit `outputQuality` can read the
quality and resolution pairs from offerings with the desired surface. The Web
surface summary keeps `supportedResolutions` at `FHD` so earlier clients can
continue submitting Lip Sync by resolution alone.
The `ULTRA/FHD` Web offering overrides the minimum source-audio duration to
1,000 ms. The base offering retains the 1 ms minimum used by API and MCP clients.

## Forward-compatible string codes

Every code field in `featureCatalog` is typed as a plain GraphQL `String`
rather than a GraphQL enum. APOB can add new features, quality tiers,
resolutions, surfaces, billing units, or credit categories without causing
enum deserialization failures in existing clients.

> [!TIP]
>
> Treat all `String` code fields as open sets: ignore or fall back cleanly on
> unrecognized values instead of throwing on unknown codes, check
> `surfaceSpec.audienceDefaults` before selecting an audience entry (some
> surfaces return `[]`), and resolve effective offering settings by layering
> `surfaceSpec.limits` -> `offering.limits` -> matching
> `offering.surfaceOverrides[]` (`limits`, `mediaBudget`, and `capabilities`).

## Live pricing and caching

* **Live configured rates:** `pricing` reflects the backend's current active
  configuration at query time. There is no fixed price promised by examples in
  this documentation; always read `pricing.cost`, `pricing.unitAmount`,
  `pricing.isPriced`, `pricing.creditCategories`, and `creditScale` from
  `featureCatalog` before estimating credits. See
  [Credits and billing](https://developers.apob.ai/credits-and-billing.md) for balance eligibility and
  post-task reconciliation.
* **Short-lived server cache:** The server caches the snapshot in memory for up
  to 60 seconds and invalidates immediately on local pricing updates. Compare
  `version` to detect changes when refreshing in your client.
* **Lightweight drift detection header (`X-Feature-Catalog-Version`):** HTTP
  responses from `POST /graphql` (including unrelated queries, mutations, and
  GraphQL error responses) include an `X-Feature-Catalog-Version` response
  header carrying the server's current `fc-<16-hex>` catalog `version`.
  Cross-origin responses for allowed web origins expose this header through
  `Access-Control-Expose-Headers: X-Feature-Catalog-Version` so browser clients
  can read it from `fetch()` and trigger an immediate `featureCatalog` refresh
  whenever the header differs from their cached `version`. Header attachment is
  fail-open: if the catalog version is transiently unavailable, the GraphQL
  response succeeds normally without the header.
* **Presigned icon URLs:** `groups[].iconUrl` may carry a temporary signature
  that expires after \~24 hours. Refresh from `featureCatalog` rather than
  persisting signed icon URLs in long-term storage.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.