Prisma AIRS AI Gateway Models
curl --request GET \
--url https://aigw.portkey.ai/model-configs/pricing/{provider}/{model}import requests
url = "https://aigw.portkey.ai/model-configs/pricing/{provider}/{model}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://aigw.portkey.ai/model-configs/pricing/{provider}/{model}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://aigw.portkey.ai/model-configs/pricing/{provider}/{model}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://aigw.portkey.ai/model-configs/pricing/{provider}/{model}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://aigw.portkey.ai/model-configs/pricing/{provider}/{model}")
.asString();require 'uri'
require 'net/http'
url = URI("https://aigw.portkey.ai/model-configs/pricing/{provider}/{model}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"pay_as_you_go": {
"request_token": {
"price": 123
},
"response_token": {
"price": 123
},
"cache_read_input_token": {
"price": 123
},
"cache_write_input_token": {
"price": 123
},
"request_audio_token": {
"price": 123
},
"response_audio_token": {
"price": 123
},
"additional_units": {},
"image": {}
},
"calculate": {
"request": {},
"response": {}
},
"currency": "<string>",
"finetune_config": {
"pay_per_token": {},
"pay_per_hour": {}
},
"params": [
{
"key": "<string>",
"defaultValue": "<any>",
"minValue": 123,
"maxValue": 123,
"type": "<string>",
"options": [
{}
]
}
],
"type": {
"primary": "<string>",
"supported": [
{}
]
},
"messages": {
"options": [
{}
]
},
"disablePlayground": true,
"isDefault": true,
"{model-id}": {
"pricing_config": {}
}
}Prisma AIRS AI Gateway Models
Open-source pricing and configuration database for 2,300+ LLMs across 35+ providers
GET
https://aigw.portkey.ai
/
model-configs
/
pricing
/
{provider}
/
{model}
Prisma AIRS AI Gateway Models
curl --request GET \
--url https://aigw.portkey.ai/model-configs/pricing/{provider}/{model}import requests
url = "https://aigw.portkey.ai/model-configs/pricing/{provider}/{model}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://aigw.portkey.ai/model-configs/pricing/{provider}/{model}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://aigw.portkey.ai/model-configs/pricing/{provider}/{model}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://aigw.portkey.ai/model-configs/pricing/{provider}/{model}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://aigw.portkey.ai/model-configs/pricing/{provider}/{model}")
.asString();require 'uri'
require 'net/http'
url = URI("https://aigw.portkey.ai/model-configs/pricing/{provider}/{model}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"pay_as_you_go": {
"request_token": {
"price": 123
},
"response_token": {
"price": 123
},
"cache_read_input_token": {
"price": 123
},
"cache_write_input_token": {
"price": 123
},
"request_audio_token": {
"price": 123
},
"response_audio_token": {
"price": 123
},
"additional_units": {},
"image": {}
},
"calculate": {
"request": {},
"response": {}
},
"currency": "<string>",
"finetune_config": {
"pay_per_token": {},
"pay_per_hour": {}
},
"params": [
{
"key": "<string>",
"defaultValue": "<any>",
"minValue": 123,
"maxValue": 123,
"type": "<string>",
"options": [
{}
]
}
],
"type": {
"primary": "<string>",
"supported": [
{}
]
},
"messages": {
"options": [
{}
]
},
"disablePlayground": true,
"isDefault": true,
"{model-id}": {
"pricing_config": {}
}
}AI Gateway Models is a free, open-source pricing database for LLMs. No API key required — just query any model’s pricing directly.
Explore Models
Browse 2,300+ models
Model Rankings
Top models by usage
GitHub
View source & contribute
Quick Start
Get pricing for any model with a single API call:curl https://aigw.portkey.ai/model-configs/pricing/openai/gpt-4o
const response = await fetch(
'https://aigw.portkey.ai/model-configs/pricing/anthropic/claude-3-5-sonnet-20241022'
);
const pricing = await response.json();
console.log(pricing.pay_as_you_go.request_token.price); // Input cost
console.log(pricing.pay_as_you_go.response_token.price); // Output cost
import requests
pricing = requests.get(
'https://aigw.portkey.ai/model-configs/pricing/google/gemini-2.0-flash-001'
).json()
input_cost = pricing['pay_as_you_go']['request_token']['price']
output_cost = pricing['pay_as_you_go']['response_token']['price']
Need to discover all models for a provider? Instead of querying each model individually, you can fetch pricing for all models at once:See detailed documentation below ↓
curl https://configs.portkey.ai/pricing/{provider}.json
Understanding Pricing Units
Prices are in cents per token, not dollars.
| API Response | Per 1K Tokens | Per 1M Tokens |
|---|---|---|
0.003 | $0.03 | $30 |
0.00025 | $0.0025 | $2.50 |
0.0001 | $0.001 | $1.00 |
const costInDollars = (tokens * priceFromAPI) / 100;
API Reference
Get Model Pricing
Returns pricing configuration for a specific model.GET https://aigw.portkey.ai/model-configs/pricing/{provider}/{model}
Path Parameters
Provider identifier. Use lowercase with hyphens.Examples:
openai, anthropic, google, azure-openai, bedrock, together-ai, groq, deepseek, x-ai, mistral-ai, cohere, fireworks-ai, perplexity-ai, anyscale, deepinfra, cerebrasModel identifier. Use the exact model name as specified by the provider.Examples:
gpt-4o, gpt-4-turbo, claude-3-5-sonnet-20241022, claude-3-opus-20240229, gemini-2.0-flash-001, gemini-1.5-proResponse Schema
Token-based pricing. All prices in USD cents per token.
Show properties
Show properties
Provider-specific pricing for features beyond tokens.Common units:
web_search— Web search tool usagefile_search— File search tool usagethinking_token— Chain-of-thought reasoning tokensimage_token— Image generation/processingvideo_duration_seconds_*— Video generation (by resolution)
Example Responses
{
"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 },
"file_search": { "price": 0.25 }
}
},
"calculate": {
"request": {
"operation": "sum",
"operands": [
{ "operation": "multiply", "operands": [{ "value": "input_tokens" }, { "value": "rates.request_token" }] },
{ "operation": "multiply", "operands": [{ "value": "cache_write_tokens" }, { "value": "rates.cache_write_input_token" }] },
{ "operation": "multiply", "operands": [{ "value": "cache_read_tokens" }, { "value": "rates.cache_read_input_token" }] }
]
},
"response": {
"operation": "multiply",
"operands": [{ "value": "output_tokens" }, { "value": "rates.response_token" }]
}
},
"currency": "USD"
}
{
"pay_as_you_go": {
"request_token": { "price": 0.0003 },
"response_token": { "price": 0.0015 },
"cache_read_input_token": { "price": 0.00003 },
"cache_write_input_token": { "price": 0.000375 }
},
"currency": "USD"
}
{
"pay_as_you_go": {
"request_token": { "price": 0.000125 },
"response_token": { "price": 0.001 },
"additional_units": {
"thinking_token": { "price": 0.001 },
"web_search": { "price": 3.5 },
"search": { "price": 3.5 }
}
},
"currency": "USD"
}
{
"pay_as_you_go": {
"image": {
"standard": {
"1024x1024": { "price": 4 },
"1024x1792": { "price": 8 },
"1792x1024": { "price": 8 }
},
"hd": {
"1024x1024": { "price": 8 },
"1024x1792": { "price": 12 },
"1792x1024": { "price": 12 }
}
}
},
"currency": "USD"
}
Get Model Configuration
Returns general configuration and capabilities for a specific model.GET https://aigw.portkey.ai/model-configs/general/{provider}/{model}
Path Parameters
Response Schema
Model parameters with their constraints.
Example Responses
{
"params": [
{
"key": "max_tokens",
"maxValue": 16384
},
{
"key": "response_format",
"defaultValue": null,
"options": [
{ "value": null, "name": "Text" },
{ "value": "json_object", "name": "JSON Object" },
{ "value": "json_schema", "name": "JSON Schema" }
],
"type": "string"
},
{
"key": "temperature",
"minValue": 0,
"maxValue": 2,
"defaultValue": 1
}
],
"type": {
"primary": "chat",
"supported": ["tools", "image"]
}
}
{
"params": [
{
"key": "max_tokens",
"maxValue": 4096
}
],
"type": {
"primary": "chat",
"supported": ["tools", "image", "cache_control"]
},
"messages": {
"options": ["system", "user", "assistant"]
}
}
Get All Models for a Provider
Returns pricing configuration for all models from a specific provider in a single response.GET https://configs.portkey.ai/pricing/{provider}.json
Use this endpoint to discover all available models and their pricing for a provider, instead of querying each model individually.
Path Parameters
Provider identifier. Use lowercase with hyphens.Examples:
openai, anthropic, google, bedrock, azure-openai, together-ai, groq, deepseek, x-ai, mistral-aiResponse Schema
Returns a JSON object where:- Keys are model identifiers
- Values contain
pricing_configobjects with the same structure as the individual model pricing endpoint - A
defaultkey provides the base pricing template
Example Response
curl --request GET \
--url https://configs.portkey.ai/pricing/bedrock.json
const response = await fetch('https://configs.portkey.ai/pricing/bedrock.json');
const allModels = await response.json();
// Access specific model pricing
const claudePrice = allModels['anthropic.claude-3-5-sonnet-20241022-v2:0'];
console.log(claudePrice.pricing_config.pay_as_you_go);
import requests
all_models = requests.get(
'https://configs.portkey.ai/pricing/bedrock.json'
).json()
# List all available models
for model_id in all_models.keys():
if model_id != 'default':
print(model_id)
Sample Response (Bedrock)
Sample Response (Bedrock)
{
"default": {
"pricing_config": {
"pay_as_you_go": {
"request_token": { "price": 0 },
"response_token": { "price": 0 }
},
"calculate": {
"request": {
"operation": "multiply",
"operands": [
{ "value": "input_tokens" },
{ "value": "rates.request_token" }
]
},
"response": {
"operation": "multiply",
"operands": [
{ "value": "output_tokens" },
{ "value": "rates.response_token" }
]
}
},
"currency": "USD"
}
},
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
"pricing_config": {
"pay_as_you_go": {
"request_token": { "price": 0.0003 },
"response_token": { "price": 0.0015 },
"cache_write_input_token": { "price": 0.000375 },
"cache_read_input_token": { "price": 0.00003 }
}
}
},
"anthropic.claude-3-haiku-20240307-v1:0": {
"pricing_config": {
"pay_as_you_go": {
"request_token": { "price": 0.000025 },
"response_token": { "price": 0.000125 }
}
}
},
"meta.llama3-1-405b-instruct-v1:0": {
"pricing_config": {
"pay_as_you_go": {
"request_token": { "price": 0.000532 },
"response_token": { "price": 0.0016 }
}
}
},
"amazon.nova-pro-v1:0": {
"pricing_config": {
"pay_as_you_go": {
"request_token": { "price": 0.00008 },
"response_token": { "price": 0.00002 },
"cache_read_input_token": { "price": 0.00004 },
"cache_write_input_token": { "price": 0.00016 }
}
}
}
}
Additional Units Reference
Provider-specific pricing for features beyond standard token costs:| Unit | Description | Providers | Price Range (¢) |
|---|---|---|---|
web_search | Web search tool usage | OpenAI, Azure, Google, Vertex AI, Perplexity | 0.5 - 3.5 |
file_search | File search tool usage | OpenAI, Azure | 0.25 |
search | Google search grounding | Google, Vertex AI | 1.4 - 3.5 |
thinking_token | Chain-of-thought reasoning | Google, Vertex AI | 0.00004 - 0.0012 |
image_token | Image processing tokens | Google, Vertex AI | 0.003 |
image_1k | Image generation (1K units) | 3.9 | |
megapixels | Image generation by megapixel | Together AI | 0.0027 - 0.08 |
video_seconds | Video generation | Vertex AI | 10 - 50 |
video_duration_seconds_720_1280 | Video (720p) | OpenAI Sora | 10 - 30 |
video_duration_seconds_1080_1920 | Video (1080p) | OpenAI Sora | 50 |
routing_units | Azure OpenAI routing | Azure OpenAI | 0.000014 |
input_image | Image input | Vertex AI | 0.01 |
input_video_essential | Video input (essential) | Vertex AI | 0.05 |
input_video_standard | Video input (standard) | Vertex AI | 0.1 |
input_video_plus | Video input (plus) | Vertex AI | 0.2 |
Perplexity Context-Based Pricing
Perplexity Context-Based Pricing
Perplexity has context-dependent web search pricing:
| Unit | Price (¢) |
|---|---|
web_search_low_context | 0.5 - 0.6 |
web_search_medium_context | 0.8 - 1.0 |
web_search_high_context | 1.2 - 1.4 |
Supported Providers
40+ providers supported
40+ providers supported
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, TypeSafe, Vertex AI, Workers AI, X.AI, Zhipu
Use with AI Gateway
The models database powers automatic cost tracking for all requests through the AI Gateway. When you make requests via the AI Gateway, costs are calculated automatically using this pricing data.Cost Analytics
View real-time spend across all your LLM usage
Budget Limits
Set spending caps that automatically enforce limits
Custom Pricing
Set custom input/output costs to match your contracts
Last modified on October 1, 2026
Was this page helpful?

