Overview
Connect your application to AI models through the Tokamak API.
Use one Tokamak API key to call the models available in your workspace. Start with a small request, then add streaming or tools as your application needs them.
API base URL
https://api.tokamak.sh/v1Send your key in the Authorization header:
Authorization: Bearer YOUR_TOKAMAK_API_KEYKeep the key in your server or local application's environment. See Authentication for setup.
Start building
- Quickstart: create a key and send your first request.
- Models: find a model ID.
- Chat, Responses and Messages: choose the endpoint your model supports.
- Streaming: display output as it arrives.
Endpoints
| Method | Path | Use it to |
|---|---|---|
| GET | /models | List available models |
| POST | /chat/completions | Generate a chat response |
| POST | /responses | Use the Responses format |
| POST | /messages | Use the Anthropic Messages format |
| GET | /generation?id=… | Inspect one request's usage and billing status |
| GET | /usage/me | Read your usage summary |
Paths in this table are relative to the API base URL. The model and its provider determine supported request formats and optional features.
Common request settings
| Setting | Purpose |
|---|---|
model | Public model ID from the model list |
messages or input | Your prompt and conversation, using the chosen endpoint's format |
| Output limit | Bound the response length using that endpoint's supported token-limit field |
stream | Set to true to receive incremental output |
Tokamak uses the selected endpoint's native response format. Your application handles any tool calls returned by the model.