oviYour workspace

BUILD WITH YOUR MODELS

Ovi API

Start with an API key

Create a key in your Ovi workspace. Send it as Authorization: Bearer YOUR_OVI_KEY. Keys belong to one account, expire, and can be revoked at any time. Keep them on your server, never in public browser code.

Use the same HTTPS origin as this workspace. Routes begin at /v1.

List your models

GET /v1/models
Authorization: Bearer YOUR_OVI_KEY

Requires models:read. The response contains data, an array with each model’s id, name, and online state. Copy the full model ID, including its host prefix.

Chat completions

POST /v1/chat/completions
Authorization: Bearer YOUR_OVI_KEY
Content-Type: application/json
Idempotency-Key: a-unique-request-id-at-least-16-characters

{
  "model": "HOST_ID/ovi-studio-ADAPTER_ID",
  "messages": [{"role": "user", "content": "Hello!"}],
  "max_tokens": 256,
  "stream": false
}

Requires chat:write. Returns an OpenAI-style chat.completion object with choices[0].message.content. Streaming and tool calls are not supported by this endpoint. Token usage is omitted rather than estimated.

Limits and retries

Use 1–16 messages, at most 4,000 characters each and 16 KB combined. Output limit: 1–1,024 tokens. Keep the HTTP connection open for up to 180 seconds. Your Mac must be awake with Ovi Desktop running.

Reuse an idempotency key only for the exact same request. Completed results can be recovered for 24 hours. Reusing a key with different input returns 409. A disconnected request is cancelled; it is never silently retried on another provider.

Read X-Ovi-Request-Id from response headers. To stop work, call POST /v1/requests/REQUEST_ID/cancel with the same authorization. A disconnected client also requests cancellation.

Errors

Errors use {"error":{"code":"HOST_OFFLINE"}}. 400: invalid input. 401: expired or revoked key. 403: missing scope. 404: model not owned by your account. 409: conflicting or finished request. 429: rate or concurrency limit. 503: host unavailable. 504: inference timeout.

Privacy and wallet permissions

Weights and training examples stay on the paired computer. Inference prompts and responses pass through Ovi and are retained for up to 24 hours for recovery. Private daily backups expire after seven days. API keys access models only. Wallet transactions require the signed-in account’s separate Swop consent and an explicit preview and confirmation.