Getting Started with API
Available Models & Playground
Browse our full catalog of AI models on the Market page. Each model has a live playground where you can experiment with prompts and parameters before writing any code.
- 100+ models across video, image, music, and LLM categories
- Free sandbox environment for testing - no credit card required
- Real-time preview of model outputs in the playground
Pricing
We use a flexible credit-based pricing system. Credits are consumed per request based on the model and parameters used. Our pricing is typically 30-50% lower than calling model providers directly. Visit the Pricing page to see per-model credit costs.
Creating and Securing Your API Key
API base url
https://overrouter.aiGenerate your API key from the dashboard. Each key can be scoped to specific models and rate limits for added security.
👉 https://overrouter.ai/market/api-keys
Never expose your API key in client-side code or public repositories. Always use environment variables or a backend proxy to keep your key secure.
Required Request Headers
All API requests must include the following headers for authentication and content negotiation.
Content-Type: application/json
Authorization: Bearer token for authentication. See Market Quickstart for Authorization generation.
API-KEY: API key, format: ak- followed by the api-keyAsynchronous Task Model
Most generation tasks (video, image, music) are processed asynchronously. When you submit a request, you receive a task_id immediately. Use this ID to poll for status or configure a webhook callback to be notified when the task completes.
Always verify the task status before attempting to access the result URL. A task may still be processing or may have failed. Use the Get Task Details endpoint to check.
{
"code": 200,
"message": "success",
"data": {
"task_id": "abc123-def456-ghi789",
"status": "processing",
"progress": 45,
"result_url": null,
"created_at": "2025-01-01T00:00:00Z"
}
}Rate Limits & Concurrency
Default rate limits are 60 requests per minute and 5 concurrent tasks. Enterprise accounts can request higher limits. If you exceed the rate limit, the API returns a 429 status code. Implement exponential backoff in your retry logic.
Developer Support
Join our Discord or Telegram community for real-time developer support. For enterprise inquiries, contact our sales team directly from the dashboard.
