One endpoint in front of Anthropic, OpenAI and
DeepSeek, like a self-hosted OpenRouter. Every request is metered in
USD (priced live via the pricing browser /
llm-live-pricing) against the
calling key's budget; upstream provider keys never leave the gateway. The API lives at
https://api.lishuyu.app/llm.
Your key
Your key is kept in this browser's localStorage only and is
sent solely to api.lishuyu.app/llm — this static host never sees it.
Key management (platform admin)
Create a key
This is the only time the full key is shown — only its hash is stored. Copy it now.
Keys
| key | spend / limit | window | models | flags | created | actions |
|---|
Usage ledger
| when | key | model | status | tokens in/out | cost | latency |
|---|
Docs
Quick start
# OpenAI SDK — works for all three providers
from openai import OpenAI
client = OpenAI(base_url="https://api.lishuyu.app/llm/v1", api_key="llmgw_...")
client.chat.completions.create(
model="anthropic/claude-sonnet-5", # or gpt-5, deepseek-chat, ...
messages=[{"role": "user", "content": "hi"}],
)
# Anthropic SDK — native /v1/messages, cache_control passes through
from anthropic import Anthropic
client = Anthropic(base_url="https://api.lishuyu.app/llm", api_key="llmgw_...")
Bare well-known ids (claude-*, gpt-*,
deepseek-*) route without a prefix; anything else needs the
provider/ prefix. Streaming is passed through chunk-for-chunk.
Keys & budgets
Keys (llmgw_...) are issued by the platform admin (panel above). Each key carries:
| knob | meaning |
|---|---|
limit_usd | USD budget; requests are rejected with 402 once the window's spend reaches it (the last request may overshoot slightly — usage is only known post-response) |
period | when the budget resets: total (never), daily / monthly (UTC calendar), or rolling (sliding window) |
models | allowlist of glob patterns, e.g. ["deepseek-*", "anthropic/claude-haiku-*"] |
service_tier | optional — forced onto every upstream request |
zdr | zero data retention: token counts and cost are recorded, request/response bodies are not (default keeps bodies for audit) |
Check your own balance any time — the "Your key" panel above, or:
curl -H "Authorization: Bearer llmgw_..." https://api.lishuyu.app/llm/api/me
Batch jobs
Anthropic Message Batches (POST /v1/messages/batches) and the OpenAI
Batch API (POST /v1/files + POST /v1/batches) are proxied
too. A batch debits your key once, when its results are fetched, at the providers'
50% batch rate.