All models

DeepSeek

DeepSeek V4 Flash

open weights

Model id

deepseek/deepseek-v4-flash
Input
$0.09
per M tokens
Output
$0.18
per M tokens
Cache read
$0.018
per M tokens
Context
1,024K
tokens

Provider list price

Pricing

Input$0.09 / M tokens
Output$0.18 / M tokens
Cache read$0.018 / M tokens
RoutingFree

Provider list price. BYOK requests bill on your own provider account; managed credits draw down at exactly these rates. No markup, no request fee. Every request is metered per engineer and joined to the work it shipped.

First request

Run it

Python · OpenAI SDK

from openai import OpenAI

client = OpenAI(base_url="https://api.tokenspend.dev/v1", api_key=os.environ["TOKENSPEND_RAIL_KEY"])
resp = client.chat.completions.create(
    model="deepseek/deepseek-v4-flash",
    messages=[{"role": "user", "content": "hello"}],
)

JavaScript · OpenAI SDK

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.tokenspend.dev/v1", apiKey: process.env.TOKENSPEND_RAIL_KEY });
const resp = await client.chat.completions.create({
  model: "deepseek/deepseek-v4-flash",
  messages: [{ role: "user", content: "hello" }]
});

curl

curl https://api.tokenspend.dev/v1/chat/completions \
  -H "content-type: application/json" \
  -H "Authorization: Bearer $TOKENSPEND_RAIL_KEY" \
  -d '{"model":"deepseek/deepseek-v4-flash","messages":[{"role":"user","content":"hello"}]}'

Claude Code integration

export ANTHROPIC_BASE_URL=https://api.tokenspend.dev
export ANTHROPIC_API_KEY=$TOKENSPEND_RAIL_KEY
export ANTHROPIC_MODEL=deepseek/deepseek-v4-flash

One request shape reaches every model. Claude Code connects as an integration with two environment variables and keeps every feature. Request history included; zero data retention is one click away.