Quickstart
Make your first Twotic API call in under five minutes: create a key, subscribe to an API, and read the cost off the response header.
Twotic runs every API in its catalogue. You call one endpoint with one key, and the response tells you exactly what it cost.
1. Create a key
Sign in and open your keys. Generating a key shows it exactly once — store it immediately, because only a hash is kept and it cannot be recovered afterwards.
export TWOTIC_KEY="tk_live_..."2. Subscribe to an API
Open any API in the catalogue and press Subscribe. This charges nothing. It creates the entitlement the gateway checks and starts that API's free monthly allowance.
3. Make the call
Requests go to https://www.twotic.dev/v1/<api-slug>/<path>, with the key in an Authorization header.
curl "https://www.twotic.dev/v1/token-counter/models" \
-H "Authorization: Bearer $TWOTIC_KEY"Alongside the API's own response you get a few headers of ours:
| Header | Meaning |
|---|---|
X-Twotic-Cost | Exactly what this call was charged |
X-Twotic-Latency-Ms | How long the call took, end to end |
X-RateLimit-Remaining | Calls left in the current minute |
X-Twotic-Allowance | Present when the call came out of your free allowance |
4. Watch the meter
The dashboard breaks usage down per API, per endpoint and per day, alongside a log of recent requests with their status and cost.
Next
- Authentication — key handling and rotation
- Errors and limits — what each status code means
- MCP for agents — connect Claude, Cursor and other clients