Pricing

Get Model Pricing

Returns pricing configuration for a specific model.

Note: Prices are in USD cents per token.

Supported Providers

openai, anthropic, google, azure-openai, bedrock, mistral-ai, cohere, together-ai, groq, deepseek, fireworks-ai, perplexity-ai, anyscale, deepinfra, cerebras, x-ai, and 25+ more.

Example Response Fields

FieldDescriptionUnit
request_token.priceInput token costcents/token
response_token.priceOutput token costcents/token
cache_write_input_token.priceCache write costcents/token
cache_read_input_token.priceCache read costcents/token
additional_units.*Provider-specific featurescents/unit
get/model-configs/pricing/{provider}/{model}

Path parameters

providerstring required
Example:openai

Provider identifier. Use lowercase with hyphens.

Examples: openai, anthropic, google, azure-openai, bedrock, x-ai

modelstring required
Example:gpt-4

Model identifier. Use the exact model name as specified by the provider.

Examples: gpt-4, gpt-4o, claude-3-5-sonnet-20241022, gemini-2.0-flash-001

Response

Pricing configuration for the specified model

currency'USD'

Currency code (always USD)

Example response

{
  "pay_as_you_go": {
    "image": {
      "standard": {
        "1024x1024": {
          "price": 4
        },
        "1024x1792": {
          "price": 8
        }
      },
      "hd": {
        "1024x1024": {
          "price": 8
        },
        "1024x1792": {
          "price": 12
        }
      }
    }
  },
  "batch_config": {
    "request_token": {
      "price": 0.000125
    },
    "response_token": {
      "price": 0.0005
    }
  }
}

Changes

Changed in 3 of the 6 revisions of this API.624

  • 1c757e79a119613See the full diff
    • removed the required property batch_config/cache_read_input_token/base from the response with the 200 status

      response-required-property-removed

    • removed the required property batch_config/cache_read_input_token/multiplier from the response with the 200 status

      response-required-property-removed

    • removed the required property batch_config/request_token/base from the response with the 200 status

      response-required-property-removed

    • removed the required property batch_config/request_token/multiplier from the response with the 200 status

      response-required-property-removed

    • removed the required property batch_config/response_token/base from the response with the 200 status

      response-required-property-removed

    • removed the required property batch_config/response_token/multiplier from the response with the 200 status

      response-required-property-removed

    • removed the optional property batch_config/cache_write_input_token from the response with the 200 status

      response-optional-property-removed

    • added the optional property batch_config/cache_read_input_token/price to the response with the 200 status

      response-optional-property-added

    • added the optional property batch_config/request_token/price to the response with the 200 status

      response-optional-property-added

    • added the optional property batch_config/response_token/price to the response with the 200 status

      response-optional-property-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the optional property batch_config to the response with the 200 status

      response-optional-property-added

    • removed the optional property batch_config from the response with the 200 status

      response-optional-property-removed

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog