Text as an image
ModelProxy can send a long passage as an image of the same text. The model reads the page using lower-cost image tokens.
Use best AI models with one API key. Token compression lowers the cost of your requests.
$653.13
Savings vs. OpenRouter rates without ModelProxy compression.
| Model | Input | Output | vs. OpenRouter |
|---|---|---|---|
| $1.00 | $5.00 | −90% | |
| $1.00 | $5.00 | −90% | |
| $1.60 | $8.00 | −80% | |
| $0.075 | $0.375 | −92% | |
| $0.0075 | $0.0375 | −92% | |
| $0.375 | $1.875 | −92% | |
| $0.375 | $1.875 | −92% | |
| $0.375 | $1.875 | −92% | |
| $0.375 | $1.875 | −92% | |
| $0.375 | $1.875 | −92% | |
| $0.30 | $1.50 | −92% | |
| $0.225 | $1.125 | −92% | |
| $0.15 | $0.75 | −92% | |
| $0.15 | $0.75 | −92% | |
| $0.02 | $0.12 | −90% | |
| $0.40 | $2.00 | −90% | |
| $0.20 | $1.20 | −90% | |
| $1.00 | $5.00 | −90% | |
| $0.01 | $0.05 | −90% | |
| $0.20 | $1.00 | −90% | |
| $0.10 | $0.50 | −90% | |
| $0.20 | $1.00 | −90% | |
| $0.80 | $4.00 | −90% | |
| $0.20 | $1.00 | −90% | |
| $0.06 | $0.22 | −90% | |
| $0.02 | $0.11 | −90% | |
| $0.06 | $0.22 | −90% | |
| $0.06 | $0.22 | −90% | |
| $0.10 | $0.32 | −90% | |
| $0.12 | $0.40 | −90% | |
| $0.14 | $0.44 | −90% | |
| $0.14 | $0.44 | −90% | |
| $0.14 | $0.44 | −90% | |
| $0.015 | $0.05 | −90% | |
| Text $0.50Image $0.80 | Image $3.00 | — | |
| No models match these filters. | |||
ModelProxy can send a long passage as an image of the same text. The model reads the page using lower-cost image tokens.
Agents send instructions and chat history with each turn. ModelProxy can reuse the parts that match and process the new question.
In ModelProxy’s tests, token compression caused no loss in answer quality.
Choose an agent or call the API from your code. Copy the example and add your ModelProxy key.
For any other agent, see the setup guide
export ANTHROPIC_BASE_URL="https://api.modelproxy.org"
export ANTHROPIC_AUTH_TOKEN="mp-your-key"
claude --model claude-fable-5
export ANTHROPIC_BASE_URL="https://api.modelproxy.org"
export ANTHROPIC_AUTH_TOKEN="mp-your-key"
claude --model claude-fable-5Setup guidemodel_provider = "modelproxy"
model = "gpt-5.6-luna"
[model_providers.modelproxy]
name = "ModelProxy"
base_url = "https://api.modelproxy.org/v1"
env_key = "MODELPROXY_API_KEY"
wire_api = "responses"Setup guideProvider: OpenAI Compatible
Base URL: https://api.modelproxy.org/v1
API key: mp-your-key
Model: gpt-5.6-lunaSetup guideproviders:
modelproxy:
api: https://api.modelproxy.org/v1
key_env: MODELPROXY_API_KEY
transport: chat_completions
model:
default: gpt-5.6-luna
provider: custom:modelproxySetup guideimport os
from openai import OpenAI
client = OpenAI(api_key=os.environ["MODELPROXY_API_KEY"],
base_url="https://api.modelproxy.org/v1")
reply = client.chat.completions.create(
model="gpt-5.6-luna",
messages=[{"role": "user", "content": "Hello!"}],
)
print(reply.choices[0].message.content)Setup guideimport OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.MODELPROXY_API_KEY,
baseURL: "https://api.modelproxy.org/v1",
});
const reply = await client.chat.completions.create({
model: "gpt-5.6-luna",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(reply.choices[0].message.content);Setup guidecurl https://api.modelproxy.org/v1/chat/completions \
-H "Authorization: Bearer $MODELPROXY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-luna",
"messages": [{"role": "user", "content": "Hello!"}]
}'Setup guideReplace mp-your-key with your key, then run these commands in your terminal.
Use an agent with a custom OpenAI or Anthropic endpoint. The quickstart includes Claude Code, Codex CLI, Kilo Code and Hermes Agent.
Input and output tokens have separate rates. Your dashboard shows the token counts and cost for each request.
ModelProxy records the model, token counts, cost, status and latency. Prompt and response text stay out of its logs. Each provider has its own data policy.
The table compares ModelProxy and OpenRouter token rates for the same model. For open models, the OpenRouter rate varies by host.
With image encoding, the model reads the selected words from an image. With a cache hit, it receives the same matching context.
A matching prefix can still be reused. The changed part is processed as new input.
https://api.modelproxy.org/v1