README.md

March 3, 2026 · View on GitHub

Portkey Models

Accurate pricing for 2,000+ models across 40+ providers. Free API, no auth required.

Explorer · Rankings · API · Contributing · Discord

License Discord Twitter


This repository contains comprehensive pricing and configuration data for LLMs. It powers cost attribution for 200+ enterprises running 400B+ tokens through Portkey AI Gateway every day.

Why This Exists

LLM pricing is a mess. Every team building on LLMs ends up maintaining its own spreadsheet — and it's stale by Friday.

  • The Naming Problemgpt-5, gpt-5.2-pro-2025-12-11, o1, o3-mini are all different models with different prices
  • The Units Problem — OpenAI charges tokens, Google charges characters, Cohere uses "generations" and "summarization units"
  • The Hidden Dimensions Problem — Thinking tokens, cache writes vs. reads, context thresholds, per-request fees, multimodal surcharges
  • The Velocity Problem — DeepSeek dropped R1 pricing 75% in weeks. Google releases new tiers mid-quarter with no announcement

We built this as an open, community-maintained database to solve that problem.

API

🔓 Free API. No authentication required.

Get Provider Pricing Data

curl https://configs.portkey.ai/pricing/{provider}.json
# Examples
curl https://configs.portkey.ai/pricing/bedrock.json
curl https://configs.portkey.ai/pricing/openai.json
curl https://configs.portkey.ai/pricing/anthropic.json

Get Model Configuration

curl https://api.portkey.ai/model-configs/pricing/{provider}/{model}
# Examples
curl https://api.portkey.ai/model-configs/pricing/openai/gpt-5
curl https://api.portkey.ai/model-configs/pricing/anthropic/claude-sonnet-4-5-20250514
curl https://api.portkey.ai/model-configs/pricing/google/gemini-3.0-pro

📖 Full API Documentation — Response schema, model configuration endpoints, and more.

Pricing Unit

⚠️ Prices are in cents per token, not dollars.

JSONPer 1KPer 1M
0.003$0.03$30
0.00025$0.0025$2.50
1$10$10,000
const costDollars = (tokens * price) / 100;

Schema

{
  "model-name": {
    "pricing_config": {
      "pay_as_you_go": {
        "request_token": { "price": 0.00025 },
        "response_token": { "price": 0.001 },
        "cache_write_input_token": { "price": 0 },
        "cache_read_input_token": { "price": 0.000125 },
        "additional_units": {
          "web_search": { "price": 1 }
        }
      },
      "currency": "USD"
    }
  }
}

Fields

FieldDescription
request_tokenInput
response_tokenOutput
cache_write_input_tokenCache write
cache_read_input_tokenCache read
request_audio_tokenAudio input
response_audio_tokenAudio output
imageImage gen (by quality/size)
additional_unitsProvider-specific (see below)

Additional Units

UnitProvidersPrice (¢)
web_searchopenai, azure-openai, azure-ai, google, vertex-ai, perplexity-ai0.5 - 3.5
file_searchopenai, azure-openai, azure-ai0.25
searchgoogle, vertex-ai1.4 - 3.5
thinking_tokengoogle, vertex-ai0.00004 - 0.0012
image_tokengoogle, vertex-ai0.003
image_1kgoogle3.9
megapixelstogether-ai0.0027 - 0.08
video_secondsvertex-ai10 - 50
video_duration_seconds_720_1280openai, azure-openai10 - 30
video_duration_seconds_1280_720openai, azure-openai10 - 30
video_duration_seconds_1024_1792openai, azure-openai50
video_duration_seconds_1792_1024openai, azure-openai50
request_audio_tokenopenai, azure-openai0 - 0.6
response_audio_tokenopenai, azure-openai0 - 1.5
routing_unitsazure-openai0.000014
input_imagevertex-ai0.01
input_video_essentialvertex-ai0.05
input_video_standardvertex-ai0.1
input_video_plusvertex-ai0.2

Perplexity

UnitPrice (¢)
web_search_low_context0.5 - 0.6
web_search_medium_context0.8 - 1.0
web_search_high_context1.2 - 1.4

Examples

// OpenAI (gpt-5, o3, o4-mini)
"additional_units": {
  "web_search": { "price": 1 },
  "file_search": { "price": 0.25 }
}

// Google (gemini-3.0-pro)
"additional_units": {
  "thinking_token": { "price": 0.001 },
  "web_search": { "price": 3.5 }
}

// OpenAI Sora
"additional_units": {
  "video_duration_seconds_720_1280": { "price": 10 }
}

// Together AI (image models)
"additional_units": {
  "megapixels": { "price": 0.05 }
}

Batch Pricing (batch_config)

Batch API pricing is defined in a separate batch_config section at the same level as pay_as_you_go. Prices are specified as exact values matching the provider's published batch pricing.

FieldDescription
request_tokenBatch API input price
response_tokenBatch API output price
cache_read_input_tokenBatch API cache read price

Schema:

{
  "pricing_config": {
    "pay_as_you_go": {
      "request_token": { "price": 0.00025 },
      "response_token": { "price": 0.001 }
    },
    "batch_config": {
      "request_token": { "price": 0.000125 },
      "response_token": { "price": 0.0005 }
    }
  }
}

Notes:

  • Batch prices are typically 50% of standard pricing for text models
  • Embedding models typically have 20% discount for batch

Supported Providers: OpenAI, Anthropic, Google (Vertex AI)


Contributing

The easiest way to contribute is to pick an issue with the good first issue tag 💪.

  1. Fork this repo
  2. Edit pricing/{provider}.json
  3. Submit a PR with source link

Remember: Prices are in cents per token: $0.03/1K0.003

Providers

40+ providers

AI21, Anthropic, Anyscale, Azure AI, Azure OpenAI, AWS Bedrock, Cerebras, Cohere, Dashscope, Deepbricks, DeepInfra, DeepSeek, Fireworks AI, GitHub, Google, Groq, Inference.net, Jina, Lambda, Lemonfox AI, Mistral AI, MonsterAPI, Nebius, Nomic, Novita AI, OpenAI, OpenRouter, Oracle, PaLM, Perplexity AI, Predibase, Reka AI, Sagemaker, Segmind, Stability AI, Together AI, Vertex AI, Workers AI, X.AI, Zhipu


Community

Join our growing community around the world, for help, ideas, and discussions on AI.


Built by Portkey

Rubeus Social Share (4)