developers.openai.com APIdevelopers.openai.com ↗
Retrieve current OpenAI model pricing across all tiers and categories via one API endpoint. Filter by section or tier to compare GPT, image, audio, and video costs.
curl -X GET 'https://api.parse.bot/scraper/2801fee9-9543-4a70-9ab5-e01bc965c803/get_pricing' \ -H 'X-API-Key: $PARSE_API_KEY'
Get all OpenAI model pricing. Returns each model with its section, pricing tier, and per-token costs. Optionally filter by section name or pricing tier using case-insensitive partial matching.
| Param | Type | Description |
|---|---|---|
| tier | string | Filter by pricing tier (case-insensitive partial match). Available tiers: 'Standard', 'Batch', 'Flex', 'Priority'. Some sections only have a subset of tiers. |
| section | string | Filter by section name (case-insensitive partial match). Available sections: 'Flagship models', 'Multimodal models', 'Realtime and audio generation models', 'Image generation models', 'Video generation models', 'Transcription models', 'Tools', 'Specialized models', 'Finetuning'. Partial matches work, e.g. 'image' matches 'Image generation models'. |
{
"type": "object",
"fields": {
"total": "integer count of models returned",
"models": "array of model pricing objects, each containing section, tier, model name, and pricing fields that vary by section (e.g. input, output, cached_input for text models; modality, price_per_image for image models)"
},
"sample": {
"data": {
"total": 66,
"models": [
{
"tier": "Standard",
"input": "$10.00",
"model": "gpt-5.5",
"output": "$45.00",
"model_2": "$30.00",
"section": "Flagship models",
"cached_input": "$1.00",
"long_context": "$0.50",
"short_context": "$5.00"
},
{
"tier": "Standard",
"input": "$8.00",
"model": "gpt-image-2",
"output": "$30.00",
"section": "Image generation models",
"modality": "Image",
"cached_input": "$2.00"
},
{
"tier": "Standard",
"input": "$1.75",
"model": "gpt-5.3-codex",
"output": "$14.00",
"section": "Specialized models",
"category": "Codex",
"cached_input": "$0.175"
}
]
},
"status": "success"
}
}About the developers.openai.com API
The OpenAI Pricing API exposes one endpoint, get_pricing, that returns per-token and per-unit costs for every model listed on the OpenAI developer pricing page, covering nine sections and four pricing tiers. Each response object includes the model name, section (e.g., Flagship models, Multimodal models, Image generation), pricing tier (Standard, Batch, Flex, or Priority), and the corresponding input/output cost fields. Use the section and tier query parameters to narrow results to exactly the models you need.
What get_pricing Returns
The get_pricing endpoint returns an array of model pricing objects under the models key, along with a total count of matched results. Each object carries at minimum: the model name, the section it belongs to (e.g., "Flagship models", "Image generation", "Realtime and audio generation", "Transcription", "Tools", "Specialized", "Finetuning"), and the tier ("Standard", "Batch", "Flex", or "Priority"). Cost fields vary by section — text models include input and output per-token rates, while image and video generation models include unit-based pricing fields appropriate to their output type.
Filtering Options
Both the section and tier parameters accept case-insensitive partial strings, so passing tier=batch matches the "Batch" tier across all sections, and passing section=flagship returns only Flagship model entries. Combining both parameters narrows results to the intersection — for example, Batch-tier pricing for Flagship models only. When neither parameter is supplied, the full catalog is returned. The total field in the response reflects the count after filtering.
Coverage Scope
The API reflects the nine model groupings published on developers.openai.com/api/docs/pricing: Flagship, Multimodal, Image generation, Video generation, Realtime and audio generation, Transcription, Tools, Specialized, and Finetuning. This covers the GPT-4 family, o-series reasoning models, DALL-E and image variants, Whisper-based transcription, embeddings, moderation, and fine-tuned model cost structures. Pricing fields are sourced directly from the published pricing table, so they change when OpenAI updates that page.
- Monitoring OpenAI pricing changes over time and alerting when costs shift for a specific model
- Comparing Batch-tier vs Standard-tier costs across all Flagship models before choosing a processing strategy
- Building a cost estimator that looks up current input/output token rates for a given model by name
- Selecting the lowest-cost model for a task by comparing per-token rates across sections
- Populating an internal rate card or billing dashboard with up-to-date OpenAI model costs
- Filtering to Image generation or Video generation sections to plan budget for media-generation pipelines
- Tracking Finetuning tier pricing separately to estimate custom model training and inference costs
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does OpenAI have an official developer API for pricing data?+
What pricing fields does a model object include, and do they differ by section?+
section, tier, and model name fields. Cost fields vary by section: text-based models (Flagship, Specialized, Finetuning) include input and output per-token rates. Image generation and video generation models carry unit-appropriate pricing fields for those output types. Transcription and audio models follow their own cost-per-unit structure. The response shape adapts to the type of model in each section.How fresh is the pricing data returned by the API?+
Can I retrieve pricing for a specific model by its exact name?+
get_pricing endpoint supports partial, case-insensitive filtering only via the section and tier parameters, not by model name directly. To find a specific model, fetch the full list (or filter by section) and match the model field client-side. The API does not currently expose a model-name filter parameter. You can fork it on Parse and revise to add a model-name filter endpoint.