AaronAlphaX
API Platform · API reference

Build on one endpoint.

The AaronAlphaX gateway speaks the OpenAI API. Any OpenAI SDK or HTTP client works once you change the base URL and key.

BASE URLhttps://api.aaronalphax.com/v1

Platform pages are in English. الصفحة الرئيسية بالعربية ←

Overview

One API key gives you Qwen, DeepSeek and GLM models through OpenAI-compatible endpoints. Requests and responses use JSON; streaming uses server-sent events. All traffic is over HTTPS.

EndpointMethodPurpose
/v1/chat/completionsPOSTChat and reasoning, with optional streaming
/v1/modelsGETModels enabled for your key
/v1/embeddingsPOSTVector embeddings for search and RAG
Model availability, limits and pricing are set per contract. Don't have a key yet? Open the console or request access.

Quickstart

Install the official OpenAI SDK for your language (pip install openai or npm install openai), set AAX_API_KEY, and send your first request.

curl https://api.aaronalphax.com/v1/chat/completions \
  -H "Authorization: Bearer $AAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-plus",
    "messages": [
      {"role": "system", "content": "Be concise."},
      {"role": "user", "content": "Summarise Q3 in Arabic."}
    ]
  }'

Authentication

Authenticate every request with your API key as a Bearer token. Keys are issued per team or application so usage can be metered and reported per key. Keep keys server-side; never ship them in browser or mobile code.

HEADERAuthorization: Bearer <AAX_API_KEY>
curl https://api.aaronalphax.com/v1/models \
  -H "Authorization: Bearer $AAX_API_KEY"

Chat completions

POST/v1/chat/completions

Generates a model response for a conversation. Switch providers by changing the model field only.

Request body

FieldTypeDescription
modelstring, requiredModel ID from the catalog, e.g. qwen-plus.
messagesarray, requiredConversation turns: objects with role (system, user, assistant, tool) and content.
streambooleanIf true, tokens are sent as server-sent events ending with data: [DONE].
temperaturenumberSampling temperature. Lower is more deterministic.
top_pnumberNucleus sampling cut-off.
max_tokensintegerUpper bound on generated tokens.
stopstring | arraySequences where generation stops.
tools, tool_choicearray, string | objectFunction calling, on models that list it in the catalog.
response_formatobject{"type": "json_object"} for JSON output, on models that support structured output.

Parameter support varies by upstream model; unsupported parameters return 400.

Example

curl https://api.aaronalphax.com/v1/chat/completions \
  -H "Authorization: Bearer $AAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-plus",
    "messages": [
      {"role": "system", "content": "Be concise."},
      {"role": "user", "content": "Summarise Q3 in Arabic."}
    ]
  }'

Response

{
  "id": "chatcmpl-123",
  "object": "chat.completion",
  "created": 1793500000,
  "model": "qwen-plus",
  "choices": [
    {
      "index": 0,
      "message": { "role": "assistant", "content": "Here is a summary…" },
      "finish_reason": "stop"
    }
  ],
  "usage": { "prompt_tokens": 42, "completion_tokens": 128, "total_tokens": 170 }
}

Streaming

Set "stream": true to receive tokens as they are generated. Each event is a chat.completion.chunk object on a data: line; the stream ends with data: [DONE].

curl -N https://api.aaronalphax.com/v1/chat/completions \
  -H "Authorization: Bearer $AAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "deepseek-v4-pro", "stream": true,
       "messages": [{"role": "user", "content": "Explain token metering"}]}'

Event stream

data: {"id":"chatcmpl-123","object":"chat.completion.chunk","model":"deepseek-v4-pro","choices":[{"index":0,"delta":{"role":"assistant","content":"Token"},"finish_reason":null}]}

data: {"id":"chatcmpl-123","object":"chat.completion.chunk","model":"deepseek-v4-pro","choices":[{"index":0,"delta":{"content":" metering"},"finish_reason":null}]}

data: {"id":"chatcmpl-123","object":"chat.completion.chunk","model":"deepseek-v4-pro","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}

data: [DONE]

List models

GET/v1/models

Returns the models enabled for your key. Use these IDs in the model field.

curl https://api.aaronalphax.com/v1/models \
  -H "Authorization: Bearer $AAX_API_KEY"
{
  "object": "list",
  "data": [
    { "id": "qwen-plus", "object": "model", "owned_by": "..." },
    { "id": "deepseek-v4-pro", "object": "model", "owned_by": "..." },
    { "id": "glm-5.3", "object": "model", "owned_by": "..." }
  ]
}

Embeddings

POST/v1/embeddings

Converts text into vectors for semantic search, clustering and retrieval-augmented generation. input accepts a string or an array of strings.

curl https://api.aaronalphax.com/v1/embeddings \
  -H "Authorization: Bearer $AAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "text-embedding-v4",
       "input": ["Dubai logistics FAQ", "Singapore returns policy"]}'

Errors

Errors use standard HTTP status codes and an OpenAI-style JSON body, so the official SDKs raise their usual exception types.

{
  "error": {
    "message": "Invalid API key provided.",
    "type": "invalid_request_error",
    "code": "invalid_api_key"
  }
}
HTTPMeaningWhat to do
400Malformed request or unsupported parameter for this modelFix the request body; check the model's capabilities.
401Missing or invalid API keySend Authorization: Bearer <key> with an active key.
403Key not permitted for this model, or balance/quota exhaustedContact us to enable the model or top up.
404Unknown model or pathCheck the model ID with GET /v1/models.
429Rate limit or concurrency limit reachedBack off and retry with jitter.
500 / 502 / 503Gateway or upstream provider errorRetry with exponential backoff; persistent errors go to sales@aaronalphax.com.

Rate limits

Limits are applied per API key — requests per minute and concurrent requests — and are set in your contract to match your reserved capacity. When a limit is reached the gateway returns 429. Retry with exponential backoff and jitter, and contact us before a planned traffic spike so capacity can be reserved.

import time, random
from openai import OpenAI, RateLimitError, APIStatusError

def complete_with_retry(client, **kwargs):
    for attempt in range(5):
        try:
            return client.chat.completions.create(**kwargs)
        except RateLimitError:
            time.sleep(min(2 ** attempt + random.random(), 30))  # back off on 429
        except APIStatusError as e:
            if e.status_code < 500:
                raise
            time.sleep(min(2 ** attempt + random.random(), 30))  # retry 5xx
    raise RuntimeError("gateway unavailable after retries")

Support

Integration questions, limit increases and new model requests: sales@aaronalphax.com. The strategy desk responds within 24 hours. Multilingual onboarding is available.