Skip to content
extraorbital
Documentation ExtraOrbital
Browse documentation

AI & speech

AI Gateway

Add access to AI models through OpenRouter.

Run in your project folder
npx extraorbital add ai

You receive a gateway key, not a direct provider account. All team keys share a budget.

  1. 01 / Run the commandGet the service
  2. 02 / Read your .envUse its credentials
  3. 03 / Connect your appCall the SDK or API

Limits

LimitFree · PrototypePaid
ModelsSmall modelsEvery model
Spend$5.00, once per accountShared team credit or budget

Free allowances are shared across the account. Provider limits still apply on paid plans.

Use it

OpenAI-compatible example:

agent.ts
import OpenAI from "openai";

// Reads OPENROUTER_API_KEY and OPENROUTER_BASE_URL from the environment.
const client = new OpenAI({
  apiKey: process.env.OPENROUTER_API_KEY,
  baseURL: process.env.OPENROUTER_BASE_URL,
});

const response = await client.chat.completions.create({
  model: "anthropic/claude-opus-5",
  messages: [{ role: "user", content: "Draft a status report from these logs." }],
});

The gateway also supports Anthropic Messages. See SDK recipes for compatible clients.

Environment variables

The CLI writes these to .env or an existing .env.local.

VariablePurpose
OPENROUTER_BASE_URLOpenRouter API endpoint
OPENROUTER_API_KEYPrivate gateway key

Specifics

Options

Terminal
npx extraorbital add ai [--slug <name>]
FlagDefaultDescription
--slugdefaultA second key, for a second agent

Model ids

Every model is named author/slug:

Output
anthropic/claude-opus-5
openai/gpt-5.2
google/gemini-3-pro

Append :free for a free variant where one exists, and ~author/…-latest for an alias that follows the newest release. The model list has all of them with current prices.

Budget

All team keys share one budget. --max-budget is accepted for compatibility but does not set a per-key limit.

Top-ups increase available credit. Imported usage from other services reduces it. Enable a hard cap in the dashboard to block gateway requests at your limit; raising the cap restores access with the same keys.

If you asked for a provider key

extraorbital add openai creates an OpenRouter key and writes an OpenAI-compatible base URL. It exits 8 to report the substitution. Other requested resources are processed first. Review model IDs and SDK compatibility before using the key.

Providers and keys lists every variable name this applies to and what gets written for each.

Pricing

UsagePaid rate
ModelsEvery model
SpendModel list price

See pricing for team subscription fees, allowances, and billing terms. Plans and billing ↗