Docs / quickstart
Your first call in five minutes
Four commands, no SDK. Every command and every response body on this page came from a run against a live instance on 2026-11-19 — nothing here is copied from documentation we did not execute.
What you need
60 secondsA key. Accounts start with $0.50 in credits at /signup, no card required — enough to make the calls below and watch your usage appear on the dashboard.
The endpoint is https://api.tokenaimodels.com/v1. Note the api. host: long streams belong there, not on the apex domain.
1. List what you can call
curlcurl -s https://api.tokenaimodels.com/v1/models \
-H "Authorization: Bearer $MODELRY_KEY"The list carries the context window, the output ceiling and the current rate, so you do not have to trust a price on a page — the endpoint is the price:
{"object":"list","data":[{"id":"deepseek-chat","object":"model","owned_by":"modelry",
"context_length":1000000,"max_output_tokens":384000,
"pricing":{"currency":"usd","unit":"per_1m_tokens",
"offpeak":{"input":0.25,"cached_input":0.006,"output":1.45},
"peak":{"input":0.5,"cached_input":0.012,"output":2.9},
"peak_hours_utc":["01:00-04:00","06:00-10:00"],"peak_days":"Mon-Fri"}}, ...]}2. One completion
curl · 2.6 scurl -s -X POST https://api.tokenaimodels.com/v1/chat/completions \
-H "Authorization: Bearer $MODELRY_KEY" -H "Content-Type: application/json" \
-d '{"model":"deepseek-chat","messages":[{"role":"user","content":"hi"}],"max_tokens":8}'The body we got back, unedited apart from the id and fingerprint:
{"id":"c37472ef-...","object":"chat.completion","created":1795089632,
"model":"deepseek-flash",
"choices":[{"index":0,"message":{"role":"assistant","content":"Hi! How's it going? Is"},
"logprobs":null,"finish_reason":"length"}],
"usage":{"prompt_tokens":5,"completion_tokens":8,"total_tokens":13,
"prompt_tokens_details":{"cached_tokens":0},
"prompt_cache_hit_tokens":0,"prompt_cache_miss_tokens":5}}finish_reason: "length" is correct here — we asked for max_tokens: 8 and the model used all eight. Raise it or drop it to get a finished answer.
3. The same call, streamed
sse · include_usagecurl -sN -X POST https://api.tokenaimodels.com/v1/chat/completions \
-H "Authorization: Bearer $MODELRY_KEY" -H "Content-Type: application/json" \
-d '{"model":"deepseek-chat","messages":[{"role":"user","content":"Count 1 to 3."}],
"max_tokens":24,"stream":true,"stream_options":{"include_usage":true}}'You get one data: line per delta, then a final line carrying usage, then data: [DONE]. First and last events from our run:
data: {"id":"30dc2833-...","object":"chat.completion.chunk","model":"deepseek-flash",
"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null}],
"usage":null}
...
data: {"id":"30dc2833-...","object":"chat.completion.chunk","model":"deepseek-flash",
"choices":[{"index":0,"delta":{"content":""},"finish_reason":"stop"}],
"usage":{"prompt_tokens":11,"completion_tokens":8,"total_tokens":19,
"prompt_tokens_details":{"cached_tokens":0},
"prompt_cache_hit_tokens":0,"prompt_cache_miss_tokens":11}}
data: [DONE]Two details worth writing into your client instead of discovering in production. In this run the usage block arrived on the chunk that also carries finish_reason: "stop" — so read usage off the last chunk rather than assuming a usage-only event with an empty choices array. And guard event.choices being empty anyway: a client that indexes choices[0] unconditionally breaks the day it is not.
4. The other two models, same call
observed · same promptTwo more ids take the same body. The prompt for everything below is Reply with exactly: PONG, and the ids we send are the ones the model list gave us — not the ids the response echoes back.
curl -s -X POST https://api.tokenaimodels.com/v1/chat/completions \
-H "Authorization: Bearer $MODELRY_KEY" -H "Content-Type: application/json" \
-d '{"model":"deepseek-chat-lite","messages":[{"role":"user","content":"Reply with exactly: PONG"}],"max_tokens":16}'deepseek-chat-lite answers exactly like the flagship, at a lower rate. Body, unedited apart from the id and fingerprint:
{"id":"125782ca-...","object":"chat.completion","created":1795248122,
"model":"deepseek-flash",
"choices":[{"index":0,"message":{"role":"assistant","content":"PONG"},"logprobs":null,"finish_reason":"stop"}],
"usage":{"prompt_tokens":10,"completion_tokens":2,"total_tokens":12,
"prompt_tokens_details":{"cached_tokens":0},
"prompt_cache_hit_tokens":0,"prompt_cache_miss_tokens":10}}deepseek-reasoner is where the same request stops being interchangeable. Same prompt, same max_tokens: 16:
{"id":"0771a5a5-...","object":"chat.completion","created":1795248124,
"model":"deepseek-v4-pro",
"choices":[{"index":0,
"message":{"role":"assistant","content":"",
"reasoning_content":"We need answer user asks \"Reply with exactly: PONG\" Need reply exactly"},
"logprobs":null,"finish_reason":"length"}],
"usage":{"prompt_tokens":89,"completion_tokens":16,"total_tokens":105,
"prompt_tokens_details":{"cached_tokens":0},
"completion_tokens_details":{"reasoning_tokens":16},
"prompt_cache_hit_tokens":0,"prompt_cache_miss_tokens":89}}Raise only the budget — max_tokens: 200, nothing else changed — and the same model answers:
{"id":"d3b56b66-...","object":"chat.completion","created":1795248363,
"model":"deepseek-v4-pro",
"choices":[{"index":0,
"message":{"role":"assistant","content":"PONG",
"reasoning_content":"We need answer exactly PONG. User asks \"Reply with exactly: PONG\". Need output PONG only."},
"logprobs":null,"finish_reason":"stop"}],
"usage":{"prompt_tokens":89,"completion_tokens":26,"total_tokens":115,
"prompt_tokens_details":{"cached_tokens":0},
"completion_tokens_details":{"reasoning_tokens":23},
"prompt_cache_hit_tokens":0,"prompt_cache_miss_tokens":89}}max_tokens: 16— 16 tokens, all counted asreasoning_tokens,contentempty,finish_reason: "length".max_tokens: 200— 23 thinking + 3 answering = 26,content: "PONG",finish_reason: "stop".
Thinking is paid out of the output budget; what is left is the answer. That is why deepseek-chat turns thinking off by default: you want a predictable bill and a first token you can wait for, not a trace you never read.
What the usage block means for your bill
per requestBilling is metered from these numbers, per request, in whole micro-dollars ($0.000001). prompt_tokens already includes cached_tokens — split them before you price anything, or you bill the cached share twice. Rates are off-peak and peak (2×), with peak running UTC 01:00–04:00 and 06:00–10:00 on weekdays; the current table is on /pricing, and the per-model pages carry the same numbers.
cached_tokens is the field to watch on repeated prompts — it is what tells you whether a resend actually saved anything. These three test calls show 0.
Two things that surprise people
observed- The
modelfield in the response is the upstream model id (deepseek-flash), while you senddeepseek-chat. Do not assert on that field; assert on your request. - A request that reaches the
api.host from a region we do not serve fails before the model call with451 This service is not available in your region.That is a regional restriction, not a bug in your key — no retry changes it.
Next: rates on /pricing, the full endpoint reference on /docs, model pages for deepseek-chat and deepseek-chat-lite, and the two-line SDK version of this page in Point any OpenAI SDK at Modelry.
See also: Six checks before you repoint a client at /v1 — the same six checks as a checklist you can keep.