API7 Docs

List Model Prices

GET /model_pricing

GET /model_pricing

Interactive request editor loads with JavaScript.

Authorization

BearerAdminToken
AuthorizationBearer <token>

Organization-scoped admin token. Read operations require a valid token, and write operations require a token with write permission.

In: header

Response Body

application/json

application/json

curl -X GET "$AISIX_CP/model_pricing" \  -H "Authorization: Bearer $AISIX_TOKEN"

OK

{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
      "provider": "string",
      "model_name": "string",
      "prompt_cents_per_1m": 0,
      "completion_cents_per_1m": 0,
      "cache_read_cents_per_1m": 0,
      "cache_write_cents_per_1m": 0,
      "reasoning_cents_per_1m": 0,
      "duration_cents_per_1m_seconds": 0,
      "source": "user",
      "effective_from": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ]
}
Complete operation details and schema variants

GET /model_pricing

List Model Prices

List the prices this organization is billed at: one row per (provider, model), with the organization's own override taking the place of the catalog default where one exists. source says which you are looking at — user for an override, models.dev or snapshot for the catalog, depending on how this deployment obtains it.

Prices are integer cents per 1,000,000 tokens. cache_read, cache_write and reasoning may be 0, meaning "no distinct rate": those token classes then bill at the prompt or completion rate. duration_cents_per_1m_seconds prices models billed by audio length instead of tokens, and is operator-set only — the catalog carries no audio prices to fall back to.

Parameters

Responses

  • 200: OK

  • data (array, required):

  • data[].id (string, required): Price row id. Pass it to the delete endpoint to drop an override; catalog rows cannot be deleted.

  • data[].org_id (string, optional): Organization that owns this override. Omitted on catalog rows, which belong to no organization.

  • data[].provider (string, required):

  • data[].model_name (string, required):

  • data[].prompt_cents_per_1m (integer, required): Input token rate.

  • data[].completion_cents_per_1m (integer, required): Output token rate.

  • data[].cache_read_cents_per_1m (integer, required): Rate for tokens read from an upstream prompt cache. 0 means no distinct rate — those tokens bill at the prompt rate.

  • data[].cache_write_cents_per_1m (integer, required): Rate for tokens written into an upstream prompt cache. 0 means no distinct rate.

  • data[].reasoning_cents_per_1m (integer, required): Rate for reasoning tokens. 0 means no distinct rate — they bill at the completion rate.

  • data[].duration_cents_per_1m_seconds (integer, required): Cents per 1,000,000 seconds, for models billed by audio length rather than tokens. 0 means not billed by duration. Operator-set only: the catalog carries no audio prices.

  • data[].source (string, required): Where the price came from. user is this organization's own override. The other two are catalog defaults and are mutually exclusive per deployment: models.dev when the control plane syncs the catalog online, snapshot when it seeds the catalog from a local file instead — which is what an air-gapped or offline installation does.

  • data[].effective_from (string, required):

  • data[].updated_at (string, required):

  • 401: Missing or invalid bearer.

  • error (object, required): Error details.

  • error.code (string, required): Machine-readable identifier. Examples: UNAUTHENTICATED, INVALID_REQUEST, MASTER_KEY_UNSET, INTERNAL.

  • error.message (string, required): Human-readable explanation; safe to surface to operators.

cURL

curl -X GET '$AISIX_CP/model_pricing' -H 'Authorization: Bearer $AISIX_TOKEN'