tiny-router

Quickstart

Your first request, in three steps.

tiny-router speaks the OpenAI API. If your code already calls OpenAI, changing the base URL and the key is the whole migration.

1. Create a key

Sign up, add credits, then mint a key on the API keys page. The secret is shown once and never again, so store it before closing the dialog.

2. Call it

curl https://api.tiny-router.dev/v1/chat/completions \
  -H "Authorization: Bearer $TR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "~deepseek/deepseek-v4-flash-latest",
    "messages": [{"role": "user", "content": "Explain nano-USD in one line."}]
  }'

3. What you are charged

Every request places a hold on your wallet, runs, then settles at the provider's reported cost plus our margin. The hold is released in full if the request fails.

  • Balances are kept in nano-USD, an integer billionth of a dollar. No floating point touches your money.
  • A request against an empty wallet is refused with 402 before it reaches a provider.
  • Disconnecting mid-stream still bills what was generated. It does not bill what was not.

Model ids

Use the full id, author included, exactly as it appears in the catalog. A bare gpt-5 will not resolve.