API Documentation

Getting Started

The AXIOM API gives you access to 22 AI models through a single OpenAI-compatible endpoint. Smart routing automatically selects the best model for your task, or you can specify one directly.

Base URL

https://axiom.com.vc/api

Authentication

Include a Bearer token in the Authorization header. Authentication is optional for basic usage but required for tracked usage and higher rate limits.

Authorization: Bearer YOUR_API_KEY

Quick Start

cURL
curl -X POST https://axiom.com.vc/api/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": "Hello, AXIOM!"}],
    "model": "auto",
    "stream": false
  }'

Chat Completions

Send messages and get AI responses. Fully compatible with the OpenAI chat completions format.

POST/api/v1/chat/completions

Headers

ParameterTypeRequiredDescription
Content-TypestringYesapplication/json
AuthorizationstringNoBearer YOUR_API_KEY

Request Body

ParameterTypeRequiredDescription
messagesarrayYesArray of message objects with role and content
modelstringNoModel ID or "auto" for smart routing. Default: "auto"
streambooleanNoEnable streaming responses. Default: false
temperaturenumberNoSampling temperature 0-2. Default: 0.7
max_tokensnumberNoMaximum tokens to generate. Default: 2048
top_pnumberNoNucleus sampling threshold. Default: 0.9

Request Example

Request Body
{
  "messages": [{"role": "user", "content": "Hello"}],
  "model": "auto",
  "stream": false,
  "temperature": 0.7,
  "max_tokens": 2048,
  "top_p": 0.9
}

Response

Response
{
  "id": "chatcmpl-abc123",
  "choices": [
    {
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?"
      },
      "finish_reason": "stop"
    }
  ],
  "model": "axe-blade-4b",
  "usage": {
    "prompt_tokens": 5,
    "completion_tokens": 10,
    "total_tokens": 15
  }
}

Custom Response Headers

ParameterTypeRequiredDescription
X-AXE-ModelstringNoThe model that handled the request
X-AXE-ReasonstringNoWhy this model was selected by the router
X-AXE-TierstringNoModel tier: light, medium, heavy, cloud
X-AXE-Estimated-TimestringNoEstimated generation time in ms

Code Examples

cURL
curl -X POST https://axiom.com.vc/api/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": "Explain quantum computing"}],
    "model": "auto",
    "temperature": 0.7
  }'

Streaming

Set "stream": true in your request to receive tokens as they are generated. The response uses NDJSON (newline-delimited JSON) format.

Stream Response Format

Each line is a JSON object. Intermediate chunks contain the token in message.content. The final line has "done": true.

Stream chunks
{"model":"axe-blade-4b","message":{"role":"assistant","content":"Hello"},"done":false}
{"model":"axe-blade-4b","message":{"role":"assistant","content":" there"},"done":false}
{"model":"axe-blade-4b","message":{"role":"assistant","content":"!"},"done":false}
{"done":true}

Streaming Examples

Python
#a855f7">import requests

response = requests.post(
    #22c55e">"https://axiom.com.vc/api/v1/chat/completions",
    headers={
        #22c55e">"Content-Type": "application/json",
        #22c55e">"Authorization": "Bearer YOUR_API_KEY"
    },
    json={
        #22c55e">"messages": [{"role": "user", "content": "Write a haiku"}],
        #22c55e">"model": "auto",
        #22c55e">"stream": True
    },
    stream=#a855f7">True
)

#a855f7">for line in response.iter_lines():
    #a855f7">if line:
        #a855f7">import json
        chunk = json.loads(line)
        #a855f7">if not chunk.get("done"):
            #a855f7">print(chunk["message"]["content"], end="", flush=True)
#a855f7">print()

Models

List all available models and their current status.

GET/api/v1/models

Response

Response
{
  "data": [
    { "id": "axe-blade-4b", "object": "model", "owned_by": "axe" },
    { "id": "axe-cipher-7b", "object": "model", "owned_by": "axe" },
    { "id": "axe-nano-3b", "object": "model", "owned_by": "axe" },
    { "id": "axe-scholar-14b", "object": "model", "owned_by": "axe" }
  ]
}

Example

cURL
curl https://axiom.com.vc/api/v1/models

Smart Routing

Get a routing decision without executing inference. Useful for previewing which model would handle a request, or building custom UIs around model selection.

POST/api/router

Request Body

ParameterTypeRequiredDescription
promptstringYesThe prompt to analyze for routing
speedPrioritybooleanNoPrefer faster models over more capable ones. Default: false

Response

Response
{
  "success": true,
  "routing": {
    "model": "axe-blade-4b",
    "reason": "Code task detected",
    "tier": "light",
    "confidence": 0.9
  }
}

Routing Rules

Code generationaxe-blade
Reasoning & logicaxe-cipher
Creative writingaxe-nano
Research & analysisaxe-scholar

Content Generation

Direct access to cloud providers for premium content generation. Each endpoint uses a specific provider and costs credits per request.

POST/api/generate/claudeClaude Sonnet 4-6100 credits
POST/api/generate/geminiGemini 2.5 Flash100 credits
POST/api/generate/groqGroq Llama 70B50 credits
POST/api/generate/designDesign generation via Claude100 credits

Request

Request Body
{
  "prompt": "Write a product description for an AI-powered code editor"
}

Response

Response
{
  "text": "Generated content from the specified provider..."
}

Example

cURL
curl -X POST https://axiom.com.vc/api/generate/claude \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"prompt": "Write a tagline for an AI company"}'

Fleet Status

Check the health of the AXIOM fleet, model availability, and machine status. Use this before routing to verify which models are currently online.

GET/api/axe-status

Example

cURL
curl https://axiom.com.vc/api/axe-status

Returns a full status object with machine health, loaded models, GPU utilization, and queue depths. Use this to build monitoring dashboards or pre-flight checks.

Rate Limits & Credits

Credit Costs

Local models (axe-*)Free
Groq (Llama 70B)50 credits
Claude Sonnet100 credits
Gemini Flash100 credits
Design generation100 credits

Rate Limits

ParameterTypeRequiredDescription
Unauthenticated-No10 requests/minute, local models only
Authenticated-No60 requests/minute, all models
Pro tier-No120 requests/minute, priority queue

Error Codes

400Bad request - malformed JSON or missing required fields
401Unauthorized - invalid or missing API key (for protected endpoints)
429Rate limited - too many requests, retry after Retry-After header
500Internal error - model failed to generate, try again
503Service unavailable - no models online for requested tier