Calling the API
Touchmark sells AI inference as contracts; your organisation calls every contract it holds through one API key. How that key is called:
Endpoint & auth
The router is OpenAI-compatible at https://router.touchmark.ai/v1. Any OpenAI SDK works: set base_url to that address and api_key to your key. Over raw HTTP, authenticate every request with the header "Authorization: Bearer sk-…". Each listing states the endpoints and features its provider serves under Usage conditions; a request on an endpoint a listing does not declare is refused with 404 endpoint_not_supported. A listing without a declaration serves as before.
Integration · your key
- Base URL
- https://router.touchmark.ai/v1
- Auth
- Authorization: Bearer sk-…your-key
curl https://router.touchmark.ai/v1/chat/completions \
-H "Authorization: Bearer sk-…your-key" \
-H "Content-Type: application/json" \
-d '{ "model": "glm-5.2", "messages": [{"role":"user","content":"Refactor this function…"}] }'Name the model in the model field. Same base URL and key for every call.
Models
You name the model on every request (the "model" field). Model ids are provider-agnostic. The serving provider is a stated term of the contract, not part of the id. One key serves every model your organisation holds a contract for this month, and GET /v1/models with your key returns exactly those models; a request for a model your organisation holds no contract for this month is refused with 403 no_active_contract. Contract model ids across the shelf: glm-5.2, glm-5.2-fast, kimi-k3-fast, claude-opus-5, claude-sonnet-5, claude-fable-5.
Streaming
Standard OpenAI streaming works: set "stream": true. The router is a plain pass-through.
Allowance & rate caps
Every contract is a fixed block of Tokens (the allocation is stated on the contract), and usage draws it down in Tokens: 1 Token = 1 output token (reasoning tokens count as output). An uncached input token counts as a fraction of a Token at the model's input:output price ratio, and a cache-read token at its cache:output ratio; each contract states its rates; metering runs at full precision on them (displayed rates are rounded). Your organisation's allowance for a model is the sum of its contracts of that model for the month, and usage is metered per model. Once a model's allowance is drawn down, further requests on that model are refused with 429 allowance_exhausted until next month's contract arms at 00:00 UTC on the 1st; your other models keep serving. The stop is not airtight: heavy parallel traffic can overshoot it slightly, so do not treat it as a hard cap. Contracts carry rpm/tpm caps that ride the contract, per model; requests above them are refused with 429 rate_limited.
Contract months
Contracts are calendar-month forwards: you pick a listed delivery month when you buy. Every contract starts on the 1st of its month at 00:00 UTC (start dates are always month-1sts, nothing starts mid-month) and ends when the month ends (the next month's 1st, UTC).
Month rollover
Your key does not expire with a contract. When a month ends, that month's unused allowance expires and the new month's contracts become drawable at 00:00 UTC on the 1st: a forward month's allowance exists from the moment you buy and arms itself at the boundary, with nothing to redeploy. Usage is metered per calendar month (UTC), so nothing carries over.
Keys
One key per organisation: every key your organisation creates serves every model it holds a contract for, and buying more contracts, selling, or month rollover never changes it: no secret swaps, no redeploys. A purchased contract is servable the moment the purchase settles; nothing is attached to a key. Keys never expire; create and revoke them from the Delivery page (/keys; revoke and create to rotate), and any organisation member's key serves the whole organisation. The secret is shown once, at creation; if you lose it, revoke the key and create a new one.