Getting started
Auth & base URL
Every request requires an API Key. TokenArmy keys start with sk-ta- and can be sent either way:
Authorization: Bearer sk-ta-... # OpenAI SDK, most clients x-api-key: sk-ta-... # Anthropic SDK, Claude Code
Managing keys
- Create a separate key for each device or app; if one leaks, you only revoke that one.
- Set a spend limit (in dollars) and expiry date on any key. Once a key hits its limit, that key's requests return 402. Expired keys return 401.
- Disabled keys return 403 and can be re-enabled anytime; deleted keys cannot be recovered.
- Never put keys in web frontends or commit them to repos—always keep them server-side or local.
Available models
GET https://tokenarmy.shop/v1/models returns the currently listed Claude model IDs. Include the anthropic-version header to get Anthropic format.
curl https://tokenarmy.shop/v1/models -H "Authorization: Bearer $TOKENARMY_API_KEY"