INTEGRATION GUIDE
Connect an OpenAI-compatible application to TokenAAS
Change the base URL and API key, then select a public model ID available to your TokenAAS group.
Updated 2026-09-10
To use TokenAAS with an OpenAI-compatible client, set the base URL to https://tokenaas.ai/v1, authenticate with a TokenAAS API key, and send an available public model ID.
1. Create and scope an API key
Create a key in the dashboard and assign it to the group containing the models your application needs.
2. Confirm the model ID
Call GET /v1/models with Bearer authentication. Use the returned ID exactly, including capitalization and punctuation.
3. Send a completion
Send POST /v1/chat/completions with model and messages. Set stream to true for server-sent streaming when the route supports it.
4. Handle production errors
Treat authentication, insufficient balance, unavailable capacity, rate limits, and upstream failures as distinct cases. Use bounded retries only for transient errors.
Frequently asked questions
Can I keep using the OpenAI SDK?
Yes for compatible TokenAAS endpoints. Change the base URL and credential, then select a model ID visible to the key.
Why is a model missing from GET /v1/models?
The API key group may not include the model, the model may not be configured for routing, or the catalog entry may only be marked Coming soon.