Skip to content
API Reference

API Conventions ​

Every endpoint under https://api.vanix.io follows predictable HTTP, TLS, streaming, and error semantics so your SDKs and retry layers behave consistently across providers.

Base URL & Transport ​

  • Origin: https://api.vanix.io (HTTP/2 over TLS 1.2+; plain HTTP redirects 301 to HTTPS).
  • Content-Type: application/json; charset=utf-8 for JSON endpoints, multipart/form-data for audio/image file uploads.
  • Timeouts: Gateway upstream idle timeout is configured to 300s+ to support extended reasoning and long streaming generations.

Authentication Headers ​

Protocol PrefixHeaderValue Format
/v1/chat/*, /v1/responses, /v1/images/*, /v1/audio/*, /v1/embeddings, /v1/rerank, /v1/videos, /v1/modelsAuthorizationBearer sk-...
/v1/messagesx-api-key + anthropic-versionsk-... and 2023-06-01
/v1beta/models/*x-goog-api-keysk-...

Response Tracing Headers ​

HeaderDescription
x-oneapi-request-idUnique gateway trace ID returned on every response. Include this ID when querying Console Logs or contacting support.
content-typeapplication/json for standard calls; text/event-stream for SSE streaming calls.

Standard Error Envelope ​

All 4xx and 5xx OpenAI-compatible responses return a structured JSON error payload:

json
{
  "error": {
    "message": "Invalid API key provided.",
    "type": "invalid_request_error",
    "param": "",
    "code": "invalid_api_key"
  }
}

See Errors, Codes & Request ID for full remediation and retry guidance.

Vanix AI Unified Model Gateway · https://api.vanix.io