Skip to content
extraorbital
Documentation ExtraOrbital
Browse documentation

AI & speech

Providers and keys

See which provider variables the CLI replaces with gateway credentials.

When asked for a provider key, the CLI creates an OpenRouter gateway key instead. It does not create an account or key with that provider.

Terminal
npx extraorbital add openai
Output
✓ Provisioned openrouter/default (small models · $5.00 allowance)
✓ Wrote 4 variables to .env

  OPENROUTER_BASE_URL, OPENROUTER_API_KEY, OPENAI_BASE_URL, OPENAI_API_KEY

! openai — an OpenAI key is answered by the AI Gateway

  OpenAI models are served through the AI Gateway. OPENAI_BASE_URL and
  OPENAI_API_KEY now point at it, so your OpenAI SDK works unchanged — prefix
  model ids with the author, e.g. openai/<model>.

The substitute only works where the project sends it to the gateway, so the exit code depends on whether anything reads the base URL:

  • Warning, exit 0: OPENAI_BASE_URL appears in your source or .env.example, or the project depends on an SDK that reads it by itself (openai, @ai-sdk/openai; for Anthropic, @anthropic-ai/sdk, @ai-sdk/anthropic, @extraorbital/anthropic).
  • Error, exit 8: nothing reads it, so the key would go to api.openai.com, which refuses it. The credentials are still written.
  • Error, exit 8: a provider the gateway cannot impersonate (Gemini, Cohere, Bedrock and the others without compatibility variables), whatever the project reads.

Every recognised key

ProviderRecognised keysModel idsAlso written
OpenAIOPENAI_API_KEYopenai/…OPENAI_BASE_URLOPENAI_API_KEY
AnthropicANTHROPIC_API_KEYANTHROPIC_AUTH_TOKENanthropic/…, ~anthropic/…ANTHROPIC_BASE_URLANTHROPIC_API_KEY
Google GeminiGEMINI_API_KEYGOOGLE_GENERATIVE_AI_API_KEYGOOGLE_API_KEYgoogle/…Nothing — the gateway does not speak this API
xAIXAI_API_KEYGROK_API_KEYx-ai/…XAI_BASE_URLXAI_API_KEY
MistralMISTRAL_API_KEYmistralai/…MISTRAL_BASE_URLMISTRAL_API_KEY
DeepSeekDEEPSEEK_API_KEYdeepseek/…DEEPSEEK_BASE_URLDEEPSEEK_API_KEY
Meta LlamaLLAMA_API_KEYmeta-llama/…, meta/…Nothing — the gateway does not speak this API
QwenDASHSCOPE_API_KEYQWEN_API_KEYqwen/…Nothing — the gateway does not speak this API
MoonshotMOONSHOT_API_KEYmoonshotai/…MOONSHOT_BASE_URLMOONSHOT_API_KEY
Z.aiZAI_API_KEYZHIPUAI_API_KEYz-ai/…Nothing — the gateway does not speak this API
MiniMaxMINIMAX_API_KEYminimax/…Nothing — the gateway does not speak this API
Nous ResearchNOUS_API_KEYnousresearch/…Nothing — the gateway does not speak this API
CohereCOHERE_API_KEYCO_API_KEYcohere/…Nothing — the gateway does not speak this API
PerplexityPERPLEXITY_API_KEYPPLX_API_KEYperplexity/…PERPLEXITY_BASE_URLPERPLEXITY_API_KEY
GroqGROQ_API_KEY—GROQ_BASE_URLGROQ_API_KEY
Together AITOGETHER_API_KEY—TOGETHER_BASE_URLTOGETHER_API_KEY
Fireworks AIFIREWORKS_API_KEY—FIREWORKS_BASE_URLFIREWORKS_API_KEY
CerebrasCEREBRAS_API_KEY—CEREBRAS_BASE_URLCEREBRAS_API_KEY
Amazon BedrockAWS_BEARER_TOKEN_BEDROCKamazon/…Nothing — the gateway does not speak this API

The Also written column shows compatibility variables. OpenAI and Anthropic SDKs can use gateway URLs. Native Gemini, Cohere, and Bedrock clients cannot; those variables are left unfilled.

To call those models, use an OpenAI-compatible client or a supported SDK.

What autopilot does

extraorbital provision reads the same list. A project declaring GEMINI_API_KEY in its .env.example gets one gateway resource, an explanation, and exit 8, since Gemini's own SDK cannot use the gateway:

Output
Provisioning 2 resources for .

  openrouter  GEMINI_API_KEY · declared in .env.example · via the AI Gateway
  mongo       MONGODB_URI · declared in .env.example

✓ Provisioned openrouter/default
✓ Provisioned mongo/default

✗ GEMINI_API_KEY — cannot be provisioned

  Google Gemini models are served through the AI Gateway, which does not speak
  Google Gemini's own API. Call them through the gateway with an
  OpenAI-compatible client or the Vercel AI SDK.

Multiple detected providers share one gateway resource.

What gets written where

The environment block records the requested providers so later runs preserve their compatibility variables:

.env
# >>> extraorbital resource=openrouter project=cosmic-otter slug=default compat=openai
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
OPENROUTER_API_KEY=sk-or-v1-9c4e17b2…
OPENAI_BASE_URL=https://openrouter.ai/api/v1
OPENAI_API_KEY=sk-or-v1-9c4e17b2…
# <<< extraorbital resource=openrouter

Both key variables hold the same gateway credential. OPENAI_API_KEY is the name the OpenAI SDK reads.

Placeholder lines are commented out before new values are added. This prevents dotenv from reading an empty first definition.

Next

  • Models — what each provider offers, with prices
  • SDK recipes — the code for each