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_.
$QUBAX_API_KEY below with your actual key, or export it first: export QUBAX_API_KEY=qbx_live_...Send a basic chat completion request to the /chat/completionsendpoint.
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."}
]
}'Stream Server-Sent Events by setting "stream": true. Each chunk arrives as an SSE data:line, terminating with data: [DONE].
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.
List the models available on your account with a GET request to /models.
curl https://api.qubax.ai/v1/models \
-H "Authorization: Bearer $QUBAX_API_KEY"The response is a JSON object with a dataarray, for example:
{
"object": "list",
"data": [
{ "id": "gpt-5", "object": "model", "owned_by": "qubax" },
{ "id": "claude-sonnet-4.5", "object": "model", "owned_by": "qubax" }
]
}jq to see just the IDs:curl -s https://api.qubax.ai/v1/models -H "Authorization: Bearer $QUBAX_API_KEY" | jq -r '.data[].id'