Docs
API referenceSign in

API reference

The supported public inference endpoints and request fields. Download the OpenAPI document for machine-readable schemas.

Endpoints

MethodPathPurpose
GET/v1/modelsList enabled, approved models.
GET/v1/models/{model_id}Read one approved model.
POST/v1/chat/completionsGenerate a JSON completion or SSE stream.
GET/healthWorker liveness.
GET/readyDatabase 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 / fieldPurpose
AuthorizationBearer application key.
Content-Typeapplication/json for requests.
Idempotency-KeyOptional duplicate-prevention reference.
x-request-idResponse reference for investigation.
usageProvider 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.