SoxAIDocs
API Reference

API Reference

Complete reference for the SoxAI OpenAI-compatible REST API

API Reference

Base URL

https://api.soxai.io/v1

All API requests must use HTTPS. HTTP requests are rejected.

Authentication

All requests require a Bearer token in the Authorization header:

Authorization: Bearer sox-your-token-here

See Authentication for details on creating and managing tokens.

Endpoints

MethodPathDescription
POST/v1/chat/completionsCreate a chat completion
POST/v1/completionsCreate a text completion (legacy)
POST/v1/embeddingsCreate embeddings
POST/v1/images/generationsGenerate images
POST/v1/video/generationsGenerate videos
GET/v1/video/generationsList video jobs
GET/v1/video/generations/{id}Get video job status
DELETE/v1/video/generations/{id}Delete a video job
GET/v1/modelsList available models
GET/v1/models/{model}Retrieve model details

Request Format

All POST endpoints accept application/json bodies. Responses are also JSON unless stream: true is set, in which case the response is text/event-stream.

Response Format

Successful responses follow the OpenAI response schema exactly, enabling drop-in compatibility with existing OpenAI clients.

Error responses use the format:

{
  "error": {
    "code": "quota_exceeded",
    "message": "Hourly token quota exceeded. Resets in 47 minutes.",
    "request_id": "req_01jq..."
  }
}

Versioning

The API is versioned via the URL path (/v1). Breaking changes will be introduced in a new version (/v2) with a deprecation period for the previous version.