API Reference
The Xinference REST API is built with FastAPI and follows OpenAPI conventions. Routes live under two prefixes: management resources (deployments, deployable models) are under /api/v1, while account, organization, billing, and the OpenAI-compatible inference proxy are under /v1.
Base URL
https://api.xinference.co
Authentication
The management API authenticates with an HttpOnly session cookie issued when a user signs in (email/password) or completes Google SSO; these endpoints reject Authorization headers. The inference endpoints (/v1/chat/completions, /v1/embeddings) additionally accept an API key as Authorization: Bearer xi-sk-…. See Authentication for sign-in, SSO, password reset, and API keys.
Content Type
All request and response bodies use JSON:
Content-Type: application/json
Pagination
List endpoints that paginate accept limit and offset query parameters. For example, the deployments list:
GET /api/v1/model-deployments?limit=100&offset=0
Paginated responses include:
{
"items": [ ... ],
"total": 142,
"limit": 100,
"offset": 0
}
Health Check
GET /healthz
Returns {"status": "ok"} when the API is healthy. No authentication required.
API Sections
OpenAPI Spec
The interactive OpenAPI documentation is served by FastAPI at:
GET /docs # Swagger UI
GET /redoc # ReDoc UI
GET /openapi.json
Inference & SDK Compatibility
The inference endpoints (/v1/chat/completions and /v1/embeddings) are OpenAI-compatible: they accept OpenAI-style request bodies and return OpenAI-style responses, proxied to your running deployment. They authenticate with an API key (Authorization: Bearer xi-sk-…) or the session cookie, so the official OpenAI SDKs work by pointing the base URL at Xinference. See the Inference API for details.