← Documentation
API / curl setup guide
1. Version and verification
Last tested on 2026-10-26.
2. Before you start
You need an account, an API key and a positive balance. Without credit a request fails with HTTP 402 (insufficient_quota).
3. Configure
curl https://api.tokenwave.dev/v1/models -H "Authorization: Bearer sk-atr-YOUR_KEY"curl https://api.tokenwave.dev/v1/messages \
-H "x-api-key: sk-atr-YOUR_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{"model":"claude-sonnet-5-5","max_tokens":64,"messages":[{"role":"user","content":"Hello"}]}'curl https://api.tokenwave.dev/v1/models -H "Authorization: Bearer sk-atr-YOUR_KEY"curl https://api.tokenwave.dev/v1/messages \
-H "x-api-key: sk-atr-YOUR_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{"model":"claude-sonnet-5-5","max_tokens":64,"messages":[{"role":"user","content":"Hello"}]}'curl.exe https://api.tokenwave.dev/v1/models -H "Authorization: Bearer sk-atr-YOUR_KEY"@'
{"model":"claude-sonnet-5-5","max_tokens":64,"messages":[{"role":"user","content":"Hello"}]}
'@ | curl.exe https://api.tokenwave.dev/v1/messages `
-H "x-api-key: sk-atr-YOUR_KEY" `
-H "anthropic-version: 2023-06-01" `
-H "Content-Type: application/json" `
--data-binary '@-'4. Choose a model
These models work with API / curl. The examples above use the one you pick here.
Browse the models that work in API / curl5. Check the setup
The first command lists the models your key may use; a JSON list means the key and address work.
6. Send a first prompt
Send this prompt: “Reply with the single word ready.” Then open the Requests page: the request appears within a minute, with the model, token counts and cost.
Open Requests7. Known limits
Choose the endpoint your model offers (see its page). Converted endpoints do not forward prompt-cache markers.
8. Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| 401 Unauthorized | The key is wrong, revoked or has stray spaces. | Copy the full key again from the Keys page and check that it is active. |
| 403 Forbidden | The key may not use this model, or the account is restricted. | Check the key's allowed models on the Keys page, or use another key. |
| 404 Not Found | The base URL is wrong: /v1 duplicated or missing. | Use the address from the example exactly. Claude Code takes it without /v1; the other tools with /v1. |
| model not found | The model ID has a typo, or your key cannot use it. | Copy the ID from the catalog, or list what your key may use with GET /v1/models. |
| An HTML page or “Attention Required” instead of JSON | A web firewall in front of the gateway blocked the request body. | Retry once. If it repeats, contact support with the time and the request ID. |
| A parameter I sent seems to have no effect | The gateway only forwards fields the route is known to support; the others are dropped, not rejected. | Look at the response header x-atr-ignored-fields: it lists the top-level fields that were not forwarded. Remove them, or contact support if you need one. |
9. Undo
Nothing to undo. Delete the key on the Keys page if you no longer need it.