API reference

hxa.net accepts the OpenAI and Anthropic request formats unchanged. Request and response bodies follow the provider's own API documentation.

Endpoints

EndpointFormat
POST https://hxa.net/v1/chat/completionsOpenAI Chat Completions
POST https://hxa.net/v1/responsesOpenAI Responses
GET https://hxa.net/v1/modelsModels available to your key
POST https://hxa.net/v1/messagesAnthropic Messages
POST https://hxa.net/v1/messages/count_tokensAnthropic 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:

StatusMeaningWhat to do
400Invalid requestCheck the request body and the model ID. A key sent in the URL is also rejected with 400.
401Missing, invalid or disabled API keyCheck the key and that it is enabled on the API Keys page.
403Request not allowedThe 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.
429Limit reachedThe 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.
5xxUpstream or service errorRetry with exponential backoff. Contact us if it persists.