Skip to content

AI & API

API reference

The OpenAI-compatible endpoints, authentication, metering and errors.

The API is compatible with the OpenAI chat completions format. Requests are processed by a third-party model provider, not by miners.

Base URL and authentication

Base URL: https://www.ore-compute.pro/api/v1. Send your key as a bearer token:

Terminal
$ curl https://www.ore-compute.pro/api/v1/chat/completions -H "Authorization: Bearer $ORE_API_KEY" -H "Content-Type: application/json" -d '{"model":"MODEL_ID","messages":[{"role":"user","content":"Hello"}]}'

GET /api/v1/models

Returns the model list with prices in credits per million tokens. No key needed.

POST /api/v1/chat/completions

FieldTypeNotes
modelstringA model ID from /models
messagesarray1 to 64 messages with role (system, user, assistant) and text content
max_tokensintegerOptional, up to 8,192
temperaturenumberOptional, 0 to 2
streambooleanOptional; server-sent events when true

The response follows the OpenAI format and includes usage.

Metering

The maximum cost (estimated prompt plus max_tokens) is reserved before the call. After the reply, the exact provider cost plus margin is charged and the rest released. A streamed request that is cancelled is charged for what was produced.

Errors

StatusMeaning
400Invalid request
401Missing or invalid key
402Not enough credits
403Account suspended
429Rate or spending limit reached
502The provider failed; nothing was charged