← All use cases

60/min beta rate envelope

Agents that stay up

Low-latency tool loops, streaming, and spend guardrails for autonomous workloads.

An agent loop is a token furnace: every tool call appends to the transcript, so the prompt grows with each turn. Cached prefixes bill at the cached rate — on GLM-5.3 (`glm-5.3`) that is $0.26/1M cached input against $1.40/1M uncached input and $4.40/1M output.

Route the hot loop to a Flash-class model and escalate hard reasoning to frontier weights under the same key. DeepSeek V4.1 Flash (`deepseek-v4-flash`) is the throughput choice: 1.05M context, a measured 218 tok/s, $0.22/1M input and $0.66/1M output. GLM-5.3 (`glm-5.3`) is the frontier choice: 203K context, function calling, $1.40/1M input and $4.40/1M output.

Long tool traces are a context problem first. DeepSeek's 1.05M window holds more transcript than GLM's 203K, so a loop that accumulates retrieval results or shell output should not be pinned to the smaller window. Throughput is the second constraint: bursty tool calls benefit from the measured 218 tok/s, while the frontier model is reserved for the reasoning steps that need it.

Guardrails decide whether the agent stays up: hard spend limits return 402s, per-key scopes and IP allowlists bound what a loop can reach, and request logs preserve an audit trail. Start with the agent setup guide, then set the spend limit before the first autonomous run.

Keep exploring