API reference
hxa.net accepts the OpenAI and Anthropic request formats unchanged. Request and response bodies follow the provider's own API documentation.
Endpoints
| Endpoint | Format |
|---|---|
POST https://hxa.net/v1/chat/completions | OpenAI Chat Completions |
POST https://hxa.net/v1/responses | OpenAI Responses |
GET https://hxa.net/v1/models | Models available to your key |
POST https://hxa.net/v1/messages | Anthropic Messages |
POST https://hxa.net/v1/messages/count_tokens | Anthropic token counting |
Streaming works as with the provider: set "stream": true.
Authentication
Send your API key in one of these headers:
Authorization: Bearer YOUR_HXA_API_KEY(OpenAI SDKs and most tools)x-api-key: YOUR_HXA_API_KEY(Anthropic SDKs)
Putting the key in the URL (for example ?key=) is not accepted.
Models
Use the model IDs from the pricing page, such as claude-sonnet-5-5 or gpt-6.1-sol. Which models a key can call depends on the group it is in. GET /v1/models lists them.
Errors
Errors use the HTTP status codes of the provider's API. The common ones:
| Status | Meaning | What to do |
|---|---|---|
| 400 | Invalid request | Check the request body and the model ID. A key sent in the URL is also rejected with 400. |
| 401 | Missing, invalid or disabled API key | Check the key and that it is enabled on the API Keys page. |
| 403 | Request not allowed | The key has expired, your IP is outside the key's IP restriction, or the account balance is used up. Renew the key, check its IP restriction, or add credit. |
| 429 | Limit reached | The key's quota or rate limit is used up, or too many requests were sent. Wait and retry with backoff, or raise the key's limits. |
| 5xx | Upstream or service error | Retry with exponential backoff. Contact us if it persists. |