Cache-aware routing
Each conversation is routed to a GPU that may already hold its prompt prefix, so a turn usually prefills only what is new.
Inference API · By invitation
Chat, transcription and speech from open-weight models, on GPUs we run or rent. OpenAI- and Anthropic-compatible: change the base URL, keep your code.
https://api.tokenflow.dev/v1https://api.tokenflow.devcurl https://api.tokenflow.dev/v1/chat/completions \
-H "Authorization: Bearer $TOKENFLOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "qwen3.8-27b", "messages": [{"role": "user", "content": "Hello"}]}'import os
from openai import OpenAI
client = OpenAI(base_url="https://api.tokenflow.dev/v1", api_key=os.environ["TOKENFLOW_API_KEY"])
reply = client.chat.completions.create(model="qwen3.8-27b", messages=[{"role": "user", "content": "Hello"}])
print(reply.choices[0].message.content)import os
from anthropic import Anthropic
client = Anthropic(base_url="https://api.tokenflow.dev", api_key=os.environ["TOKENFLOW_API_KEY"])
reply = client.messages.create(model="qwen3.8-27b", max_tokens=1024, messages=[{"role": "user", "content": "Hello"}])
print(reply.content[0].text)import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.tokenflow.dev/v1", apiKey: process.env.TOKENFLOW_API_KEY });
const reply = await client.chat.completions.create({ model: "qwen3.8-27b", messages: [{ role: "user", content: "Hello" }] });
console.log(reply.choices[0].message.content);/v1/chat/completions/v1/responses/v1/messages/v1/audio/transcriptions /v1/audio/speechModels
Published reference prices in USD; your customer agreement governs fees. Limits, examples and live performance are on each model’s page.
| Model | Type | Good for | Price |
|---|---|---|---|
qwen3.8-27b | Language & chat | General chat, coding agents and tool use. Our default model. | $0.50 in$0.10 cached$3.00 out |
qwen3.8-27b-direct | Language & chat | Qwen3.8 27B with an adapter that declines fewer requests. | $0.50 in$0.10 cached$3.00 out |
qwen3.8-27b-cute | Language & chat | The direct model with a casual, short, emoji-friendly chat persona. | $0.50 in$0.10 cached$3.00 out |
gemma4-12b | Language & chat | Smaller and faster. Good for short chat, extraction and image questions. | $0.30 in$0.06 cached$1.80 out |
gemma4-12b-direct | Language & chat | Gemma 4 12B with an adapter that declines fewer requests. | $0.30 in$0.06 cached$1.80 out |
sensevoice-small | Speech to text | Transcribe short WAV recordings to text. | $0.054 / audio hour |
tokenflow-tts-1 | Text to speech | Generate speech from text using preset or described voices. | $1.00 / audio hour |
Features
Agents resend the same growing conversation on every turn. tokenflow is designed around that.
Each conversation is routed to a GPU that may already hold its prompt prefix, so a turn usually prefills only what is new.
If a node fails before your response starts, the request is retried on another node serving the same model, without your client doing anything. That node may run a different quantization.
OpenAI and Anthropic requests reach the engine in their own format. Tool calls, streaming events and usage come back as your SDK expects.
Every key’s usage is split into cached input, uncached input and output tokens, with monthly quotas per organization.
Up to 16 inline PNG, JPEG, WebP or GIF images per request, including screenshots that browser agents carry in their history.
Close the connection and generation stops on the GPU. Usage counts the input and the output sent so far, not the tokens that would have followed.
How it works
The gateway runs at the edge. The GPUs run wherever capacity is: our own hardware or rented servers.
Quickstart
Use the SDK you already have: the OpenAI SDK with https://api.tokenflow.dev/v1, the Anthropic SDK with https://api.tokenflow.dev. The quickstart has a first request in cURL, Python and TypeScript, the model list and the usual first errors.
Coding agents
Claude Code and Codex work on tokenflow with a few environment variables or one profile file. No proxy, no plugin.
Questions
tokenflow is available by invitation. Once you are in, an owner of your organization creates API keys in the console.
Tokens for language models, split into uncached input, cached input and output; audio duration for transcription and speech. The pricing page has the published reference prices; your customer agreement governs fees and payment terms.
Agents resend a growing conversation. Input the engine already holds is cached input: it costs less and does not use your monthly quota. See the worked example.
The privacy policy says what is kept, for how long and why.
OpenAI Chat Completions and Responses, Anthropic Messages, and OpenAI-style transcription and speech. Each model page lists its endpoints.
Every error has a code; API errors says what each one means and whether to retry.
tokenflow is open to existing customers while we grow capacity. Tell us what you’re building and how much you expect to run.