packages/kilo-docs/pages/gateway/index.md
The Kilo AI Gateway provides a unified, OpenAI-compatible API to access hundreds of AI models through a single endpoint at https://api.kilo.ai/api/gateway. It gives you the ability to track usage, manage costs, bring your own API keys, and enforce organization-level controls.
The gateway works seamlessly with the Vercel AI SDK, the OpenAI SDK, or any OpenAI-compatible client in any language.
/chat/completions endpoint -- switch models by changing a single stringimport { streamText } from "ai"
import { createOpenAI } from "@ai-sdk/openai"
const kilo = createOpenAI({
baseURL: "https://api.kilo.ai/api/gateway",
apiKey: process.env.KILO_API_KEY,
})
const result = streamText({
model: kilo.chat("anthropic/claude-sonnet-4.5"),
prompt: "Why is the sky blue?",
})
All gateway API requests use the following base URL:
https://api.kilo.ai/api/gateway