API reference
Operayde Gateway API
OpenAPI 3.1.0 · v1.0.0
OpenAI-compatible chat completions, embeddings, and virtual-key management. Served by the appliance-resident gateway. Requests never leave the customer network unless the caller explicitly selects a cloud provider in their routing policy.
| Base URL | Environment |
|---|---|
| https://{appliance}.internal/v1 | Appliance, in-cluster |
| https://api.operayde.com/v1 | Hosted central endpoint (control-plane only) |
chat
Chat completions
/chat/completionsCreate a chat completionOpenAI-compatible chat completions. Routing decisions (local vs cloud, which model, which silicon) are made by the appliance based on the virtual key's policy.
Request body (required) · application/json
ChatRequest
| Field | Type | Notes |
|---|---|---|
| model* | string | |
| messages* | array<ChatMessage> | |
| temperature | number | |
| max_tokens | integer | |
| stream | boolean | |
| route_hint | string | Optional override ('local-only', 'cloud-ok'). Ignored if the key's policy forbids it. |
Example · Simple completion
{
"model": "operayde/llama-3.1-70b",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Summarise the attached contract."
}
],
"temperature": 0.2
}Responses
200Chat completion response
ChatResponse
| Field | Type | Notes |
|---|---|---|
| id | string | |
| model | string | |
| created | integer | |
| choices | array<object> | |
| usage | object |
401Missing or invalid bearer.
Error
| Field | Type | Notes |
|---|---|---|
| error | string | |
| code | string | |
| detail | string |
403Policy denied the request.
Error
| Field | Type | Notes |
|---|---|---|
| error | string | |
| code | string | |
| detail | string |
429Per-tenant or per-key rate limit exceeded.
Error
| Field | Type | Notes |
|---|---|---|
| error | string | |
| code | string | |
| detail | string |
embeddings
Text embeddings
/embeddingsCreate embeddingsReturns a dense vector embedding for each input string. Embeddings are computed locally on the appliance by default.
Request body (required) · application/json
EmbeddingsRequest
| Field | Type | Notes |
|---|---|---|
| model* | string | |
| input* | oneOf<string | array<string>> |
Responses
200Embeddings response
EmbeddingsResponse
| Field | Type | Notes |
|---|---|---|
| model | string | |
| data | array<object> |
401Missing or invalid bearer.
Error
| Field | Type | Notes |
|---|---|---|
| error | string | |
| code | string | |
| detail | string |
keys
Virtual-key management
/keysList virtual keysResponses
200List of virtual keys for the calling tenant.
| Field | Type | Notes |
|---|---|---|
| data | array<VirtualKey> |
/keysCreate a virtual keyRequest body (required) · application/json
VirtualKeyCreate
| Field | Type | Notes |
|---|---|---|
| label* | string | |
| policy_id* | string |
Responses
201Created
allOf<VirtualKey & object>
/keys/{id}Revoke a virtual keyResponses
204Revoked
404Resource does not exist.
Error
| Field | Type | Notes |
|---|---|---|
| error | string | |
| code | string | |
| detail | string |
models
Model registry
/modelsList available modelsResponses
200Model registry entries visible to the calling tenant.
| Field | Type | Notes |
|---|---|---|
| data | array<Model> |
health
Operational probes
/healthLiveness probeResponses
200Gateway is responsive.
| Field | Type | Notes |
|---|---|---|
| status | string | |
| uptime_s | integer |