DocsGetting Started with API

Getting Started with API

1

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
2

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.

3

Creating and Securing Your API Key

API base url

https://overrouter.ai

Generate 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

Security Requirement

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.

4

Required Request Headers

All API requests must include the following headers for authentication and content negotiation.

HTTP Headers
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-key
5

Asynchronous 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.

Status Verification

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.

JSON Response Example
{
  "code": 200,
  "message": "success",
  "data": {
    "task_id": "abc123-def456-ghi789",
    "status": "processing",
    "progress": 45,
    "result_url": null,
    "created_at": "2025-01-01T00:00:00Z"
  }
}
6

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.

7

Developer Support

Join our Discord or Telegram community for real-time developer support. For enterprise inquiries, contact our sales team directly from the dashboard.

Built with overrouter.ai© 2026 overrouter.ai