API Reference
API Reference
BetterToken provides OpenAI-compatible Chat Completions and Responses APIs, plus an Anthropic-compatible Messages API. Choose the API format required by your client.
BetterToken provides OpenAI-compatible Chat Completions and Responses APIs, plus an Anthropic-compatible Messages API. Choose the API format required by your client.
Choose an endpoint
| API | POST | Auth |
|---|---|---|
| Chat Completions | /v1/chat/completions | Bearer |
| Responses | /v1/responses | Bearer |
| Messages | /v1/messages | x-api-key |
| Image generation | /v1/images/generations | Bearer |
| Image editing | /v1/images/edits | Bearer |
Chat Completions connection details
| Field | Value |
|---|---|
| Base URL | https://bettertoken.ai/v1 |
| Full request URL | https://bettertoken.ai/v1/chat/completions |
| Method | POST |
| Authorization | Bearer YOUR_API_KEY |
| Model | YOUR_MODEL_ID |
Copy a current Model ID from the model plaza or the API Key Setup dialog in Console.
Quick test
curl "https://bettertoken.ai/v1/chat/completions" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ --data '{ "model": "YOUR_MODEL_ID", "messages": [ { "role": "user", "content": "Hello" } ] }'A successful response contains choices[0].message.content.
Interactive testing and SDK examples
Open OpenAI Chat Completions API to:
- Send a request from the Playground
- Review request parameters and the response schema
- Copy curl, Python, and JavaScript examples

