If you run terminal coding agents (Claude Code, OpenCode, Goose, Cline, Roo Code) or 24/7 autonomous loops (OpenClaw, Dify, n8n), you already know where the bill actually goes.

It is rarely the one tricky architectural refactor. It is the 80% of turns spent reading files, running git diff, parsing test output, fixing lint errors, and re-sending a 60K–180K token prompt cache over and over again.

On closed flagship APIs, a single heavy coding day easily burns $25–$60. Worse, if you work on security testing, red-teaming, reverse engineering, or strict compliance tooling, mid-loop false-positive refusals break agent execution silently and force manual restarts.

Here is the exact two-tier setup we use and host at bf16.ai — an OpenAI Chat Completions, OpenAI Responses, and native Anthropic Messages gateway running open-weight 1M-context models with strict Zero Data Retention (ZDR) and zero preachy refusals.

1. The Real Numbers (Live /v1/models Pricing)

All five flagship endpoints share a 1,048,576-token (1M) context window, support deterministic tool calling + structured JSON schema, and expose cached input discounts:

Model ID Context Max Output Input / 1M Output / 1M Cached Input / 1M Best Fit
deepseek/deepseek-v4.1-flash-uncensored 1M 130K $0.26 $1.00 $0.045 24/7 autonomous bots, background triage, batch pipelines
deepseek/deepseek-v4.1-flash-uncensored-fast 1M 130K $0.28 $1.12 $0.055 Interactive terminal coding loops (low-TTFT fast tier)
zai-org/glm-5.3-flash-uncensored 1M 131K $0.30 $1.12 $0.065 Fast multilingual tool calling & IDE completions
zai-org/glm-5.3-uncensored 1M 131K $1.35 $4.20 $0.250 Mid-tier multi-file coding & deep debugging
moonshotai/kimi-k3.1-pro-uncensored 1M 131K $2.90 $9.90 $0.450 Heavy architecture, complex refactors, long-context reasoning

Two practical takeaways from production usage:

  1. Prompt caching dominates agent costs. In a 30-turn Claude Code or OpenCode loop over a 100K-token repo snapshot, cached input drops DeepSeek V4.1 Flash Fast down to $0.055 / 1M tokens.
  2. Split Architect vs. Worker turns. Use deepseek/deepseek-v4.1-flash-uncensored-fast for the high-frequency read/edit/test loop, and escalate only complex specs or tricky root-cause debugging to moonshotai/kimi-k3.1-pro-uncensored or zai-org/glm-5.3-uncensored.

You can query the live machine-readable catalog (including pricing and capabilities) without an API key:

curl -s https://api.bf16.ai/v1/models | jq '.data[] | {id, context_window, pricing}' 

2. One Protocol Gotcha That Trips Up Most Developers

When connecting clients to an API gateway that speaks both OpenAI and Anthropic protocols, watch the trailing /v1:

  • OpenAI Chat Completions / Responses clients (OpenCode, Goose, Cline, Roo Code, Zed, Dify, n8n, SillyTavern):
 https://api.bf16.ai/v1 
  • Native Anthropic Messages clients (Claude Code, Anthropic SDK):
 https://api.bf16.ai 

(No trailing /v1 — the Anthropic SDK appends /v1/messages automatically. Adding /v1 produces /v1/v1/messages and a 404.)

3. Drop-In Configurations (Zero Vendor Lock-In)

Option A: One-Command CLI Setup (bf16-setup)

If you use Claude Code, OpenCode, Goose, Codex, Zed, or Qwen Code, we open-sourced a zero-dependency Node.js configurator (MIT license) that prints exact config diffs or verifies your endpoint:

# Preview generated config for Claude Code or OpenCode npx github:BF16-AI/bf16-setup --client claude-code npx github:BF16-AI/bf16-setup --client opencode # Run a live /v1/models + chat completion smoke test BF16_API_KEY="sk-bf16-..." npx github:BF16-AI/bf16-setup --verify 

Source code: github.com/BF16-AI/bf16-setup

Option B: Claude Code (Native Anthropic Messages Endpoint)

Because api.bf16.ai speaks native Anthropic Messages (/v1/messages, including prompt caching headers, streaming SSE, and tool-use blocks), you can point Claude Code straight at it with standard environment variables:

export ANTHROPIC_BASE_URL="https://api.bf16.ai" export ANTHROPIC_AUTH_TOKEN="sk-bf16-your-key" export ANTHROPIC_MODEL="deepseek/deepseek-v4.1-flash-uncensored-fast" export ANTHROPIC_SMALL_FAST_MODEL="deepseek/deepseek-v4.1-flash-uncensored" claude 

For heavy architectural sessions, swap ANTHROPIC_MODEL to moonshotai/kimi-k3.1-pro-uncensored while keeping ANTHROPIC_SMALL_FAST_MODEL on deepseek/deepseek-v4.1-flash-uncensored for cheap sub-tasks.

Option C: OpenCode (~/.config/opencode/opencode.json)

{ "$schema": "https://opencode.ai/config.json", "provider": { "bf16": { "npm": "@ai-sdk/openai-compatible", "name": "bf16.ai", "options": { "baseURL": "https://api.bf16.ai/v1", "apiKey": "{env:BF16_API_KEY}" }, "models": { "deepseek/deepseek-v4.1-flash-uncensored-fast": { "name": "DeepSeek V4.1 Flash Fast (1M)" }, "moonshotai/kimi-k3.1-pro-uncensored": { "name": "Kimi K3.1 Pro (1M)" }, "zai-org/glm-5.3-uncensored": { "name": "GLM-5.3 (1M)" } } } }, "model": "bf16/deepseek/deepseek-v4.1-flash-uncensored-fast" } 

Option D: Block Goose (~/.config/goose/config.yaml)

GOOSE_PROVIDER: openai OPENAI_HOST: https://api.bf16.ai/v1 GOOSE_MODEL: deepseek/deepseek-v4.1-flash-uncensored-fast 

Run with your key exported:

export OPENAI_API_KEY="sk-bf16-your-key" goose session 

Option E: Open-Source Integrations (Dify, SillyTavern, OpenClaw)

We also published standalone MIT-licensed integrations under github.com/BF16-AI so you don't need to wait on upstream merge queues:

4. Honest Trade-Offs (When NOT to Use This)

To save you testing time, here is where open-weight fast tiers still have clear boundaries:

  1. Don't expect a $0.28/M flash model to beat a $15/M frontier model on single-shot ambiguous architecture. Keep Flash Fast on tight, verifiable feedback loops (unit tests, typecheck, linter, small scoped diffs) and route ambiguous greenfield design to kimi-k3.1-pro-uncensored or your preferred flagship.
  2. Zero Data Retention means zero server-side prompt logs. If you rely on a provider's web console to replay past prompt/response payloads for debugging, log them locally in your own agent harness (e.g., LiteLLM proxy or OpenCode local session logs) — we do not retain prompt bodies.
  3. Pay-as-you-go prepaid credits. Every new account starts with $0.20 in free starter credit (no credit card required), which is enough for ~200K–500K tokens of real tool-calling benchmarks on deepseek-v4.1-flash-uncensored-fast before deciding whether to top up.

Full setup guides for 34 clients (Claude Code, OpenCode, Goose, Zed, Windsurf, Cursor, Cline, Roo Code, Kilo Code, Aider, OpenHands, Dify, n8n, SillyTavern, and more) are live at bf16.ai/docs/clients.

Happy hacking — if you run into any protocol edge cases with a specific coding agent or MCP harness, drop the client name and request shape in the comments and we'll test it directly.