API Reference

Use the API Reference to look up exact methods, paths, field types, and response schemas. For workflows and complete examples, use the API Guides.

Before you start

Authentication depends on the protocol: OpenAI-compatible endpoints use a Bearer token, Anthropic Messages uses x-api-key, and Gemini-compatible endpoints use x-goog-api-key or ?key=. Copy an exact model ID from the live Models page.

Basics

OpenAI SDK / Chat Completions / Responses
Base URLhttps://getrouter.ai/v1
AuthenticationAuthorization: Bearer YOUR_API_KEY
Anthropic SDK / Messages
Base URLhttps://getrouter.ai
Authenticationx-api-key: YOUR_API_KEY
Gemini-compatible
Base URLhttps://getrouter.ai
Authenticationx-goog-api-key: YOUR_API_KEY
Query parameter alternative: ?key=YOUR_API_KEY
Direct HTTP and provider task APIs
Service roothttps://getrouter.ai
Append the full Path shown on the operation page; use the authentication shown there.

Full OpenAPI: Open API Explorer

Browse by API group

Models

2 public endpoints.

Chat Completions

1 public endpoint.

Responses

2 public endpoints.

Claude Messages

1 public endpoint.

Gemini API

2 public endpoints.

Embeddings

1 public endpoint.

Rerank

1 public endpoint.

Completions

1 public endpoint.

Image Generation

2 public endpoints.

Audio

3 public endpoints.

Video Generation

10 public endpoints.

Moderations

1 public endpoint.

Realtime

1 public endpoint.