Models

Atlas with Cloudflare Workers AI in 2026: The Cheapest Input Token in the Registry

Updated 7 min read

Cloudflare Workers AI runs inference on Cloudflare's edge network, and it carries the single cheapest input price in the Atlas registry: IBM Granite 4.0 H Micro at $0.017 per Mtok. Inside Atlas, the terminal-native coding agent, Cloudflare Workers AI is the pick when you want a near-free small_model and a reasonable coding model on the same account. Pricing runs Granite 4.0 H Micro $0.017/$0.112 per Mtok, GLM-4.7-Flash $0.0605/$0.40, GPT OSS 20B $0.20/$0.30, GPT OSS 120B $0.35/$0.75, and Kimi K2.7 Code $0.95/$4.00.

What is Cloudflare Workers AI best at inside Atlas?

Cloudflare Workers AI is best inside Atlas as the cheap slot. IBM Granite 4.0 H Micro at $0.017/$0.112 per Mtok across a 131,000 token window is the cheapest input token in the 2026 registry, which makes it a natural `small_model` for titles and subagent summaries.

Atlas fans out work to subagents that can run in the foreground or in parallel background sessions, and every one of those subagents generates summary traffic. On most providers that overhead is a rounding error you still pay for. On Cloudflare Workers AI with Granite 4.0 H Micro, $0.017 per Mtok of input pushes title, summary, and subagent overhead to near zero. The second draw is GLM-4.7-Flash at $0.0605/$0.40 per Mtok, which gives you a reasoning model on the edge for under a tenth of a cent per million input tokens. Auth is scoped to a Cloudflare account you may already have, and requests terminate at the nearest edge PoP rather than a single region.

What context window does Cloudflare Workers AI give Atlas?

Cloudflare Workers AI tops out at 262,144 tokens on Kimi K2.7 Code and GLM-5.2, and 256,000 tokens on Nemotron 3 Super 120B and Gemma 4 26B A4B. Kimi K2.7 Code at $0.95/$4.00 per Mtok is the agentic coding slot in the 2026 catalog.

The headline numbers are healthy, but Cloudflare Workers AI trims context relative to other hosts across much of the rest of the catalog. Qwen3 30B A3B is 32,768 tokens here, Llama 3.3 70B fp8 Fast is 24,000, and QwQ 32B is 24,000. A 24,000 token window is not enough for a serious Atlas build session on a large repository. Check the specific row before you pin it. Atlas mitigates small windows structurally: Atlas indexes code by AST declarations using tree-sitter, not blind line windows, and searches code with hybrid semantic and keyword retrieval fused by reciprocal rank fusion, so it feeds the model targeted declarations rather than whole files.

Is Cloudflare Workers AI cheaper than other hosts for the same weights?

Not always. GPT OSS 120B costs $0.35/$0.75 per Mtok on Cloudflare Workers AI versus $0.037/$0.17 on DeepInfra, so the same weights are roughly 9x more expensive on input. Cloudflare Workers AI wins on Granite 4.0 H Micro at $0.017/$0.112, and loses on popular open-weights rows.

The lesson for an Atlas user is that Cloudflare Workers AI is not uniformly cheap, it is extremely cheap in a specific place. IBM Granite 4.0 H Micro at $0.017 per Mtok input has no competitor in the 2026 registry. GPT OSS 120B at $0.35/$0.75 per Mtok is a bad deal against the DeepInfra listing of identical weights at $0.037/$0.17. So the natural configuration is a split: use Cloudflare Workers AI for the near-free small_model slot, and evaluate the build model on price per row rather than assuming the provider is cheap across the board.

How do I set up Atlas on Cloudflare Workers AI?

Setting up Atlas on Cloudflare Workers AI requires two env vars, not one: export both CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_KEY. The base URL is templated with the account ID, at https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/ai/v1, so a missing account ID breaks resolution.

Run `atlas models cloudflare-workers-ai` to confirm both env vars resolved before you go further. Once the catalog loads, pin `"model": "cloudflare-workers-ai/@cf/moonshotai/kimi-k2.7-code"` in atlas.json for the agentic coding slot, and set `"small_model": "cloudflare-workers-ai/@cf/ibm-granite/granite-4.0-h-micro"` to push title, summary, and subagent overhead to near zero. The `@cf/` prefix on model IDs is part of the Cloudflare naming scheme and must be included verbatim in atlas.json. Atlas permission-gates every tool call against allow, ask, and deny rules before it runs, so a cheap model driving the agent still cannot touch anything you have not allowed.

When should I pick a different provider than Cloudflare Workers AI?

Pick a different provider than Cloudflare Workers AI when your build model needs a long window on a mid-size open-weights model, because Cloudflare Workers AI trims Qwen3 30B A3B to 32,768 tokens and QwQ 32B to 24,000. Also switch when you want GPT OSS 120B, which is roughly 9x more expensive on input here.

Cloudflare Workers AI is a strong second provider and a weak sole provider. The catalog is deliberately small, which is either curation or a limitation depending on what you need. If you need frontier Anthropic, OpenAI, or Google models, Cloudflare Workers AI does not carry them. The pattern that works in Atlas is hybrid: keep `"small_model": "cloudflare-workers-ai/@cf/ibm-granite/granite-4.0-h-micro"` at $0.017/$0.112 per Mtok for the overhead traffic, and pin the build model wherever the specific weights you want are cheapest and widest. Atlas lets you switch the active model and provider on the fly with favorites and recents, so the split costs you nothing at the keyboard.

