Baltor Get started

Endpoints

Cloudflare Workers AI

A hosted service with its own key and prices. This page lists the addresses it answers, the facts its documentation states, and the setup of each harness.

Addresses and facts

  • OpenAI Chat Completions: https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/ai/v1 models.dev, read
Authentication
Authorization: Bearer, with the key in CLOUDFLARE_ACCOUNT_ID models.dev, read
Structured output
Unknown
Tool calling
18 of 27 listed models The share of this provider's models that models.dev records with tool calling. models.dev, read
Rate limits
Unknown
Prices
Unknown
Data retention
Unknown
Documentation
Read the page models.dev, read
Output limits Baltor recorded
Unknown

Harness setup

Replace @cf/aisingapore/gemma-sea-lion-v4-27b-it with the model you want.

OpenCode

Put this in opencode.json in your project folder:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "cloudflare-workers-ai": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Cloudflare Workers AI",
      "options": {
        "baseURL": "https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/ai/v1",
        "apiKey": "{env:CLOUDFLARE_ACCOUNT_ID}"
      },
      "models": {
        "@cf/aisingapore/gemma-sea-lion-v4-27b-it": {
          "name": "@cf/aisingapore/gemma-sea-lion-v4-27b-it"
        }
      }
    }
  }
}
  • OpenCode reads any OpenAI-compatible address through the @ai-sdk/openai-compatible package, and an address that speaks the Responses API through @ai-sdk/openai.

From OpenCode documentation, read .

Pi

Put this in ~/.pi/agent/models.json:

{
  "providers": {
    "cloudflare-workers-ai": {
      "baseUrl": "https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/ai/v1",
      "api": "openai-completions",
      "apiKey": "$CLOUDFLARE_ACCOUNT_ID",
      "models": [
        {
          "id": "@cf/aisingapore/gemma-sea-lion-v4-27b-it"
        }
      ]
    }
  }
}
  • The apiKey field can name an environment variable as $NAME.

From Pi documentation, read .

Codex

Codex speaks only the Responses API, and Cloudflare Workers AI documents no Responses address. A gateway that offers one can sit in between.

  • Codex speaks the Responses API only: responses is the one supported wire API of a custom provider. Ollama and LM Studio are built in and start with --oss.

From Codex documentation, read .

Claude Code

Claude Code sends Anthropic Messages requests, and Cloudflare Workers AI documents no such address. A gateway that translates to that API can sit in between.

  • Claude Code sends Anthropic Messages requests to ANTHROPIC_BASE_URL. Anthropic says it does not support routing Claude Code to models other than Claude through any gateway, so some features may not work with another model.

From Claude Code documentation, read .

Models it lists

Prices in US dollars per million tokens, input and output, as models.dev, read records them.

ModelInputOutputContextAs of
Gemma Sea Lion V4 27B It @cf/aisingapore/gemma-sea-lion-v4-27b-it0.351 USD0.555 USD128,000 older than 30 days
Deepseek R1 Distill Qwen 32B @cf/deepseek-ai/deepseek-r1-distill-qwen-32b0.497 USD4.88 USD80,000 older than 30 days
DeepSeek V4 Flash 0731 @cf/deepseek-ai/deepseek-v4-flash-07310.440 USD1.32 USD1,310,720 older than 30 days
DeepSeek V4 Pro 0813 @cf/deepseek-ai/deepseek-v4-pro-08131.32 USD3.96 USD1,048,576 older than 30 days
Gemma 4 26B A4B IT @cf/google/gemma-4-26b-a4b-it0.100 USD0.300 USD256,000 older than 30 days
Granite 4.0 H Micro @cf/ibm-granite/granite-4.0-h-micro0.017 USD0.112 USD131,000 older than 30 days
Llama 3.1 8B Instruct fp8 @cf/meta/llama-3.1-8b-instruct-fp80.152 USD0.287 USD32,000 older than 30 days
Llama 3.2 11B Vision Instruct @cf/meta/llama-3.2-11b-vision-instruct0.049 USD0.676 USD128,000 older than 30 days
Llama 3.2 1B Instruct @cf/meta/llama-3.2-1b-instruct0.027 USD0.201 USD60,000 older than 30 days
Llama 3.2 3B Instruct @cf/meta/llama-3.2-3b-instruct0.051 USD0.335 USD80,000 older than 30 days
Llama 3.3 70B Instruct fp8 Fast @cf/meta/llama-3.3-70b-instruct-fp8-fast0.293 USD2.25 USD24,000 older than 30 days
Llama 4 Scout 17B 16E Instruct @cf/meta/llama-4-scout-17b-16e-instruct0.270 USD0.850 USD131,000 older than 30 days
Llama Guard 3 8B @cf/meta/llama-guard-3-8b0.484 USD0.030 USD131,072 older than 30 days
Mistral Small 3.1 24B Instruct @cf/mistralai/mistral-small-3.1-24b-instruct0.351 USD0.555 USD128,000 older than 30 days
Kimi K2.6 @cf/moonshotai/kimi-k2.60.950 USD4.00 USD262,144 older than 30 days
Kimi K2.7 Code @cf/moonshotai/kimi-k2.7-code0.950 USD4.00 USD262,144 older than 30 days
Nemotron 3 Super 120B @cf/nvidia/nemotron-3-120b-a12b0.500 USD1.50 USD256,000 older than 30 days
GPT OSS 120B @cf/openai/gpt-oss-120b0.350 USD0.750 USD128,000 older than 30 days
GPT OSS 20B @cf/openai/gpt-oss-20b0.200 USD0.300 USD128,000 older than 30 days
Qwen2.5 Coder 32B Instruct @cf/qwen/qwen2.5-coder-32b-instruct0.660 USD1.00 USD32,768 older than 30 days
Qwen3 30B A3b fp8 @cf/qwen/qwen3-30b-a3b-fp80.051 USD0.335 USD32,768 older than 30 days
Qwen3.8 27B @cf/qwen/qwen3.8-27b0.450 USD3.20 USD262,144 older than 30 days
Qwq 32B @cf/qwen/qwq-32b0.660 USD1.00 USD24,000 older than 30 days
GLM-4.7-Flash @cf/zai-org/glm-4.7-flash0.060 USD0.400 USD131,072 older than 30 days
Glm 5.2 @cf/zai-org/glm-5.21.40 USD4.40 USD262,144 older than 30 days
Glm 5.3 @cf/zai-org/glm-5.31.40 USD4.40 USD1,310,720 older than 30 days
Glm 5.3 Flash @cf/zai-org/glm-5.3-flash0.150 USD0.500 USD1,310,720

Sources of this page