cURL

Qubax exposes a standard OpenAI-compatible HTTP API. You can call it directly with curlor any HTTP client. All endpoints live under https://api.qubax.ai/v1and authenticate with a bearer token that starts with qbx_live_.

ℹ️
Replace $QUBAX_API_KEY below with your actual key, or export it first: export QUBAX_API_KEY=qbx_live_...

Chat completion

Send a basic chat completion request to the /chat/completionsendpoint.

Shell
curl https://api.qubax.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $QUBAX_API_KEY" \
  -d '{
    "model": "gpt-5",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Explain quantum entanglement in one sentence."}
    ]
  }'

Streaming

Stream Server-Sent Events by setting "stream": true. Each chunk arrives as an SSE data:line, terminating with data: [DONE].

Shell
curl https://api.qubax.ai/v1/chat/completions \
  -N \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $QUBAX_API_KEY" \
  -d '{
    "model": "gpt-5",
    "stream": true,
    "messages": [
      {"role": "user", "content": "Write a haiku about the ocean."}
    ]
  }'

The -Nflag disables output buffering so tokens appear as they are generated.

Listing models

List the models available on your account with a GET request to /models.

Shell
curl https://api.qubax.ai/v1/models \
  -H "Authorization: Bearer $QUBAX_API_KEY"

The response is a JSON object with a dataarray, for example:

JSON
{
  "object": "list",
  "data": [
    { "id": "gpt-5", "object": "model", "owned_by": "qubax" },
    { "id": "claude-sonnet-4.5", "object": "model", "owned_by": "qubax" }
  ]
}
💡
Pipe the model list through jq to see just the IDs:
curl -s https://api.qubax.ai/v1/models -H "Authorization: Bearer $QUBAX_API_KEY" | jq -r '.data[].id'