API documentation

OpenAI-compatible. Authenticate with Authorization: Bearer dsk_…

Base URL

https://devsaio.lol/v1

List models

curl https://devsaio.lol/v1/models \ -H "Authorization: Bearer $DEVSAIO_API_KEY"

Chat completions

curl https://devsaio.lol/v1/chat/completions \ -H "Authorization: Bearer $DEVSAIO_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: order-1042" \ -d '{ "model": "claude-haiku-4-5", "messages": [{"role":"user","content":"Hello!"}], "stream": false }'

Python

from openai import OpenAI client = OpenAI(base_url="https://devsaio.lol/v1", api_key="dsk_…") r = client.chat.completions.create(model="claude-haiku-4-5", messages=[{"role":"user","content":"Hi"}]) print(r.choices[0].message.content)

Endpoints

GET /modelslive
POST /chat/completionslive
POST /images/generationslive
POST /embeddingslive
POST /videos/generationslive
POST /audio/speechlive

Errors

Errors use {"error":{"message","type","code","request_id"}}.

401 invalid key · 402 insufficient balance · 404 unknown model · 409 duplicate Idempotency-Key · 429 rate limited · 502 upstream error (never charged)

Billing

Funds are reserved before each call and reconciled to the exact usage afterwards. Failed upstream calls release the reservation: you're never charged. Send an Idempotency-Key header to make retries safe.