RouterShiftRouterShift
Browse ModelsPricingDocs
RouterShiftRouterShiftRouterShift. Enterprise AI Infrastructure.
Browse ModelsStatusDocsTermsPrivacyDPATransparency

API Documentation

API Reference

RouterShift API Overview

RouterShift provides OpenAI-, Anthropic-, and Gemini-compatible data-plane interfaces for the models currently active for your key. Routing, failover, billing, and audit evidence are applied behind the protocol boundary.

Key Features

  • OpenAI-compatible API — drop-in replacement for any OpenAI SDK client
  • Smart routing with configurable strategies (weighted, round-robin, latency-based, failover)
  • Built-in circuit breaker and rate limiting to protect your application
  • Semantic caching to reduce latency and costs on repeated queries
  • Comprehensive logging, monitoring, and spend analytics
  • Multi-provider support with automatic failover when a provider is unavailable

OpenAI-Compatible Base URL

Fully compatible with OpenAI client libraries. Just change the SDK base_url to the address below with your RouterShift API key.

https://api.routershift.com/v1

Anthropic-Compatible Base URL

For Anthropic SDK or Claude Code. Note: no /v1 suffix — the SDK auto-appends /v1/messages.

https://api.routershift.com

Multi-Protocol Compatible

Existing OpenAI, Anthropic, and Gemini clients can usually connect by changing the base URL and credential. Supported fields and routes are defined by the live OpenAPI contract; do not assume every upstream-specific extension is portable.

Supported Model Categories

Use GET /v1/models as the authority for models available to your key. Availability can vary with product activation, route health, permissions, balance, region, and private-access policy.

Getting Help

If you encounter issues or have questions, check the sections below for detailed guides. For billing inquiries, contact support through the console. For real-time status updates, visit the Status page.

Full Endpoint List

The table is a human-readable index of the public data plane. Use /api/openapi.yaml for the machine contract and /api/docs for interactive reference; key scopes still apply per endpoint and model.

GET/v1/version

Data-plane API version and compatibility information

GET/v1/models

Model Listing

POST/v1/chat/completions

Chat Completions (OpenAI-compatible)

POST/v1/messages

Messages API (Anthropic-compatible)

POST/v1/models/gemini/:model/generateContent

Gemini content generation

POST/v1/models/gemini/:model/streamGenerateContent

Gemini Stream Generate Content

POST/v1/embeddings

Text Embeddings

POST/v1/rerank

Rerank

POST/v1/chat/completions/estimate

Preflight token and cost estimate

POST/v1/images/generations

Image Generation

POST/v1/audio/transcriptions

Audio Transcription

POST/v1/audio/speech

Text to Speech

POST/v1/tts

Extended Text to Speech

POST/v1/transcriptions

Extended Transcription

POST/v1/midjourney/imagine

Midjourney Image Generation

POST/v1/suno/generate

Suno Music Generation

POST/v1/video/generations

Video generation task

GET/v1/video/tasks/:task_id

Video generation task status

POST/v1/chat/completions/async

Async Task — Submit

GET/v1/chat/completions/async/:task_id

Async Task — Check Status

GET/v1/chat/completions/async/:task_id/result

Async Task — Get Result

POST/v1/batch

Batch Processing

GET/v1/batch/:batch_id

Batch job status

GET/v1/batch/:batch_id/results

Batch result download

POST/v1/batch/:batch_id/cancel

Cancel a batch job

POST/v1/mcp/

MCP JSON-RPC tools gateway

GET/v1/mcp/sse

MCP SSE transport

POST/v1/a2a/

A2A JSON-RPC gateway

GET/v1/a2a/sse

A2A SSE event stream

MethodPathDescription
GET/v1/versionData-plane API version and compatibility information
GET/v1/modelsModel Listing
POST/v1/chat/completionsChat Completions (OpenAI-compatible)
POST/v1/messagesMessages API (Anthropic-compatible)
POST/v1/models/gemini/:model/generateContentGemini content generation
POST/v1/models/gemini/:model/streamGenerateContentGemini Stream Generate Content
POST/v1/embeddingsText Embeddings
POST/v1/rerankRerank
POST/v1/chat/completions/estimatePreflight token and cost estimate
POST/v1/images/generationsImage Generation
POST/v1/audio/transcriptionsAudio Transcription
POST/v1/audio/speechText to Speech
POST/v1/ttsExtended Text to Speech
POST/v1/transcriptionsExtended Transcription
POST/v1/midjourney/imagineMidjourney Image Generation
POST/v1/suno/generateSuno Music Generation
POST/v1/video/generationsVideo generation task
GET/v1/video/tasks/:task_idVideo generation task status
POST/v1/chat/completions/asyncAsync Task — Submit
GET/v1/chat/completions/async/:task_idAsync Task — Check Status
GET/v1/chat/completions/async/:task_id/resultAsync Task — Get Result
POST/v1/batchBatch Processing
GET/v1/batch/:batch_idBatch job status
GET/v1/batch/:batch_id/resultsBatch result download
POST/v1/batch/:batch_id/cancelCancel a batch job
POST/v1/mcp/MCP JSON-RPC tools gateway
GET/v1/mcp/sseMCP SSE transport
POST/v1/a2a/A2A JSON-RPC gateway
GET/v1/a2a/sseA2A SSE event stream

Protocol Correspondence

RouterShift is compatible with multiple API protocols. The table below shows the base URL and SDK configuration for each.

OpenAI Compatible

https://api.routershift.com/v1

Models: <available-model-code>

Authorization: Bearer / x-api-key

Anthropic Compatible

https://api.routershift.com

Models: <available-model-code>

x-api-key: sk-xxx

Gemini Native

https://api.routershift.com/v1

Models: <available-model-code>

Authorization: Bearer

Base URLExample Model ParameterAuth Header
https://api.routershift.com/v1
Standard OpenAI SDK — just change base_url
<available-model-code>Authorization: Bearer / x-api-key
https://api.routershift.com
Standard Anthropic SDK — just change base_url
<available-model-code>x-api-key: sk-xxx
https://api.routershift.com/v1
Gemini native format, call generateContent directly
<available-model-code>Authorization: Bearer

Unified Authentication

All endpoints use the same authentication. Both header formats work identically:

OpenAI-compatible format

Authorization: Bearer sk-xxx

Anthropic-compatible format

x-api-key: sk-xxx