OpenAPI 3.1.1 · Restricted evaluation
The Eldrim API.
Every supported operation, with its inputs, outputs and limits. This reference is generated from the published OpenAPI contract.
Base URL for OpenAI clients: https://api.eldrim.net/v1. The OpenAPI server URL omits /v1 because paths below include it. Import the specification into Swagger-compatible tools. The gateway also serves the same contract.
Updated 4 October 2026. Model access, available capacity and protocol support vary by account. Commercial launch and regulated uses remain separately gated.
Errors and HTTP methods
Gateway JSON responses carry X-Request-Id. Include it when contacting support@eldrim.ai. An empty model list is a successful authenticated lookup with no enabled models, accompanied by an access hint. A hidden model and an unknown model both return 404 model_not_found.
Unknown paths return 404 endpoint_not_found. Unsupported families return 501 endpoint_not_supported with a documentation link. Wrong methods return 405 method_not_allowed and an Allow header. OPTIONS on the supported JSON endpoints returns 204 and allowed methods. HEAD on model, account, health and documentation reads returns headers without a body, as HTTP requires.
Files, stored conversations and hosted jobs are not silently accepted. No automatic retry is appropriate for a 400, 401, 403, 404, 405 or 501. For overload and provider failures, use bounded backoff and respect Retry-After. An interrupted SSE response is incomplete; do not treat a partial answer as success.
API keys belong on your server. Cross-origin inference from a public webpage is not enabled. This static reference makes no API requests and stores no keys. JSON-pointer references such as #/components/schemas/Model refer to the expandable schemas below.
GET /healthz
Gateway health
Checks the gateway process. Does not check provider availability or model readiness.
Authentication: Public.
Responses and headers
{
"200": {
"description": "Gateway is running",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/InsufficientBalance"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/WrongMethod"
},
"413": {
"$ref": "#/components/responses/TooLarge"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"502": {
"$ref": "#/components/responses/UpstreamFailure"
},
"503": {
"$ref": "#/components/responses/Unavailable"
},
"504": {
"$ref": "#/components/responses/Timeout"
}
}GET /v1/models
List models available to your account
Account and residency filtered. A valid key with no enabled models receives data: [] with an eldrim.code of no_models_available. Contact support to review access. Prices are integer ore per million tokens.
Authentication: Eldrim bearer key.
Responses and headers
{
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Models"
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Policy": {
"description": "Account residency policy on authenticated inference.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Provider": {
"description": "Configured selected provider; present after execution was attempted.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Residency": {
"description": "Configured execution residency, not independent attestation.",
"schema": {
"type": "string"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/InsufficientBalance"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/WrongMethod"
},
"413": {
"$ref": "#/components/responses/TooLarge"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"502": {
"$ref": "#/components/responses/UpstreamFailure"
},
"503": {
"$ref": "#/components/responses/Unavailable"
},
"504": {
"$ref": "#/components/responses/Timeout"
}
}GET /v1/models/{model}
Retrieve a model
Same visibility rules as the list. Accepts an Eldrim ID or configured alias; returns the canonical ID. Encode slashes in aliases as %2F. Hidden and unknown models both return 404.
Authentication: Eldrim bearer key.
Parameters
[
{
"name": "model",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
]Responses and headers
{
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Model"
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Policy": {
"description": "Account residency policy on authenticated inference.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Provider": {
"description": "Configured selected provider; present after execution was attempted.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Residency": {
"description": "Configured execution residency, not independent attestation.",
"schema": {
"type": "string"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/InsufficientBalance"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/WrongMethod"
},
"413": {
"$ref": "#/components/responses/TooLarge"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"502": {
"$ref": "#/components/responses/UpstreamFailure"
},
"503": {
"$ref": "#/components/responses/Unavailable"
},
"504": {
"$ref": "#/components/responses/Timeout"
}
}POST /v1/chat/completions
Create a chat completion
JSON or SSE. Streaming uses choices[].delta and terminates with [DONE]. Set stream_options.include_usage=true for usage. Keep history in the client. No stored completion API. Tools and structured output depend on model/provider. A broken stream is not continued on another provider.
Authentication: Eldrim bearer key.
Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChatRequest"
},
"example": {
"model": "gemma3-12b",
"messages": [
{
"role": "user",
"content": "Explain a queue."
}
],
"max_tokens": 128
}
}
}
}Responses and headers
{
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChatResponse"
}
},
"text/event-stream": {
"schema": {
"type": "string"
},
"example": "Provider protocol SSE events; see operation description."
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Policy": {
"description": "Account residency policy on authenticated inference.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Provider": {
"description": "Configured selected provider; present after execution was attempted.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Residency": {
"description": "Configured execution residency, not independent attestation.",
"schema": {
"type": "string"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/InsufficientBalance"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/WrongMethod"
},
"413": {
"$ref": "#/components/responses/TooLarge"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"502": {
"$ref": "#/components/responses/UpstreamFailure"
},
"503": {
"$ref": "#/components/responses/Unavailable"
},
"504": {
"$ref": "#/components/responses/Timeout"
}
}| Field | Type | Required | Notes |
|---|---|---|---|
model | string | Yes | |
messages | array | Yes | |
tools | array | No | |
tool_choice | value | No | |
response_format | object | No | |
store | value | No | const: false default: false |
stream | boolean | No | default: false |
stream_options | object | No | |
temperature | number | No | |
top_p | number | No | |
stop | string or array or null | No | |
seed | integer | No | |
max_tokens | integer | No | Output limit subject to the selected model and provider. minimum: 1 |
Example body
{
"model": "gemma3-12b",
"messages": [
{
"role": "user",
"content": "Explain a queue."
}
],
"max_tokens": 128
}
POST /v1/completions
Complete a text prompt
Native text completion on enabled routes, not a chat-to-text approximation. JSON and SSE use choices[].text. Streaming ends with [DONE]; optional usage chunk. One string prompt and one completion per request. Other generation options depend on provider/model.
Authentication: Eldrim bearer key.
Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CompletionRequest"
},
"example": {
"model": "llama3.2-3b",
"prompt": "The capital of Sweden is",
"max_tokens": 16
}
}
}
}Responses and headers
{
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CompletionResponse"
}
},
"text/event-stream": {
"schema": {
"type": "string"
},
"example": "data: {\"id\":\"example\",\"model\":\"your-model\",\"choices\":[{\"index\":0,\"text\":\"Hello\",\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Policy": {
"description": "Account residency policy on authenticated inference.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Provider": {
"description": "Configured selected provider; present after execution was attempted.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Residency": {
"description": "Configured execution residency, not independent attestation.",
"schema": {
"type": "string"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/InsufficientBalance"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/WrongMethod"
},
"413": {
"$ref": "#/components/responses/TooLarge"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"502": {
"$ref": "#/components/responses/UpstreamFailure"
},
"503": {
"$ref": "#/components/responses/Unavailable"
},
"504": {
"$ref": "#/components/responses/Timeout"
}
}| Field | Type | Required | Notes |
|---|---|---|---|
model | string | Yes | |
prompt | string | Yes | One text prompt; prompt arrays and token IDs are not supported. |
n | value | No | const: 1 default: 1 |
best_of | value | No | const: 1 default: 1 |
echo | boolean | No | default: false |
suffix | string | No | Provider/model dependent. |
logprobs | integer | No | minimum: 0 maximum: 5 |
store | value | No | const: false |
stream | boolean | No | default: false |
stream_options | object | No | |
temperature | number | No | |
top_p | number | No | |
stop | string or array or null | No | |
seed | integer | No | |
max_tokens | integer | No | Output limit subject to the selected model and provider. minimum: 1 |
Example body
{
"model": "llama3.2-3b",
"prompt": "The capital of Sweden is",
"max_tokens": 16
}
POST /v1/embeddings
Create text embeddings
One string or up to 128 strings. Choose a model advertising this endpoint. The installed nomic-embed-text evaluation model produces 768 dimensions by default. Use search_document: or search_query: prefixes for retrieval. Only input tokens are charged. No vector storage is provided.
Authentication: Eldrim bearer key.
Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EmbeddingRequest"
},
"example": {
"model": "nomic-embed-text",
"input": [
"search_document: Heat can warm buildings.",
"search_query: district heating"
],
"encoding_format": "float"
}
}
}
}Responses and headers
{
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EmbeddingResponse"
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Policy": {
"description": "Account residency policy on authenticated inference.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Provider": {
"description": "Configured selected provider; present after execution was attempted.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Residency": {
"description": "Configured execution residency, not independent attestation.",
"schema": {
"type": "string"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/InsufficientBalance"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/WrongMethod"
},
"413": {
"$ref": "#/components/responses/TooLarge"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"502": {
"$ref": "#/components/responses/UpstreamFailure"
},
"503": {
"$ref": "#/components/responses/Unavailable"
},
"504": {
"$ref": "#/components/responses/Timeout"
}
}| Field | Type | Required | Notes |
|---|---|---|---|
model | string | Yes | |
input | string or array | Yes | |
encoding_format | string | No | enum: ["float", "base64"] default: "float" |
dimensions | integer | No | Optional reduced dimension count; provider/model dependent. minimum: 1 |
user | string | No | |
stream | value | No | const: false |
Example body
{
"model": "nomic-embed-text",
"input": [
"search_document: Heat can warm buildings.",
"search_query: district heating"
],
"encoding_format": "float"
}
POST /v1/responses
Create a stateless response
Native Responses protocol on enabled routes. SSE uses named response.* events ending in response.completed; response.failed/incomplete are failures. No stored response retrieval, cancellation API, compaction, previous_response_id, hosted tools or background work. Disconnect to cancel active streaming work.
Authentication: Eldrim bearer key.
Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponsesRequest"
},
"example": {
"model": "qwen3.6-35b",
"input": "Explain a queue.",
"store": false,
"max_output_tokens": 128
}
}
}
}Responses and headers
{
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponsesResponse"
}
},
"text/event-stream": {
"schema": {
"type": "string"
},
"example": "Provider protocol SSE events; see operation description."
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Policy": {
"description": "Account residency policy on authenticated inference.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Provider": {
"description": "Configured selected provider; present after execution was attempted.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Residency": {
"description": "Configured execution residency, not independent attestation.",
"schema": {
"type": "string"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/InsufficientBalance"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/WrongMethod"
},
"413": {
"$ref": "#/components/responses/TooLarge"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"502": {
"$ref": "#/components/responses/UpstreamFailure"
},
"503": {
"$ref": "#/components/responses/Unavailable"
},
"504": {
"$ref": "#/components/responses/Timeout"
}
}| Field | Type | Required | Notes |
|---|---|---|---|
model | string | Yes | |
input | string or array | Yes | |
instructions | string | No | |
max_output_tokens | integer | No | minimum: 1 |
stream | boolean | No | default: false |
store | value | No | const: false default: false |
background | value | No | const: false |
previous_response_id | null | No | |
conversation | null | No | |
tools | array | No |
Example body
{
"model": "qwen3.6-35b",
"input": "Explain a queue.",
"store": false,
"max_output_tokens": 128
}
POST /v1/messages
Create a Messages response
Anthropic-style Messages on enabled routes. SSE includes message_start, content_block events, message_delta and message_stop. Your client executes tools. A supplied Authorization header takes precedence over x-api-key, even if the bearer key is invalid.
Authentication: Eldrim bearer key or x-api-key (bearer takes precedence).
Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessagesRequest"
},
"example": {
"model": "qwen3.6-35b",
"max_tokens": 128,
"messages": [
{
"role": "user",
"content": "Explain a queue."
}
]
}
}
}
}Responses and headers
{
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessagesResponse"
}
},
"text/event-stream": {
"schema": {
"type": "string"
},
"example": "Provider protocol SSE events; see operation description."
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Policy": {
"description": "Account residency policy on authenticated inference.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Provider": {
"description": "Configured selected provider; present after execution was attempted.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Residency": {
"description": "Configured execution residency, not independent attestation.",
"schema": {
"type": "string"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/InsufficientBalance"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/WrongMethod"
},
"413": {
"$ref": "#/components/responses/TooLarge"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"502": {
"$ref": "#/components/responses/UpstreamFailure"
},
"503": {
"$ref": "#/components/responses/Unavailable"
},
"504": {
"$ref": "#/components/responses/Timeout"
}
}| Field | Type | Required | Notes |
|---|---|---|---|
model | string | Yes | |
messages | array | Yes | |
max_tokens | integer | Yes | minimum: 1 |
system | string or array | No | |
stream | boolean | No | default: false |
tools | array | No |
Example body
{
"model": "qwen3.6-35b",
"max_tokens": 128,
"messages": [
{
"role": "user",
"content": "Explain a queue."
}
]
}
POST /v1/messages/count_tokens
Count Messages input tokens (capacity pending)
Implemented capability gate, but no production-configured provider currently supports it. A visible model returns 400 invalid_request_error explaining the unsupported protocol. It is not an approximate token estimator. Never billed as inference.
Authentication: Eldrim bearer key or x-api-key (bearer takes precedence).
Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CountTokensRequest"
}
}
}
}Responses and headers
{
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CountTokensResponse"
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Policy": {
"description": "Account residency policy on authenticated inference.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Provider": {
"description": "Configured selected provider; present after execution was attempted.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Residency": {
"description": "Configured execution residency, not independent attestation.",
"schema": {
"type": "string"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/InsufficientBalance"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/WrongMethod"
},
"413": {
"$ref": "#/components/responses/TooLarge"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"502": {
"$ref": "#/components/responses/UpstreamFailure"
},
"503": {
"$ref": "#/components/responses/Unavailable"
},
"504": {
"$ref": "#/components/responses/Timeout"
}
}| Field | Type | Required | Notes |
|---|---|---|---|
model | string | Yes | |
messages | array | Yes | |
system | string or array | No | |
tools | array | No | |
stream | value | No | const: false |
POST /v1/systemone
Run a decision model
Separate decision-model protocol on approved routes. Models have endpoint=/v1/systemone. Classifies/scores input; suitability for regulated use requires a separate review.
Authentication: Eldrim bearer key.
Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SystemOneRequest"
},
"example": {
"model": "nimble-9b",
"state": "A customer asks for opening hours.",
"questions": {
"intent": {
"type": "choice",
"choices": [
"hours",
"other"
]
}
}
}
}
}
}Responses and headers
{
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SystemOneResponse"
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Policy": {
"description": "Account residency policy on authenticated inference.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Provider": {
"description": "Configured selected provider; present after execution was attempted.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Residency": {
"description": "Configured execution residency, not independent attestation.",
"schema": {
"type": "string"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/InsufficientBalance"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/WrongMethod"
},
"413": {
"$ref": "#/components/responses/TooLarge"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"502": {
"$ref": "#/components/responses/UpstreamFailure"
},
"503": {
"$ref": "#/components/responses/Unavailable"
},
"504": {
"$ref": "#/components/responses/Timeout"
}
}| Field | Type | Required | Notes |
|---|---|---|---|
model | string | Yes | |
state | string | Yes | |
questions | object | Yes | Named questions. Each specifies type choice, noul or score and any required options. |
Example body
{
"model": "nimble-9b",
"state": "A customer asks for opening hours.",
"questions": {
"intent": {
"type": "choice",
"choices": [
"hours",
"other"
]
}
}
}
GET /v1/eldrim/account
Read balance and usage
Account metadata and 30-day usage. Financial values use integer micro-SEK or exact decimal strings. Evaluation credit/usage is not proof of earned revenue.
Authentication: Eldrim bearer key.
Responses and headers
{
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Account"
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Policy": {
"description": "Account residency policy on authenticated inference.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Provider": {
"description": "Configured selected provider; present after execution was attempted.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Residency": {
"description": "Configured execution residency, not independent attestation.",
"schema": {
"type": "string"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/InsufficientBalance"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/WrongMethod"
},
"413": {
"$ref": "#/components/responses/TooLarge"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"502": {
"$ref": "#/components/responses/UpstreamFailure"
},
"503": {
"$ref": "#/components/responses/Unavailable"
},
"504": {
"$ref": "#/components/responses/Timeout"
}
}GET /v1/eldrim/requests
List recent request metadata
Newest first, scoped to the authenticated account: requests made with any of the account's API keys, and from the console's test box. key_id narrows the list to one key and never reaches another account's records. Contains execution metadata; pre-routing refusals are not recorded. No prompt or answer bodies.
Authentication: Eldrim bearer key.
Parameters
[
{
"name": "limit",
"in": "query",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 20
},
"description": "Invalid or out-of-range values fall back to 20."
},
{
"name": "key_id",
"in": "query",
"required": false,
"schema": {
"type": "string",
"pattern": "^key_[0-9a-f]{12}$"
},
"description": "Only requests made with this API key of the authenticated account, by the key ID shown in the console and in request records. An ID of another account's key returns an empty list. A value that is not a key ID returns 400."
}
]Responses and headers
{
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RequestRecord"
}
}
},
"required": [
"data"
]
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Policy": {
"description": "Account residency policy on authenticated inference.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Provider": {
"description": "Configured selected provider; present after execution was attempted.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Residency": {
"description": "Configured execution residency, not independent attestation.",
"schema": {
"type": "string"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/InsufficientBalance"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/WrongMethod"
},
"413": {
"$ref": "#/components/responses/TooLarge"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"502": {
"$ref": "#/components/responses/UpstreamFailure"
},
"503": {
"$ref": "#/components/responses/Unavailable"
},
"504": {
"$ref": "#/components/responses/Timeout"
}
}GET /v1/eldrim/requests/{id}
Read one request record
Other accounts' IDs and unknown IDs both return 404. This retrieves Eldrim execution metadata, not an OpenAI stored completion.
Authentication: Eldrim bearer key.
Parameters
[
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
]Responses and headers
{
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestRecord"
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Policy": {
"description": "Account residency policy on authenticated inference.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Provider": {
"description": "Configured selected provider; present after execution was attempted.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Residency": {
"description": "Configured execution residency, not independent attestation.",
"schema": {
"type": "string"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/InsufficientBalance"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/WrongMethod"
},
"413": {
"$ref": "#/components/responses/TooLarge"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"502": {
"$ref": "#/components/responses/UpstreamFailure"
},
"503": {
"$ref": "#/components/responses/Unavailable"
},
"504": {
"$ref": "#/components/responses/Timeout"
}
}POST /v1/eldrim/topup
Create a test-mode checkout
Currently Stripe test mode for restricted evaluation. This operation does not enable paid production; commercial release gates remain open.
Authentication: Eldrim bearer key.
Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TopupRequest"
},
"example": {
"amount_sek": 100
}
}
}
}Responses and headers
{
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri"
}
},
"required": [
"url"
]
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Policy": {
"description": "Account residency policy on authenticated inference.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Provider": {
"description": "Configured selected provider; present after execution was attempted.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Residency": {
"description": "Configured execution residency, not independent attestation.",
"schema": {
"type": "string"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/InsufficientBalance"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/WrongMethod"
},
"413": {
"$ref": "#/components/responses/TooLarge"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"502": {
"$ref": "#/components/responses/UpstreamFailure"
},
"503": {
"$ref": "#/components/responses/Unavailable"
},
"504": {
"$ref": "#/components/responses/Timeout"
}
}| Field | Type | Required | Notes |
|---|---|---|---|
amount_sek | integer | Yes | Whole SEK. The configured bounds are enforced; trial billing currently uses Stripe test mode. minimum: 100 maximum: 50000 |
Example body
{
"amount_sek": 100
}
POST /v1/eldrim/signup
Submit an access request
Public form intake for operator review. Does not automatically create an account or API key. Redirects to the site confirmation/error page.
Authentication: Public.
Request body
{
"required": true,
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 200
},
"email": {
"type": "string",
"format": "email",
"maxLength": 254
},
"company": {
"type": "string"
},
"residency": {
"type": "string"
},
"volume": {
"type": "string"
},
"use_case": {
"type": "string",
"maxLength": 4000
},
"consent": {
"const": "yes"
},
"website": {
"type": "string",
"description": "Leave empty (honeypot)."
}
},
"required": [
"name",
"email",
"consent"
]
}
}
}
}Responses and headers
{
"303": {
"description": "Form outcome redirect",
"headers": {
"Location": {
"schema": {
"type": "string",
"format": "uri"
}
}
}
},
"405": {
"$ref": "#/components/responses/WrongMethod"
}
}| Field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | |
email | string | Yes | |
company | string | No | |
residency | string | No | |
volume | string | No | |
use_case | string | No | |
consent | value | Yes | const: "yes" |
website | string | No | Leave empty (honeypot). |
POST /v1/stripe/webhook
Receive Stripe payment events
Integration endpoint for signed Stripe events, not a customer API. Raw body signature checked; webhook credits are idempotent.
Authentication: Stripe-Signature header.
Parameters
[
{
"name": "Stripe-Signature",
"in": "header",
"required": true,
"schema": {
"type": "string"
}
}
]Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}Responses and headers
{
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"received": {
"type": "boolean"
}
},
"required": [
"received"
]
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Policy": {
"description": "Account residency policy on authenticated inference.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Provider": {
"description": "Configured selected provider; present after execution was attempted.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Residency": {
"description": "Configured execution residency, not independent attestation.",
"schema": {
"type": "string"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/InsufficientBalance"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/WrongMethod"
},
"413": {
"$ref": "#/components/responses/TooLarge"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"502": {
"$ref": "#/components/responses/UpstreamFailure"
},
"503": {
"$ref": "#/components/responses/Unavailable"
},
"504": {
"$ref": "#/components/responses/Timeout"
}
}GET /openapi.json
Download this OpenAPI contract
Public JSON contract, also published at https://eldrim.ai/openapi.json.
Authentication: Public.
Responses and headers
{
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Policy": {
"description": "Account residency policy on authenticated inference.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Provider": {
"description": "Configured selected provider; present after execution was attempted.",
"schema": {
"type": "string"
}
},
"X-Eldrim-Residency": {
"description": "Configured execution residency, not independent attestation.",
"schema": {
"type": "string"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/InsufficientBalance"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"405": {
"$ref": "#/components/responses/WrongMethod"
},
"413": {
"$ref": "#/components/responses/TooLarge"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"502": {
"$ref": "#/components/responses/UpstreamFailure"
},
"503": {
"$ref": "#/components/responses/Unavailable"
},
"504": {
"$ref": "#/components/responses/Timeout"
}
}GET /docs
Open the API reference
Redirects to the static public reference on eldrim.ai.
Authentication: Public.
Responses and headers
{
"302": {
"description": "Reference redirect",
"headers": {
"Location": {
"schema": {
"type": "string",
"format": "uri"
}
}
}
}
}Unsupported operations
These families return a JSON 501 error. Keep application state and scheduling in your own system. Eldrim does not simulate moderation, media generation or training using a text answer.
/v1/assistantsand child paths/v1/audioand child paths/v1/batchesand child paths/v1/containersand child paths/v1/conversationsand child paths/v1/evalsand child paths/v1/filesand child paths/v1/fine_tuningand child paths/v1/imagesand child paths/v1/moderationsand child paths/v1/organizationand child paths/v1/projectsand child paths/v1/realtimeand child paths/v1/threadsand child paths/v1/uploadsand child paths/v1/vector_storesand child paths/v1/videosand child paths
- GET/POST/DELETE /v1/responses/{id} and child operations, including input_tokens and compact
- GET/POST/DELETE /v1/chat/completions/{id} and stored message retrieval
- DELETE /v1/models/{model} returns 405; model lifecycle belongs to the operator
Schemas and shared responses
Provider-dependent extension fields can be present where the schema allows additional properties. Financial values are integer micro-SEK, integer öre per million tokens, or exact decimal strings. Vector components and sampling parameters may be numbers; they are not money.
schemas/Error
{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
},
"code": {
"type": [
"string",
"null"
]
},
"param": {
"type": [
"string",
"null"
]
}
},
"required": [
"type",
"message"
]
},
"type": {
"type": "string",
"description": "Messages errors include type=error."
},
"documentation_url": {
"type": "string",
"format": "uri"
}
},
"required": [
"error"
]
}schemas/Usage
{
"type": "object",
"properties": {
"prompt_tokens": {
"type": "integer",
"minimum": 0
},
"completion_tokens": {
"type": "integer",
"minimum": 0
},
"total_tokens": {
"type": "integer",
"minimum": 0
}
},
"required": [
"prompt_tokens",
"total_tokens"
]
}schemas/Pricing
{
"type": "object",
"properties": {
"currency": {
"const": "SEK"
},
"input_ore_per_million_tokens": {
"type": "integer",
"minimum": 0
},
"output_ore_per_million_tokens": {
"type": "integer",
"minimum": 0
}
},
"required": [
"currency",
"input_ore_per_million_tokens",
"output_ore_per_million_tokens"
]
}schemas/Model
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"const": "model"
},
"created": {
"type": "integer",
"description": "Catalogue creation timestamp when known; 0 means unknown. Not a claim about training date."
},
"owned_by": {
"const": "eldrim"
},
"aliases": {
"type": "array",
"items": {
"type": "string"
}
},
"endpoint": {
"type": "string",
"description": "Primary endpoint."
},
"endpoints": {
"type": "array",
"items": {
"type": "string"
},
"description": "Protocols with at least one route allowed by this account and residency. Does not promise current capacity or every optional provider feature."
},
"pricing": {
"$ref": "#/components/schemas/Pricing"
},
"context_tokens": {
"type": "integer",
"minimum": 1,
"description": "Configured prompt window, omitted when unknown."
},
"tokenizer": {
"type": "string"
}
},
"required": [
"id",
"object",
"created",
"owned_by",
"endpoint",
"endpoints",
"aliases",
"pricing"
]
}schemas/Models
{
"type": "object",
"properties": {
"object": {
"const": "list"
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Model"
}
},
"eldrim": {
"type": "object",
"properties": {
"code": {
"const": "no_models_available"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
]
}
},
"required": [
"object",
"data"
]
}schemas/Message
{
"type": "object",
"properties": {
"role": {
"type": "string"
},
"content": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "object"
}
},
{
"type": "null"
}
]
},
"tool_calls": {
"type": "array",
"items": {
"type": "object"
}
},
"tool_call_id": {
"type": "string"
}
},
"required": [
"role"
],
"additionalProperties": true
}schemas/ChatRequest
{
"type": "object",
"properties": {
"model": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Message"
}
},
"tools": {
"type": "array",
"items": {
"type": "object"
}
},
"tool_choice": {},
"response_format": {
"type": "object"
},
"store": {
"const": false,
"default": false
},
"stream": {
"type": "boolean",
"default": false
},
"stream_options": {
"type": "object",
"properties": {
"include_usage": {
"type": "boolean",
"default": false
}
},
"additionalProperties": true
},
"temperature": {
"type": "number"
},
"top_p": {
"type": "number"
},
"stop": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"seed": {
"type": "integer"
},
"max_tokens": {
"type": "integer",
"minimum": 1,
"description": "Output limit subject to the selected model and provider."
}
},
"required": [
"model",
"messages"
],
"additionalProperties": true,
"description": "Stateless chat. Optional sampling, tools, images and structured output depend on the selected model/provider. Tool execution belongs to the client. store=true is refused."
}schemas/ChatResponse
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"const": "chat.completion"
},
"created": {
"type": "integer"
},
"model": {
"type": "string"
},
"choices": {
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {
"type": "integer"
},
"message": {
"$ref": "#/components/schemas/Message"
},
"finish_reason": {
"type": [
"string",
"null"
]
}
},
"required": [
"index",
"message",
"finish_reason"
]
}
},
"usage": {
"$ref": "#/components/schemas/Usage"
}
},
"required": [
"id",
"model",
"choices"
]
}schemas/CompletionRequest
{
"type": "object",
"properties": {
"model": {
"type": "string"
},
"prompt": {
"type": "string",
"description": "One text prompt; prompt arrays and token IDs are not supported."
},
"n": {
"const": 1,
"default": 1
},
"best_of": {
"const": 1,
"default": 1
},
"echo": {
"type": "boolean",
"default": false
},
"suffix": {
"type": "string",
"description": "Provider/model dependent."
},
"logprobs": {
"type": "integer",
"minimum": 0,
"maximum": 5
},
"store": {
"const": false
},
"stream": {
"type": "boolean",
"default": false
},
"stream_options": {
"type": "object",
"properties": {
"include_usage": {
"type": "boolean",
"default": false
}
},
"additionalProperties": true
},
"temperature": {
"type": "number"
},
"top_p": {
"type": "number"
},
"stop": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"seed": {
"type": "integer"
},
"max_tokens": {
"type": "integer",
"minimum": 1,
"description": "Output limit subject to the selected model and provider."
}
},
"required": [
"model",
"prompt"
],
"additionalProperties": true
}schemas/CompletionResponse
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"const": "text_completion"
},
"created": {
"type": "integer"
},
"model": {
"type": "string"
},
"choices": {
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {
"type": "integer"
},
"text": {
"type": "string"
},
"logprobs": {
"type": [
"object",
"null"
]
},
"finish_reason": {
"type": [
"string",
"null"
]
}
},
"required": [
"index",
"text",
"finish_reason"
]
}
},
"usage": {
"$ref": "#/components/schemas/Usage"
}
},
"required": [
"id",
"object",
"model",
"choices",
"usage"
]
}schemas/EmbeddingRequest
{
"type": "object",
"properties": {
"model": {
"type": "string"
},
"input": {
"oneOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1,
"maxItems": 128
}
]
},
"encoding_format": {
"type": "string",
"enum": [
"float",
"base64"
],
"default": "float"
},
"dimensions": {
"type": "integer",
"minimum": 1,
"description": "Optional reduced dimension count; provider/model dependent."
},
"user": {
"type": "string"
},
"stream": {
"const": false
}
},
"required": [
"model",
"input"
],
"description": "Text only. Token arrays are refused. Use a model advertising /v1/embeddings, such as nomic-embed-text for authorised evaluation accounts.",
"additionalProperties": true
}schemas/EmbeddingResponse
{
"type": "object",
"properties": {
"object": {
"const": "list"
},
"model": {
"type": "string"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"object": {
"const": "embedding"
},
"index": {
"type": "integer",
"minimum": 0
},
"embedding": {
"oneOf": [
{
"type": "array",
"items": {
"type": "number"
}
},
{
"type": "string",
"description": "Base64-encoded float32 vector."
}
]
}
},
"required": [
"object",
"index",
"embedding"
]
}
},
"usage": {
"type": "object",
"properties": {
"prompt_tokens": {
"type": "integer",
"minimum": 0
},
"total_tokens": {
"type": "integer",
"minimum": 0
}
},
"required": [
"prompt_tokens",
"total_tokens"
]
}
},
"required": [
"object",
"model",
"data",
"usage"
]
}schemas/ResponsesRequest
{
"type": "object",
"properties": {
"model": {
"type": "string"
},
"input": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "object"
}
}
]
},
"instructions": {
"type": "string"
},
"max_output_tokens": {
"type": "integer",
"minimum": 1
},
"stream": {
"type": "boolean",
"default": false
},
"store": {
"const": false,
"default": false
},
"background": {
"const": false
},
"previous_response_id": {
"type": "null"
},
"conversation": {
"type": "null"
},
"tools": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"const": "function"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"parameters": {
"type": "object"
}
},
"required": [
"type",
"name"
]
}
}
},
"required": [
"model",
"input"
],
"additionalProperties": true,
"description": "Native provider protocol. Only inline, stateless requests and client-executed function tools. Remote files/URLs, hosted tools and server-side conversation state are refused. Supported fields depend on provider."
}schemas/ResponsesResponse
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"const": "response"
},
"model": {
"type": "string"
},
"status": {
"type": "string"
},
"output": {
"type": "array",
"items": {
"type": "object"
}
},
"usage": {
"type": "object",
"properties": {
"input_tokens": {
"type": "integer"
},
"output_tokens": {
"type": "integer"
},
"total_tokens": {
"type": "integer"
}
}
}
},
"required": [
"id",
"output"
],
"additionalProperties": true
}schemas/MessagesRequest
{
"type": "object",
"properties": {
"model": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Message"
}
},
"max_tokens": {
"type": "integer",
"minimum": 1
},
"system": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "object"
}
}
]
},
"stream": {
"type": "boolean",
"default": false
},
"tools": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"input_schema": {
"type": "object"
},
"type": {
"enum": [
"custom",
null
]
}
},
"required": [
"name",
"input_schema"
]
}
}
},
"required": [
"model",
"messages",
"max_tokens"
],
"additionalProperties": true,
"description": "Native Anthropic-style Messages with inline content and client-executed tools on enabled routes. No hosted tools, URL fetches or stored conversation."
}schemas/MessagesResponse
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"const": "message"
},
"role": {
"const": "assistant"
},
"model": {
"type": "string"
},
"content": {
"type": "array",
"items": {
"type": "object"
}
},
"stop_reason": {
"type": [
"string",
"null"
]
},
"usage": {
"type": "object",
"properties": {
"input_tokens": {
"type": "integer"
},
"output_tokens": {
"type": "integer"
}
}
}
},
"required": [
"id",
"type",
"content"
],
"additionalProperties": true
}schemas/CountTokensRequest
{
"type": "object",
"properties": {
"model": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Message"
}
},
"system": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "object"
}
}
]
},
"tools": {
"type": "array",
"items": {
"type": "object"
}
},
"stream": {
"const": false
}
},
"required": [
"model",
"messages"
],
"additionalProperties": true
}schemas/SystemOneRequest
{
"type": "object",
"properties": {
"model": {
"type": "string"
},
"state": {
"type": "string"
},
"questions": {
"type": "object",
"additionalProperties": {
"type": "object"
},
"description": "Named questions. Each specifies type choice, noul or score and any required options."
}
},
"required": [
"model",
"state",
"questions"
],
"description": "Decision-model protocol; see the developer guide for question formats. Not a general moderation or regulated decision service.",
"additionalProperties": true
}schemas/SystemOneResponse
{
"type": "object",
"properties": {
"model": {
"type": "string"
},
"answers": {
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"usage": {
"type": "object",
"properties": {
"input_tokens": {
"type": "integer"
},
"output_tokens": {
"type": "integer"
}
}
}
},
"required": [
"model"
],
"additionalProperties": true
}schemas/Account
{
"type": "object",
"properties": {
"customer": {
"type": "string"
},
"residency": {
"enum": [
"se",
"eu",
"any"
]
},
"balance_micro_sek": {
"type": "integer",
"description": "Signed integer micro-SEK; 1 SEK = 1000000 micro-SEK."
},
"balance_sek": {
"type": "string"
},
"usage_30d": {
"type": "array",
"items": {
"type": "object",
"description": "Per-model totals with integer token counts and price_micro_sek; price_sek is a decimal string."
}
}
},
"required": [
"customer",
"residency",
"balance_micro_sek",
"balance_sek",
"usage_30d"
]
}schemas/RequestRecord
{
"type": "object",
"properties": {
"request_id": {
"type": "string"
},
"ts": {
"type": "string",
"format": "date-time"
},
"key_id": {
"type": [
"string",
"null"
],
"pattern": "^key_[0-9a-f]{12}$",
"description": "Public ID of the account's API key that made the request, as shown in the console, for example key_3f9a1b2c4d5e. Null for requests from the console's test box and for requests recorded before key IDs existed."
},
"model": {
"type": "string"
},
"provider": {
"type": [
"string",
"null"
]
},
"residency": {
"type": [
"string",
"null"
]
},
"status": {
"type": "integer"
},
"result": {
"type": "string"
},
"prompt_tokens": {
"type": "integer"
},
"completion_tokens": {
"type": "integer"
},
"price_micro_sek": {
"type": "integer"
},
"price_sek": {
"type": "string"
},
"routing": {
"type": [
"object",
"null"
]
}
},
"required": [
"request_id",
"ts",
"key_id",
"model",
"status",
"result",
"price_micro_sek"
],
"description": "Account-scoped execution metadata, not stored prompt/response content or independent location attestation. Any of the account's keys can read records made with its other keys."
}schemas/TopupRequest
{
"type": "object",
"properties": {
"amount_sek": {
"type": "integer",
"minimum": 100,
"maximum": 50000,
"description": "Whole SEK. The configured bounds are enforced; trial billing currently uses Stripe test mode."
}
},
"required": [
"amount_sek"
]
}schemas/CountTokensResponse
{
"type": "object",
"properties": {
"input_tokens": {
"type": "integer",
"minimum": 0
}
},
"required": [
"input_tokens"
]
}responses/BadRequest
{
"description": "Invalid input or no approved route supports the requested protocol.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
}
}
}responses/InsufficientBalance
{
"description": "Positive balance is required before inference, including token-count requests.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
}
}
}responses/Forbidden
{
"description": "Suspended account or residency policy cannot be satisfied.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
}
}
}responses/NotFound
{
"description": "Unknown endpoint, model unavailable to the account, or request record not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
}
}
}responses/WrongMethod
{
"description": "Method not allowed. Read the Allow response header.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
},
"Allow": {
"schema": {
"type": "string"
}
}
}
}responses/TooLarge
{
"description": "Inference request exceeds the 8 MiB limit.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
}
}
}responses/RateLimited
{
"description": "Capacity or rate limit; inspect Retry-After if present.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
},
"Retry-After": {
"schema": {
"type": "string"
}
}
}
}responses/Unsupported
{
"description": "Recognised API family/operation is not implemented. No request was forwarded.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
}
}
}responses/UpstreamFailure
{
"description": "Provider transport failure or invalid response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
}
}
}responses/Timeout
{
"description": "Provider timeout.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"headers": {
"X-Request-Id": {
"description": "Gateway request correlation ID. Keep this when contacting support.",
"schema": {
"type": "string"
}
}
}
}securitySchemes/bearerAuth
{
"type": "http",
"scheme": "bearer",
"description": "Eldrim API key. Never an OpenAI or Anthropic key."
}securitySchemes/apiKeyAuth
{
"type": "apiKey",
"in": "header",
"name": "x-api-key",
"description": "Messages endpoints only; Authorization takes precedence."
}