GET/v1/models
List Models
Responses
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | application/json → any |
Reference
Rendered from the OpenAPI 3.1 specification of the control plane. The format is OpenAI-compatible so that client libraries work unchanged. No OpenAI services are involved.
Specification version 0.1.0 · BUILT — tested in isolation; not published
Overview
OpenAI-compatible API format. No OpenAI services are involved. Sovereign inference by MEDIA HOLDING INTELLIGENCE ECOSYSTEM.
https://sovereignai-api.mediaholding.tech/v1 — PLANNED public host (publication is a separate Founder GO)http://127.0.0.1:8796/v1 — local isolated buildhttp bearer — Authorization: Bearer sk-sov-<prefix>-<secret>. A project API key created in the cabinet (CONTRACT.md §4). The secret is shown once and stored only as an Argon2 hash.
Every response carries X-Request-Id (CONTRACT.md §4); error bodies carry the same id in error.request_id. Quote it in support requests.
Endpoints
List Models
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | application/json → any |
Get Model
| Name | In | Type | Description |
|---|---|---|---|
model_id required |
path | string |
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | application/json → any |
422 |
Validation Error | application/json → HTTPValidationError |
Chat Completions
| Field | Type | Description |
|---|---|---|
model required |
string | |
messages required |
array of Message | min items 1 |
max_tokens |
integer | null | |
temperature |
number | null | |
stream |
boolean | default false |
stream_options |
object | null | |
tools |
array of any | null | |
tool_choice |
any | null | |
response_format |
object | null | |
stop |
any | null | |
top_p |
number | null | |
seed |
integer | null | |
chat_template_kwargs |
object | null | |
user |
string | null | |
n |
integer | null | default 1 |
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | application/json → any |
422 |
Validation Error | application/json → HTTPValidationError |
Completions
Legacy text generation: mapped onto chat with a single user message (documented, not hidden).
| Field | Type | Description |
|---|---|---|
model required |
string | |
prompt required |
string | array of string | |
max_tokens |
integer | null | |
temperature |
number | null | |
stream |
boolean | default false |
stop |
any | null |
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | application/json → any |
422 |
Validation Error | application/json → HTTPValidationError |
Usage
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | application/json → any |
Health
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | application/json → any |
Schemas
| Field | Type | Description |
|---|---|---|
model required |
string | |
messages required |
array of Message | min items 1 |
max_tokens |
integer | null | |
temperature |
number | null | |
stream |
boolean | default false |
stream_options |
object | null | |
tools |
array of any | null | |
tool_choice |
any | null | |
response_format |
object | null | |
stop |
any | null | |
top_p |
number | null | |
seed |
integer | null | |
chat_template_kwargs |
object | null | |
user |
string | null | |
n |
integer | null | default 1 |
| Field | Type | Description |
|---|---|---|
model required |
string | |
prompt required |
string | array of string | |
max_tokens |
integer | null | |
temperature |
number | null | |
stream |
boolean | default false |
stop |
any | null |
| Field | Type | Description |
|---|---|---|
detail |
array of ValidationError |
| Field | Type | Description |
|---|---|---|
role required |
string | |
content |
any | default "" |
name |
string | null |
| Field | Type | Description |
|---|---|---|
loc required |
array of string | integer | |
msg required |
string | |
type required |
string | |
input |
any | |
ctx |
object |
Errors
Every error is a JSON body of one shape, with the HTTP status that names its class. The message never contains URLs, tokens, paths or upstream exception messages. Retry-After accompanies 429 and 503.
| HTTP | error.type | When |
|---|---|---|
400 | invalid_request_error | The body or parameters are invalid; also 404 with a code for an unknown model or route. |
401 | authentication_error | Missing, malformed, revoked or unknown API key. |
403 | permission_error | The key may not use this model, project or route. |
404 | invalid_request_error | Unknown model or route (code names it). |
429 | rate_limit_error · budget_exceeded | Rate limit or project budget reached; wait Retry-After seconds. |
500 | server_error | An unexpected failure on our side; quote the request id. |
503 | backend_busy · upstream_unavailable | The GPU is held by another job, or the inference provider is down; wait Retry-After seconds. No fallback to any external supplier exists. |
{
"error": {
"type": "invalid_request_error | authentication_error | permission_error | rate_limit_error | budget_exceeded | backend_busy | upstream_unavailable | server_error",
"code": "<machine-readable>",
"message": "<human-readable>",
"request_id": "<uuid>"
}
}