Developer documentation · September 2026

Datacenter
Reasoning API

Connect an OpenAI-compatible client to locally hosted chat, embedding and transcription models through one authenticated API.

API connection
Base URL
https://llm.smox.ai/v1
Authentication
Bearer API key
Content type
application/json

01

Connect your client

Use the API key supplied for SMOX.AI. Keep the real key on your server or in a private secret manager. Never expose it in browser code, a repository or application logs.

Base URL

llm.smox.ai/v1

Authentication

Bearer token

Transport

HTTPS + JSON

Bash / Zsh
export SMOX_API_KEY="YOUR_API_KEY"
export SMOX_BASE_URL="https://llm.smox.ai/v1"
export SMOX_MODEL="YOUR_CHAT_MODEL_ID"

Before sending a chat request, replace YOUR_CHAT_MODEL_ID in the environment setup and cURL example with the exact ID of a chat-capable model returned by GET /models. Confirm its supported capabilities in the model documentation.

02

Choose an available model

Call GET /models using the base URL above to list the models exposed by your API key before integrating. Use an exact returned model ID and check the model documentation for supported capabilities and endpoints; availability depends on your access.

List models
curl --fail-with-body "$SMOX_BASE_URL/models" \
  -H "Authorization: Bearer $SMOX_API_KEY"
CapabilityModel selectionUse with chat endpoint
Chat / reasoning modelChoose an exact ID from GET /models that supports chat; confirm reasoning support separately.Yes, for chat-capable models
Embedding modelSelect a supported embedding model from GET /models and check its request schema.No
Transcriptionwhisper-large-v3 — confirm availability with GET /models and check its request schema.No

03

Send your first prompt

Call the OpenAI-compatible chat completions endpoint. Read the completed answer from choices[0].message.content.

cURL
curl --fail-with-body "$SMOX_BASE_URL/chat/completions" \
  -H "Authorization: Bearer $SMOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "YOUR_CHAT_MODEL_ID",
    "messages": [{
      "role": "user",
      "content": "Explain DNS in two sentences."
    }]
  }'

04

Python quickstart

Install the official OpenAI Python SDK and provide the base URL shown above. The SDK then sends requests to this API rather than the default OpenAI endpoint.

Install SDK
python -m pip install openai
Python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["SMOX_API_KEY"],
    base_url=os.environ["SMOX_BASE_URL"],
    timeout=120.0,
    max_retries=2,
)

response = client.chat.completions.create(
    model=os.environ["SMOX_MODEL"],
    messages=[{
        "role": "user",
        "content": "Explain DNS in two sentences.",
    }],
)

print(response.choices[0].message.content or "")

Timeouts and retries

The 120-second timeout is an example client setting, not a service guarantee. Adjust it to the workload. SDK retries can increase total latency and repeat generation.

05

Stream the answer

Confirm that the selected chat model supports streaming before using this example. Set stream=True and append the content delta from each returned chunk.

Python streaming
stream = client.chat.completions.create(
    model=os.environ["SMOX_MODEL"],
    messages=[{"role": "user", "content": "What is DNS?"}],
    stream=True,
)

try:
    for chunk in stream:
        if chunk.choices:
            text = chunk.choices[0].delta.content or ""
            print(text, end="", flush=True)
finally:
    stream.close()
print()

Conversation history: include earlier user and assistant messages in the messages array on each request. Keep the full history within the selected model's context limit.

06

Reasoning controls and limits

Start with a basic request. Add optional model-specific controls only after confirming that the selected model supports them.

Model-dependent optional fieldreasoning_effort="medium"

Check the selected model's documentation for support and accepted values before adding this field. This placeholder-based example does not validate acceptance; acceptance alone does not confirm a behavioural change.

Model-dependent context limitCheck your selected model

Confirm the current input and output limits in the model documentation. Limits for one model do not apply to every available model.

Use output limits such as max_tokens=256 only if supported by the selected model and endpoint. Inspect prompt, completion and total token usage when returned. Omit sampling controls unless needed and supported.

07

Handle common failures

Treat authentication, request validation, limits and temporary service failures differently. Do not retry every error automatically.

400 / 422Invalid request

Check the model ID, message structure and optional parameters. Remove unsupported controls before retrying.

401 / 403Authentication or access

Check the key and Bearer header. Confirm that the key is active and permitted to use the selected model.

404Route or model not found

Use the SDK base URL ending in /v1 without /chat/completions. Check the exact model ID against the model list.

429Rate or quota limit

Respect Retry-After when present. Back off for rate limits and contact the SMOX.AI team if quota is exhausted.

5xx / timeoutTemporary failure

Use bounded retries with exponential backoff and jitter. A retry can repeat generation and increase token usage.

08

Before you deploy

Move from a successful test request to a production integration with explicit security, reliability and observability choices.

Keep API keys on the server and out of browser code.
Do not commit keys to repositories or print them in logs.
Record status, model, latency and request ID when available.
Inspect finish_reason for truncated responses.
Track returned token usage and apply quota controls.
Confirm current model limits and access with the SMOX.AI team.

Need an API key?

Request access and describe your intended workload.

Contact our developers

For API input, output and cached token prices, view SMOX API pricing.

Prefer a conversation? Join the SMOX developer chat.