Authentication
Authenticate AI API requests with a bearer key.
Model requests use an inference API key in the Authorization header:
Authorization: Bearer YOUR_TOKAMAK_API_KEYCreate API key
Create an inference key from API Keys in your workspace. Store it as TOKAMAK_API_KEY in your server or local application's environment.
See the authentication guide for key creation, environments and rotation.
Example
curl -sS https://api.tokamak.sh/v1/models \
-H "Authorization: Bearer $TOKAMAK_API_KEY"A successful response contains the deployed model list in data.
Check identity
GET /v1/me/identity reads the current authenticated identity:
curl -sS https://api.tokamak.sh/v1/me/identity \
-H "Authorization: Bearer $TOKAMAK_API_KEY"Identity verification does not send an inference request. Model requests also require a usable organization binding, applicable limits and credit.
Errors
A missing or invalid credential can be rejected before a model is called. A management key is rejected on inference routes. Check the status and returned error body using the debugging guide.
For your first model request, follow Quickstart.