Auto-route via the autorouter (recommended). Make a single GET https://autorouter.polargrid.ai/v1/route to discover the best edge for the caller — by default the nearest edge in the caller’s country (falling back to a network-aware cross-border pick if that country has no edge) — then use the returned endpoint as the base URL for all subsequent requests. Pass ?scope=global to route to the nearest edge worldwide instead, ignoring borders. This is what the SDKs do internally — see Regions.
Pin a specific region. Skip the autorouter and hit https://api.{region}.edge.polargrid.ai directly when you need predictable routing.
autorouter.polargrid.ai is a discovery service, not an inference proxy. It serves GET /v1/route only. Sending POST /v1/chat/completions (or any other inference verb) to the autorouter returns 403 — CloudFront on that distribution only allows cacheable requests.
The model-lifecycle and GPU endpoints below act on node-global, multi-tenant state. They require a superadmin-scoped credential issued only to PolarGrid operators — standard pg_* API keys receive 403 Forbidden. You never need these for inference; models are pre-deployed per region (see Model Loading and GPU).
Most POST requests accept JSON. The exception is speech-to-text (POST /v1/audio/transcriptions), which takes a multipart/form-data file upload with its options as query parameters — see Speech to Text.
PolarGrid’s REST API follows OpenAI’s endpoint structure and request/response formats, so tools that speak the OpenAI wire protocol (e.g., curl, LangChain, LiteLLM) can target PolarGrid with a base URL change.The PolarGrid Python and JavaScript SDKs use their own method signatures (e.g., client.chat_completion({...}) instead of client.chat.completions.create(...)) and are not drop-in replacements for the OpenAI SDK. See the SDK docs for details.Known limitations vs. OpenAI:
The gateway processes tools and parses tool_calls from model output, but the currently deployed model (qwen-3.8-27b) has limited tool-calling reliability. See Chat Completions.
Image / vision input (image_url content parts)
Limited
Supported on vision-capable models on vision-enabled nodes — currently qwen-3.6-35b-a3b on the sfo-02 staging node. Text-only models return 400 for image content. See Chat Completions → Vision.
response_format default for TTS
Differs
REST defaults to pcm; OpenAI defaults to mp3. The PolarGrid SDKs default to mp3 (batch) / opus (streaming) for parity. Pass response_format explicitly to avoid surprises.
Streaming TTS formats
Partial
Only pcm and opus are streamable. wav and mp3 are batch-only.