Skip to main content
HomeAPI DocsPricing

API reference

API Documentation

OpenAI-compatible chat completions on Cloudflare's global edge. Drop our base URL into any OpenAI SDK and you're live in minutes.

Base URL

Use this as the base URL in any OpenAI-compatible SDK or HTTP client.

https://api.llm.kiwi/v1

Endpoint: POST /v1/chat/completions

Auth: Authorization: Bearer sk_kiwi_...

Content-Type: application/json

Quickstart

Three steps from zero to first response.

1

Create an account

Sign in with Google or GitHub at llm.kiwi — no credit card required.

2

Get your API key

Open the dashboard, go to API Keys, and create a key starting with sk_kiwi_...

3

Send your first request

Point any OpenAI SDK to our base URL, drop in your key, and set model to auto.

Models

Use auto for everything unless you have a specific reason to pin a model.

auto

Routes to the best available model. Automatically stays current as new models ship — no code changes needed.

hrllm

Pin this only when you specifically need hrllm behavior in a tested workflow.

Code examples

Ready-to-run snippets — swap in your real API key.

cURL

curl -X POST "https://api.llm.kiwi/v1/chat/completions" \
  -H "Authorization: Bearer sk_kiwi_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Python (openai SDK)

import openai

client = openai.OpenAI(
    base_url="https://api.llm.kiwi/v1",
    api_key="sk_kiwi_...",
)

response = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

JavaScript / TypeScript

const res = await fetch("https://api.llm.kiwi/v1/chat/completions", {
  method: "POST",
  headers: {
    Authorization: "Bearer sk_kiwi_...",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "auto",
    messages: [{ role: "user", content: "Hello!" }],
  }),
});
const data = await res.json();

API keys

Keys are created and revoked from your dashboard. Keep production keys server-side — never expose them in client-side code or public repositories.

Each key starts with sk_kiwi_ and can be labelled and rotated independently.

Tools Reference
Agents Reference