Cache-aware routing
Each conversation goes back to the GPU that already holds its prompt prefix, so each turn only prefills what is new.
Inference API · By invitation
tokenflow serves open-weight models from a pool of GPUs we run or rent. Point your OpenAI or Anthropic client at it and keep your code.
# Same request your OpenAI client sends
curl https://api.tokenflow.dev/v1/chat/completions \
-H "Authorization: Bearer $TOKENFLOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.8-27b",
"stream": true,
"messages": [{"role": "user", "content": "Hello"}]
}'
/v1/chat/completions/v1/responses/v1/messagesFeatures
Agents resend the same growing conversation on every turn. tokenflow is designed around that.
Each conversation goes back to the GPU that already holds its prompt prefix, so each turn only prefills 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. You pay for the tokens that were sent, not the ones that would have been.
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. Once you’re invited, your API keys are in the console.
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"}],
)
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"}],
)
Available today: qwen3.8-27b and gemma4-12b, a smaller and faster model, each also as -direct (qwen3.8-27b-direct, gemma4-12b-direct), the same model with an adapter that declines fewer requests. GET /v1/models lists what your key can use.
Coding agents
Claude Code and Codex work on tokenflow with a few environment variables or one profile file. No proxy, no plugin.
tokenflow is open to existing customers while we grow capacity. Tell us what you’re building and how much you expect to run.