Docs
API quick start
AITransX accepts OpenAI-compatible chat completion requests. Use your aitx key as a Bearer token.
Authentication
Every private request must include your API key. Create and manage keys from the dashboard.
HTTP
Authorization: Bearer aitx-your-key Content-Type: application/json
Base URL
Use AITransX as the OpenAI SDK base URL, then keep the same chat completion request shape you already use.
OpenAI SDK
base_url = "https://aitransx.com/v1"
Chat completions
Send requests to /v1/chat/completions. Streaming is supported with "stream": true.
cURL
curl https://aitransx.com/v1/chat/completions \ -H "Authorization: Bearer aitx-your-key" \ -H "Content-Type: application/json" \ -d '{ "model": "auto", "messages": [{"role": "user", "content": "Hello"}], "stream": false }'
Model IDs
Use auto for default routing, or copy an exact model ID from the model catalog or GET /v1/models.
Models
GET https://aitransx.com/v1/models model = "auto" model = "openai/gpt-4o" model = "deepseek/deepseek-chat"
Streaming responses
Set stream to true to receive OpenAI-compatible server-sent events for chat output.
JSON
{
"model": "auto",
"messages": [{"role": "user", "content": "Hello"}],
"stream": true
}
Python SDK
Use the OpenAI SDK and change only the base URL.
Python
from openai import OpenAI client = OpenAI( api_key="aitx-your-key", base_url="https://aitransx.com/v1", ) resp = client.chat.completions.create( model="auto", messages=[{"role": "user", "content": "Hello"}], )
Logs and privacy
Dashboard logs keep operational metadata such as model, provider, tokens, latency and status. Prompt and response bodies are not written to disk.
Public endpoints
| Endpoint | Purpose | Auth |
|---|---|---|
GET /v1/models | List routable model IDs | No key required |
GET /api/pricing | List public model prices | No key required |
POST /v1/chat/completions | Create a chat completion | Bearer key |
GET /healthz | Service health check | No key required |