Run Claude Code and the Claude Agent SDK on an open model
denv's endpoint now speaks Anthropic's Messages API. Point Claude Code or the Agent SDK at it with one base URL and run on Qwen3.8 27B, with thinking budgets that hold and tool calls that stream. What works, what we measured, and where a 27B model is not Sonnet.
Many teams built their agents on Anthropic's tools: Claude Code, the Claude Agent SDK, the Messages API. Those tools talk to one address. Change it, and the same agent runs somewhere else.
As of today, that somewhere can be denv. Our shared endpoint, https://api.run.denv.ai, accepts Anthropic's Messages API alongside OpenAI's, and serves Qwen3.8 27B on our own H100s at $0.10 per million input tokens and $2.00 per million output tokens.
Why this was hard on other open-model hosts
We build sites with the Claude Agent SDK at JustCopy, and in September we tried to move that agent onto open models through the usual hosts. Two things broke it:
- Thinking budgets were ignored. The agent asks for, say, 2,048 tokens of thinking. Open-weight reasoning models on the hosts we tried thought for as long as they liked, so a build was a coin flip between 40 seconds and a page cut off mid-file.
- Streamed tool input was dropped. The agent writes files through tool calls and shows progress as the arguments stream in. Routes that translated between API formats delivered the arguments all at once, or not at all.
So the agent stayed on closed models. Those two properties are what we checked first on denv.
What we measured
On denv's endpoint, Qwen3.8 27B on vLLM 0.32, October 31, 2026:
| Check | Result |
|---|---|
| Thinking budget 1,024 tokens | about 900 tokens of thinking, then the answer |
| Thinking budget 2,048 tokens | about 1,900 tokens of thinking, then the answer |
Thinking off ({"type": "disabled"}) |
no thinking block; a 5-word answer took 7 output tokens |
| Streamed tool use | arguments arrive as input_json_delta events, token by token |
/v1/messages/count_tokens |
answered, and not charged |
Then the real thing: unmodified Claude Code, pointed at denv with the variables below, asked to "Create index.html: a simple, good-looking landing page for a bakery called Flour & Flame, with a hero, three products and a footer." It planned, wrote the file through its Write tool, and finished in 18 seconds. This is the page, unedited:

And the speed, from our load test on one H100 with natural prompts: 196 output tokens a second with one request in flight, 130 a second per request with 16 in flight (1,817 a second for the GPU), first token in about 0.3 seconds.
Point Claude Code at denv
Get a key in the console (new accounts get $5 of credit), then:
export ANTHROPIC_BASE_URL=https://api.run.denv.ai
export ANTHROPIC_AUTH_TOKEN=dsk_... # your denv key
export ANTHROPIC_MODEL=qwen/qwen3.8-27b
export ANTHROPIC_SMALL_FAST_MODEL=qwen/qwen3.8-27b
export CLAUDE_CODE_EFFORT_LEVEL=medium # optional: low, medium or high (default high)
claude
Or the Agent SDK
The SDK runs Claude Code underneath, so the same variables apply to the process it starts:
import { query } from '@anthropic-ai/claude-agent-sdk'
for await (const message of query({
prompt: 'Create index.html with a landing page for a bakery',
options: {
model: 'qwen/qwen3.8-27b',
thinking: { type: 'enabled', budgetTokens: 2048 },
env: {
...(process.env as Record<string, string>),
ANTHROPIC_BASE_URL: 'https://api.run.denv.ai',
ANTHROPIC_AUTH_TOKEN: process.env.DENV_API_KEY ?? '',
},
},
})) {
if (message.type === 'result') console.log(message.result)
}
Or call it directly
curl https://api.run.denv.ai/v1/messages \
-H "x-api-key: $DENV_API_KEY" -H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"qwen/qwen3.8-27b","max_tokens":1024,
"thinking":{"type":"enabled","budget_tokens":1024},
"messages":[{"role":"user","content":"Plan a 3-page site for a dental clinic."}]}'
What this does not mean
- A 27B model is not Sonnet. On long, many-file agent tasks a frontier model makes fewer mistakes. Keep a frontier model as the fallback: our own setup moves a turn to Sonnet the moment denv answers that it is at capacity or has no replica, without the SDK's retries.
- The price gap is large, the quality gap is task-dependent. Sonnet 5 lists at $2 in and $10 out per million tokens; Qwen3.8 27B on denv is $0.10 and $2.00. Whether the cheaper model is good enough is something to measure on your own tasks, not to assume.
- This is our first week. JustCopy's site builder moves its builds onto denv next, with Sonnet as the fallback. We will publish what share of builds stay on denv, how long they take and what they cost, whichever way it goes.
Try it
Sign up at console.denv.ai with GitHub, get $5 of credit, and point one agent at https://api.run.denv.ai. If you run agents on your own GPUs instead, denv deploys the same setup to your cloud, free up to 8 GPUs: see pricing.