Changelog
ChangelogAI

AI Gateway

AI Gateway lets you route inference requests to the customer's AI provider. The prompts, the quota, and the bill stay with them, and your backend keeps one integration. The difference is a prefix on the model ID:

src/ai.ts
const ai = new OpenAI({
  baseURL: "https://ai.alien.dev/v1",
  apiKey: process.env.ALIEN_AI_API_KEY,
  defaultHeaders: { "X-Alien-External-ID": customer.id },
})

await ai.chat.completions.create({
  model: "byo/claude-opus-5", 
  messages,
})

byo/ says the model runs in the customer's own account. The gateway removes the prefix and calls whichever provider they connected:

byo/claude-opus-5
├── connected AWS           → Claude on Bedrock, in their account and region
├── connected Google Cloud  → Claude on Vertex AI, in their project
├── connected Azure         → Claude on AI Foundry, in their subscription
├── pasted an Anthropic key → Claude on the Anthropic API
└── connected Databricks    → Claude in their Databricks workspace

One model ID, one request body, five different companies' bills. Your backend never holds an AWS role, a Google credential, an Azure credential, or a provider API key. The model publisher and the service running the model are not the same thing, and the customer picks the second one.

Choose the models your product calls in Infrastructure → Models. The catalog carries 54 models from 11 publishers across Bedrock, Vertex AI, AI Foundry, Anthropic, OpenAI, and Databricks. Customers then connect through a link you create for the ID you already know them by:

alien onboard "Acme" --external-id org_123 --setup-items models

A connected account does not mean every model is ready. Availability belongs to the connection, and some models need a one-time activation, like accepting the Marketplace terms for Claude in the Foundry portal.

  • Keep your client API: OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages
  • Diagnostics without the contents: alien logs --source ai-gateway records routing and outcome, never prompts or responses
  • Usage as a privacy-safe aggregate: alien usage ai --range 7d for counts, tokens, estimated cost, and latency

Read the docs →

Alon GubkinItamar ZandDan Lilienblum
Alon +2