API Reference
API Reference
Complete reference for the SoxAI OpenAI-compatible REST API
API Reference
Base URL
https://api.soxai.io/v1All 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-hereSee Authentication for details on creating and managing tokens.
Endpoints
| Method | Path | Description |
|---|---|---|
POST | /v1/chat/completions | Create a chat completion |
POST | /v1/completions | Create a text completion (legacy) |
POST | /v1/embeddings | Create embeddings |
POST | /v1/images/generations | Generate images |
POST | /v1/video/generations | Generate videos |
GET | /v1/video/generations | List video jobs |
GET | /v1/video/generations/{id} | Get video job status |
DELETE | /v1/video/generations/{id} | Delete a video job |
GET | /v1/models | List 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.