Setup

  1. 01Export both CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_KEY. The base URL is templated with the account ID: https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/ai/v1
  2. 02Run `atlas models cloudflare-workers-ai` to confirm both env vars resolved and the catalog loaded.
  3. 03Pin `"model": "cloudflare-workers-ai/@cf/moonshotai/kimi-k2.7-code"` in atlas.json for the agentic coding slot at $0.95/$4.00 per Mtok.
  4. 04Set `"small_model": "cloudflare-workers-ai/@cf/ibm-granite/granite-4.0-h-micro"` at $0.017/$0.112 per Mtok to push title, summary, and subagent overhead to near zero.
  5. 05Before pinning any other row, check its context: Qwen3 30B A3B is 32,768 tokens here, Llama 3.3 70B fp8 Fast is 24,000, and QwQ 32B is 24,000.

Frequently asked questions

how to use cloudflare workers ai with atlas
Export CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_KEY, run `atlas models cloudflare-workers-ai` to confirm both resolved, then pin `"model": "cloudflare-workers-ai/@cf/moonshotai/kimi-k2.7-code"` in atlas.json. The base URL is templated with your account ID.
what is the cheapest model for an ai coding agent
IBM Granite 4.0 H Micro on Cloudflare Workers AI at $0.017/$0.112 per Mtok across a 131,000 token window is the cheapest input token in the Atlas registry. It works well as the `small_model` for titles and subagent summaries.
how much does cloudflare workers ai cost per million tokens
Granite 4.0 H Micro is $0.017/$0.112 per Mtok, GLM-4.7-Flash is $0.0605/$0.40, GPT OSS 20B is $0.20/$0.30, GPT OSS 120B is $0.35/$0.75, and Kimi K2.7 Code is $0.95/$4.00.
what context window does cloudflare workers ai support
Cloudflare Workers AI reaches 262,144 tokens on Kimi K2.7 Code and GLM-5.2, and 256,000 tokens on Nemotron 3 Super 120B and Gemma 4 26B A4B. Other rows are trimmed: Qwen3 30B A3B is 32,768, and QwQ 32B is 24,000.
is gpt oss 120b cheaper on cloudflare workers ai or deepinfra
DeepInfra. GPT OSS 120B costs $0.35/$0.75 per Mtok on Cloudflare Workers AI versus $0.037/$0.17 on DeepInfra, roughly 9x more expensive on input for the same weights.
why does atlas fail to resolve cloudflare workers ai
Cloudflare Workers AI needs two env vars, not one. The base URL is templated with the account ID (https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/ai/v1), so both CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_KEY must be exported. Run `atlas models cloudflare-workers-ai` to check.
can cloudflare workers ai be my only model provider
Probably not. The Cloudflare Workers AI catalog is deliberately small and carries no frontier Anthropic, OpenAI, or Google models. It works best as the near-free small_model slot at $0.017/$0.112 per Mtok, paired with a build model chosen per row.

Try Atlas in your terminal

The terminal-native AI coding agent. Free core, single binary.

Install Atlas

Related guides

Atlas vs Cosine: Terminal AI Coding Agents in 2026

Comparing Atlas and Cosine for terminal AI coding in 2026. Atlas offers a free core and local privacy, while Cosine provides proprietary models and a cloud surface.

Atlas for dbt: Terminal-Native AI Coding in 2026

Atlas is a terminal-native AI coding agent for dbt. Read the ref() DAG, convert a table model to incremental, run dbt build against dev, and add tests in 2026.

Research a Third-Party API Before Integrating It with Atlas in 2026

How to research a third-party API with Atlas in 2026: websearch finds the current docs, webfetch pulls the page as markdown or text, and grep checks repo conventions.

Atlas vs Jules: Terminal AI Coding Agents in 2026

Atlas and Jules comparison for 2026. Atlas offers terminal-native TUI and local code indexing. Jules provides cloud VMs and a Critic agent for PR review.

Atlas vs Traycer in 2026: Terminal Agent That Writes Code vs a Planning Layer Above One

Atlas vs Traycer in 2026. Traycer plans and verifies but writes no code itself, so you pay it on top of an agent. Atlas plans and writes, free and open source.

Atlas vs Sourcery: Terminal AI Coding Agents in 2026

Compare Atlas and Sourcery for 2026. Atlas offers terminal-native AI coding with permission-gated tools and local embeddings. Sourcery provides Python-first LLM review and rules-based refactoring, starting at

Migrate a Deprecated API Across Every Callsite with Atlas (2026 Workflow)

How to migrate a deprecated API across every callsite with Atlas in 2026: the lsp tool's findReferences enumerates callers, todowrite tracks them, apply_patch migrates each one.

Atlas for Electron: Terminal-Native AI Coding for Main, Preload, and Renderer in 2026

Atlas is a terminal-native AI coding agent for Electron in 2026, where the main and renderer split, contextIsolation, and preload bridges are the security model.

Browse this resource hub