Create a provider API key and set the local environment variable OPENROUTER_API_KEY, then run the example below.
Request URL
https://openrouter.ai/api/v1/chat/completions
Connection settings
Base URL: https://openrouter.ai/api/v1
Catalog model: openai/gpt-4o-mini-2024-07-18
Request API model: openai/gpt-4o-mini-2024-07-18
Protocol: openai
Provider routing: openai
API key env: OPENROUTER_API_KEY
Docs: https://openrouter.ai/docs
curl
curl "https://openrouter.ai/api/v1/chat/completions" -H "Authorization: Bearer $OPENROUTER_API_KEY" -H "Content-Type: application/json" -d '{
"model": "openai/gpt-4o-mini-2024-07-18",
"messages": [
{
"role": "user",
"content": "Read this support ticket and return a JSON object with \"summary\", \"urgency\" (low, medium, or high), and \"next_step\". Use null for missing details.\n\nTicket: I paid for the Pro plan yesterday, but my account still shows Free. My team needs access before tomorrow’s demo."
}
],
"provider": {
"order": [
"openai"
],
"only": [
"openai"
],
"allow_fallbacks": false
}
}'
Prompt for your coding agent
Use the OpenAI-compatible API at https://openrouter.ai/api/v1 with model "openai/gpt-4o-mini-2024-07-18". Set provider.only to ["openai"] and allow_fallbacks to false. Apply the recorded quantization filter. A base slug can match multiple endpoints, so confirm the served route before using the reference price. Read the API key from the OPENROUTER_API_KEY environment variable; never hardcode it. Pricing observed on 2026-11-22: $0.15 / 1M input tokens, $0.60 / 1M output tokens, $0.075 / 1M cache read tokens. API integration docs: https://openrouter.ai/docs. Billing scope and conditions: Served by OpenAI through OpenRouter, not a direct-provider contract. Published rates for route openai; unknown quantization. Other fees, tier conditions and regional access must be checked before use.. Source: https://openrouter.ai/api/v1/models/openai/gpt-4o-mini-2024-07-18/endpoints.
Task test prompt
Read this support ticket and return a JSON object with "summary", "urgency" (low, medium, or high), and "next_step". Use null for missing details.
Ticket: I paid for the Pro plan yesterday, but my account still shows Free. My team needs access before tomorrow’s demo.
Price facts
Input: $0.15 / 1M tokens
Output: $0.60 / 1M tokens
Cache read: $0.075 / 1M tokens
Currency: USD
Regions: global
Unit source: api
Checked: 2026-11-22T09:20:25.110Z
Source: https://openrouter.ai/api/v1/models/openai/gpt-4o-mini-2024-07-18/endpoints
Source check: 2026-11-22 · valid no later than 2026-11-23 09:21 UTC
Billing evidence and sources
openai/gpt-4o-mini-2024-07-18 · openai
Billing conditions
Served by OpenAI through OpenRouter, not a direct-provider contract. Published rates for route openai; unknown quantization. Other fees, tier conditions and regional access must be checked before use.
GPT-4o-mini API pricing: official and providers: 3 current published quote records across 2 exact API IDs and 2 providers. Compare API versions, currencies, regions and billing conditions separately; prices do not prove task quality or account access.
Latest recorded source check: 2026-11-22
Recorded changes
No changes recorded yet. The first successful check establishes a baseline; it does not count as a price drop or a newly launched endpoint.
Showing up to 100 recent events. Prices for unavailable endpoints are retained for reference. Failed source checks do not establish that a price stayed unchanged.
Open a quote’s billing details for cache reads/writes, request fees and endpoint instructions. Batch, free, promotional and off-peak tiers are selected separately. Context-tier, storage, search, tax and platform fees may be excluded.
Find lower-cost alternatives
Find lower-cost alternatives
Choose your existing model to find lower reference costs with matching declared technical constraints. Output quality remains unverified.
Declared fields from the OpenRouter model catalog, bound to exact API IDs; not our tests, price approval or account availability.
Input
Text · Image · File
Output
Text
Context
128K
Reasoning parameter
Not offered
Knowledge cutoff
2023-10-31
Open-weights clue
Not declared
Per-API facts · 3 versions
openai/gpt-4o-mini · text / image / file → text · 128K · non-reasoning
openai/gpt-4o-mini-2024-07-18 · text / image / file → text · 128K · non-reasoning
openai/gpt-4o-mini:batch · text / image / file → text · 128K · non-reasoning
Source: https://openrouter.ai/api/v1/models, captured 2026-11-21T09:20:20.905Z, raw SHA-256: 19214ba490361282… . Unstated facts stay unknown and are not inferred from names or sibling models.
Classification sources
Source declarations for registered versions; not task quality, current account availability or price approval. Unknown versions do not inherit sibling classifications.
Snapshots and routing variants remain distinct. Choose an exact ID in the comparison before deciding; model quality and access conditions need your own review.