Reference
API reference
The supported public inference endpoints and request fields. Download the OpenAPI document for machine-readable schemas.
Endpoints
| Method | Path | Purpose |
|---|---|---|
| GET | /v1/models | List enabled, approved models. |
| GET | /v1/models/{model_id} | Read one approved model. |
| POST | /v1/chat/completions | Generate a JSON completion or SSE stream. |
| GET | /health | Worker liveness. |
| GET | /ready | Database and inference readiness. |
Chat request
POST /v1/chat/completions
curl "https://uncensoredlabs.dev/v1/chat/completions" \
-H "Authorization: Bearer $UNCENSOREDLABS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"YOUR_APPROVED_MODEL_ID","messages":[{"role":"user","content":"Hello"}],"max_tokens":256}' The body requires a model ID and messages. Set either max_tokens or max_completion_tokens, not both. Requests are bounded to 1 MiB, 128 messages, and the selected model's verified limits.
Response
Non-streaming calls return an OpenAI-compatible chat completion. Streaming calls return SSE deltas ending in data: [DONE]. Usage must be verified before final financial settlement.
| Header / field | Purpose |
|---|---|
| Authorization | Bearer application key. |
| Content-Type | application/json for requests. |
| Idempotency-Key | Optional duplicate-prevention reference. |
| x-request-id | Response reference for investigation. |
| usage | Provider token counts used in settlement. |
Health and readiness
GET /health checks liveness. GET /ready additionally checks dependencies and inference readiness; it can return 503 while the service is unavailable or launch-gated. A healthy worker alone does not prove that live inference is enabled.