GRGlobalRouter Docs
Console

Public API docs / Docs

GlobalRouter API quick start

Choose the right API surface first, then make your first call. New integrations should start with the GlobalRouter API, while migrations can keep using the compatible protocol that matches their current client.

API Surface matrix

The four entry points match different integration paths. Use the GlobalRouter API for new features, and reserve compatible protocols for migrations or provider-style calls.

GlobalRouter API

Primary long-term public API

Recommended primary API
/api/v1

The default entry point for new integrations. Chat, text, audio, image, video, model, provider, asset, credit, and API key management all live under one API surface.

Best for
New projects, a unified model catalog, audio, providers, credits, assets, and key management
View docs

OpenAI-compatible API

OpenAI-style compatible entry point

SDK migration
/v1

Keeps common OpenAI paths and request semantics so existing client code can keep working after switching base_url to GlobalRouter.

Best for
Projects already using OpenAI SDKs, APIs, or OpenAI-style tooling
View docs

OpenRouter-compatible API

OpenRouter-style compatible entry point

Overseas aggregation
/api/v1

For OpenRouter integrations, covering models and providers, Chat/Text, images, videos, credits, generation metadata, and API key management.

Best for
Overseas sites, OpenRouter provider routing, usage.cost settlement, and model/provider display
View docs

Seedance-compatible API

Seedance and Doubao compatible entry point

Provider-native protocol
/doubao/api/v3

Keeps provider-compatible paths and task semantics for video, image, and asset calls while GlobalRouter handles billing and authentication.

Best for
Migrations from Seedance, Doubao, or Volcengine video generation protocols
View docs

First call

Calling POST /api/v1/chat/completions only requires a Bearer token, model ID, and messages. Set stream to true for SSE streaming responses.

curl "https://api.globalrouter.com/api/v1/chat/completions" \
  -H "Authorization: Bearer $GR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3-32b",
    "messages": [
      { "role": "user", "content": "Introduce GlobalRouter in three sentences." }
    ],
    "stream": false
  }'