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
| Field | Type | Notes |
|---|---|---|
model | string | A model ID from /models |
messages | array | 1 to 64 messages with role (system, user, assistant) and text content |
max_tokens | integer | Optional, up to 8,192 |
temperature | number | Optional, 0 to 2 |
stream | boolean | Optional; 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
| Status | Meaning |
|---|---|
| 400 | Invalid request |
| 401 | Missing or invalid key |
| 402 | Not enough credits |
| 403 | Account suspended |
| 429 | Rate or spending limit reached |
| 502 | The provider failed; nothing was charged |