Skip to content

OpenViking Gateway Management API ​

The management API lets you check permissions, configure upstreams and context profiles, issue gateway keys, and read usage and logs. All paths start with /gateway/admin/ and are served by the gateway itself: when the gateway runs inside OpenViking Server, use the server's port (1933 by default); when it runs standalone, use the gateway's own port (1935 by default). The examples set SERVER_URL to that address without any path, such as http://127.0.0.1:1933.

Model clients do not call these endpoints. They use a gateway key on /gateway/v1/*, /gateway/api/v3/* or /gateway/api/compatible/v1/*; see OpenViking Gateway.

Credentials and account scope ​

Every management request carries an OpenViking API key in X-API-Key or Authorization: Bearer. The gateway asks OpenViking which account, user and role the key belongs to, and caches the answer for up to 30 seconds. Local dev mode needs no key; the caller is always the root identity default/default. The gateway does not support trusted authentication.

Upstreams and context profiles (called policies in the API) belong to an account and are shared by its users. A request acts on the caller's account by default. Root can name another account with the account_id query parameter; admins and users can only reach their own account.

The deployer can also set a gateway management key (see Gateway management key). Once it is set, requests that change upstreams or context profiles must carry it in X-OpenViking-Gateway-Management-Key, including requests from OpenViking admins and root. A request that carries a wrong management key gets 401 management_key_invalid right away; it is not quietly treated as read-only.

OperationNo management key setManagement key set
Read upstreams and context profilesAny user in the accountAny user in the account; the management key alone also works, for any account
Create, change or delete upstreams and context profiles; test upstreamsAny user in the accountOnly requests with the correct management key
Import OpenViking's model settingsRoot in an embedded deployment (including local dev)Only requests with the correct management key, and only in an embedded deployment
Issue, read and revoke gateway keys; reset savingUsers: their own keys; admins: their account; root: the selected accountSame; the management key adds no rights
Read logs and the overviewUsers: their own records; admins and root: the whole accountSame; always needs an OpenViking identity
Delete a user's gateway dataAn admin of that account, or rootSame
Delete an account's gateway dataRootSame

The management key works on its own, without an OpenViking API key, which suits automation scripts. With it alone you can read and write upstreams and context profiles and call /access, choosing the account with account_id (default when omitted). Issuing keys and reading logs and the overview always need an OpenViking identity, and sending both credentials does not give those operations any extra rights. Setting, changing or removing the management key does not affect gateway keys already issued.

Read-only views of upstreams leave out the API key, header values and header names; they keep only has_api_key and auth_mode.

Access and discovery ​

MethodPathReturns
GET/gateway/admin/accessThe caller's permissions: managed, can_write_objects, can_import_vlm, can_issue_for_others, role, account_id, user_id, warnings
GET/gateway/admin/overviewA summary of the latest 10,000 log records the caller can see: usage, cache hits, recall, saving problems, OpenViking status and log retention
GET/gateway/admin/logsA JSON array of the newest log records the caller can see, newest first; limit defaults to 200, range 1–1000. See Log records.
GET/gateway/admin/guidesThe client address base_url, plus public_url_configured; base_url is public_url followed by /gateway, or the request's origin followed by /gateway when public_url is empty
GET/gateway/admin/toolsThe OpenViking tools available to the caller, with names, descriptions and annotations, read with the caller's own OpenViking key (root: with the OpenViking key of a gateway key issued in this account, or the last catalog read, since OpenViking refuses root on /mcp)

Studio decides which buttons to show from /access alone, and your own management tools should do the same. When a standalone gateway connects to the public OpenViking service without a management key, warnings includes public_openviking_without_management_key. It is only a warning and does not restrict anything.

bash
curl "$SERVER_URL/gateway/admin/access" \
  -H "X-API-Key: $OPENVIKING_API_KEY"
json
{
  "managed": true,
  "can_write_objects": false,
  "can_import_vlm": false,
  "can_issue_for_others": true,
  "role": "admin",
  "account_id": "team",
  "user_id": "alice",
  "warnings": []
}

If OpenViking rejects the API key, the response is 401 openviking_http_401.

Log records ​

The log holds metadata only, never message content, keys or error messages. Every request to a model route (except .../models) writes exactly one record, whichever way it ends: answered, refused by the gateway, failed at the provider, cut off mid-stream, or abandoned by the client. A request that saves its turn writes the record after the save. With the default request_log_sink: store, a request that failed before its key was confirmed has no account and is not stored; the stdout and file sinks write it with account and user_id set to null. Fields are left out when they do not apply.

FieldMeaning
timeWhen the record was written, in epoch seconds
event, schemarequest and 2 for a request record
request_idThe gateway's ID for the request; error bodies on model routes carry it too
received_at, method, endpointWhen the gateway received the request (epoch seconds), its HTTP method, and messages, count_tokens, chat, responses, responses_item or other
kinduser, continuation, auxiliary, subagent, count or passthrough; see Requests
model, streamThe model name the client sent, and whether it asked for a stream
statusThe HTTP status the client received: the provider's when the gateway relayed it, the gateway's own for a gateway error, 499 when the client left before any response
upstream_attempted, upstream_statusWhether the gateway sent a request to the provider (a compaction summary call included), and the provider's HTTP status when it answered
error_reason, error_origin, error_classFor any failure, a stream that failed after 200 included: the reason, where it came from (gateway, openviking, upstream or client), and a coarse class (api_key_invalid, quota_or_order, openviking_unavailable, config_error, gateway_internal, timeout, model_error or client_cancelled). A provider error the gateway relayed is upstream_error
upstream_error_codeThe code (else type) of the provider's error body, or of an error event inside its stream, when it is a short identifier; never its message
stream_error, client_disconnectedWhy a response body that had started did not end normally (upstream_timeout, upstream_disconnected, upstream_event for an error event the provider sent, client_disconnected, a tool_* reason or internal_error), and true when the client went away
upstream_id, credential_id, openviking_accountThe upstream that served the request, the gateway key that sent it, and the OpenViking account behind that key
session, protocolThe conversation and its protocol; use them to reset saving
peerThe request's peer, from X-OpenViking-Actor-Peer or the key's default
degradationIssue code; see Issues on degraded requests
degradationsEvery issue of the request, in order. It can also hold recall_failed: the memory search got no answer from OpenViking (recall_reason says why), which never becomes degradation; and prepare_timeout: adding memory took longer than prepare_timeout_seconds
revocation_reasonWhy OpenViking could not confirm the key, with revocation_check_unavailable
session_sourceHow the conversation was found: header (X-OpenViking-Session), reply_match (the history continues one conversation's reply) or new
recall_reason, recall_count, recall_msMemory search result code, entries added and search time; see No memory is added
replay_hitsEarlier messages whose memory was replayed unchanged
capture_status, capture_reasonSaving status: active, disabled, or failed when this request ended a turn and writing it to OpenViking failed. The reason is the failure's (an OpenViking reason such as openviking_http_503, openviking_unavailable or openviking_circuit_open, or save_timeout or save_failed), or else the reason stored with the conversation, such as manual_reset; see Saving status
capture_messages, openviking_sessionOn a request that saved its turn: how many messages it wrote, and the OpenViking session it wrote them to
tool_skip_reasonWhy the request got no OpenViking tools; see When tools are not offered
tool_stop_reasontoken_budget when the tool token budget refused further calls; see Limits
compaction_failedWhy compaction failed (with still_over_threshold the summary was kept); see Long conversations hit the context limit
context_tokens, context_windowEstimated context size, and the window it was compared with
input_tokens, output_tokens, cached_tokens, cache_write_tokensToken usage summed over every provider call of the request, OpenViking tool rounds included. input_tokens includes cached and cache-write tokens.
duration_msTime from sending the request to the provider until the reply finished
read_ms, auth_ms, route_ms, prepare_msTime spent reading the body, checking the key (with OpenViking), choosing the upstream, and preparing memory (recall and compaction included)
added_ms, upstream_ttfb_ms, first_chunk_ms, total_msTime from receipt until the provider request started, from that start until the provider's response headers, from receipt until the first streamed chunk reached the client, and from receipt until the record was written
compaction_msTime spent on compaction, also when it failed
bookkeeping_failedSteps that failed after the reply was sent: completed (recording the reply for later requests) or responses (remembering a Responses ID). A failed save is reported in capture_status instead

Fields that start with first_upstream_ and hidden_upstream_ split the token usage between the first provider call and the OpenViking tool rounds; the first-call cache hit rate uses the first group.

/overview aggregates these records. Besides usage and cache figures, it returns degradations (issue code → count), capture_issues ({"failed": n}: conversations whose latest record says a finished turn was not saved), cache_alerts, openviking (OpenViking's status, plus reason when degraded) and log_retention_days.

Status line ​

With snapshot_interval_seconds above zero, each gateway process writes one JSON line at that interval; see Status line for where it goes. With the store sink the line is logged at INFO by the openviking_gateway.snapshot logger, and goes to stderr when the host has configured no log handler. Counts cover the interval since the previous line of the same process. It never carries an account, user, session, model or request ID.

json
{"event": "snapshot", "schema": 1, "time": 1794787200.0, "interval_s": 60.0,
 "uptime_s": 8640.2, "version": "0.5.6",
 "inflight_requests": 12, "inflight_streams": 9,
 "requests": 480, "errors": {"upstream_timeout": 2, "store_unavailable": 1},
 "degradations": {"recall_failed": 4},
 "stream_errors": {"client_disconnected": 3},
 "rejected_overload": 0,
 "records_unlogged": 0, "records_failed": 0, "records_dropped": 0,
 "store_errors": 1,
 "openviking": {"state": "ok", "reason": "", "open_circuits": 0},
 "capture": {"delivered": 18, "failed": 0}}
FieldMeaning
time, interval_s, uptime_s, versionWhen the line was written (epoch seconds), seconds since the previous line, seconds since the process started, and the installed OpenViking version
inflight_requests, inflight_streamsModel requests between receipt and the end of their response, and those of them whose response is streaming, when the line was written
requestsRequest records written in the interval
errors, degradations, stream_errorsThose records counted by error_reason, by each entry of degradations, and by stream_error
rejected_overloadRequests refused with gateway_overloaded because the process was at max_inflight_requests
records_unloggedRecords the store sink did not keep because the request had no account
records_failed, records_droppedRecords the sink failed to write, and records the file sink dropped because its queue was full
store_errorsRequests that failed or lost their memory on a state store error (store_unavailable, or the issue memory_store_failure)
openviking.state, openviking.reasonThe gateway's last OpenViking status check: ok, degraded or starting, and the reason when degraded
openviking.open_circuitsOpenViking accounts whose calls are skipped right now because they stopped answering; see OpenViking is degraded
capture.deliveredFinished turns this process wrote to OpenViking in the interval
capture.failedFinished turns whose write failed in this process in the interval. Both counts are per process and can be summed across processes

Upstreams and context profiles ​

MethodPathDescription
GET/gateway/admin/upstreamsList upstreams
GET/gateway/admin/upstreams/{identifier}Read one upstream
PUT/gateway/admin/upstreams/{identifier}Create or replace an upstream
DELETE/gateway/admin/upstreams/{identifier}Delete an upstream no key uses
POST/gateway/admin/upstreams/{identifier}/testTest the upstream connection or a model
POST/gateway/admin/upstreams/import-vlmImport OpenViking's model settings
GET/gateway/admin/policiesList context profiles
GET/gateway/admin/policies/{identifier}Read one context profile
PUT/gateway/admin/policies/{identifier}Create or replace a context profile
DELETE/gateway/admin/policies/{identifier}Delete a context profile no key uses

The caller chooses the IDs. PUT takes the complete object, and unknown fields fail validation. The meaning, default and range of every field are in the Configuration reference.

An upstream's api_key and headers are write-only:

  • While base_url stays the same, a blank or missing api_key keeps the stored key, and a missing headers keeps all stored headers. A headers object replaces the whole set; an entry with an empty value keeps the value stored under that name.
  • Changing base_url clears the stored API key and all header values. Send the credentials the new address needs in the same request, so a stored key is never sent to a different address.
  • The editable view returns has_api_key and header_names, never the values.
bash
curl -X PUT "$SERVER_URL/gateway/admin/upstreams/openai?account_id=team" \
  -H "X-OpenViking-Gateway-Management-Key: $GATEWAY_MANAGEMENT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"OpenAI","protocol":"chat","base_url":"https://api.openai.com/v1","api_key":"<provider-key>"}'

Deleting an object that gateway keys still use returns 409 in_use with key_count. Revoke those keys first. If you only want requests to stop reaching an upstream right away, turn it off instead of deleting it.

Upstream tests ​

POST /gateway/admin/upstreams/{identifier}/test supports two modes. An empty {} body checks the connection with GET /v1/models. A {"model":"<model-name>"} body sends one small, non-streaming generation request with the stored credentials and headers. The model name is resolved through the upstream's aliases. Model requests use the configured Chat Completions, Responses or Anthropic Messages endpoint, including an exact endpoint URL when path appending is off. When gateway tools are allowed, they include the account's OpenViking tools filtered by the default context profile; a temporary tool-catalog failure falls back to a request without tools. The model test does not set a reasoning effort, so the model uses its default.

The response includes {ok, kind, status, reason, url}, where kind is connection or model. Failed tests also include the upstream HTTP response in response, with http_version, status, reason, headers, body and an optional truncated flag. The body is limited to 16 KiB; status is left out when no response arrived. The timeout is the smaller of the configured upstream timeout and 60 seconds. Running either test requires write access; model tests make a real provider request and may incur a small charge.

Anthropic tests send the key in both x-api-key and Authorization: Bearer and default anthropic-version to 2023-06-01 when the upstream headers do not set it. Chat Completions and Responses tests send only Bearer authentication. A key_header other than authorization, or {api_key} in base_url, changes this as described in Credentials; url keeps the {api_key} placeholder.

The two tests read the provider's response differently:

TestProvider responsereasonok
ConnectionThe upstream is an exact endpoint (append_endpoint_path is false), which has no model list. No request is sent; run a model test instead.exact_endpoint_untestablefalse
ModelThe Coding Plan upstream has not been approved for gateway use. No request is sent.coding_plan_blockedfalse
BothNo API key to use: none is stored, or the upstream expects each client to send its own. No request is sent.upstream_key_missingfalse
Connection2xx with a JSON object that holds a data listpassedtrue
ConnectionAny other 2xx: invalid JSON, a body over 16 KiB, no data list, or an error fieldupstream_key_rejectedfalse
Connection404 or 405: the provider has no model list, so the key is not verifiedmodels_unavailabletrue
Connection429: the address answered, but the key is not verifiedrate_limitedtrue
Model2xx with a response matching the configured model protocolpassedtrue
ModelAny other 2xx: invalid JSON, a body over 16 KiB, or a response that does not match the protocolinvalid_responsefalse
Model429rate_limitedfalse
Model404 or 405model_request_rejectedfalse
Both400 or 422model_request_rejectedfalse
Both401 or 403upstream_key_rejectedfalse
BothNetwork error, timeout, redirect, 5xx or any other statusupstream_unavailablefalse

A connection test that returns passed confirms reachability and the stored credentials. models_unavailable and rate_limited confirm only that the address is reachable; Studio shows them as Connected with a neutral badge. Run a model test to check the key. Coding Plan approval applies only to model tests, so a connection test of an unapproved Coding Plan upstream is still sent. A passed model test confirms that the selected model completed this request. It does not verify other models or authorize Coding Plan use.

Import VLM settings ​

POST /gateway/admin/upstreams/import-vlm turns OpenViking Server's VLM credentials into upstreams in the selected account. It is available only in embedded deployments; a standalone gateway returns 404 vlm_import_unavailable.

Each imported upstream gets the fixed ID vlm-<credential id>, so importing again does not create duplicates. A repeat import refreshes the fields that come from the server (base_url, api_key, headers, protocol, vendor, coding_plan, append_endpoint_path, key_header) and keeps every other field as it was edited in the gateway, including name, enabled, priority, models, aliases, context_windows and allow_coding_plan. Upstreams whose path has a coding or plan segment are marked as Coding Plan and listed under needs_confirmation until allow_coding_plan is set.

json
{
  "imported": [{"id": "vlm-default", "name": "default"}],
  "needs_confirmation": [{"id": "vlm-coding", "name": "coding"}],
  "skipped": [{"id": "vlm-codex", "reason": "openai_codex"}]
}
Skip reasonMeaning
openai_codexCodex OAuth tokens refresh periodically, so the gateway cannot use them long term.
litellm_no_api_baseThe LiteLLM credential has no api_base. Add it in the OpenViking configuration and import again.
litellm_unsupported_routeThe LiteLLM route does not use the OpenAI Chat Completions API, such as gemini/, bedrock/ or vertex_ai/. Add that provider as an upstream by hand.
invalid_configurationThe credential does not make a valid upstream, for example because the base URL is invalid.

Gateway keys ​

MethodPathDescription
GET/gateway/admin/keysList the keys the caller can see, without the secret
GET/gateway/admin/keys/{identifier}Read one visible key
POST/gateway/admin/keysIssue a key; key in the response is the only time the full secret is returned
DELETE/gateway/admin/keys/{identifier}Revoke a key; user data is kept
POST/gateway/admin/keys/{identifier}/capture/resetSave a conversation again, to a new OpenViking session
DELETE/gateway/admin/users/{user_id}/dataAdmin or root: revoke all of the user's keys and delete their conversation state and logs
DELETE/gateway/admin/account/dataRoot: delete all of the account's gateway objects, keys, conversation state and logs

Request body for issuing a key:

FieldRequiredDescription
nameYesDisplay name.
policy_idYesThe context profile to use.
upstream_idsYesThe upstreams the key may use; at least one.
modelsNoAllowed model names (as clients send them, including aliases); an empty list allows all.
user_idNoThe OpenViking user the key belongs to; defaults to the caller. Root is not an account user, so root must name one (or supply openviking_key). Users can only name themselves.
openviking_keyNoThat user's OpenViking API key. Usually not needed; see below.
default_peer_idNoThe peer requests use when they send no X-OpenViking-Actor-Peer header; see Tell memory apart by peer. It follows the rules of a message's peer_id; a blank value means none.

The gateway needs the target user's OpenViking API key, because it searches and saves memory as that user:

  • When callers (users or admins) issue a key for themselves, the gateway uses the caller's own key.
  • When an admin or root issues a key for someone else, the gateway reads that user's key from OpenViking with the caller's credentials. If OpenViking stores only key hashes, it cannot, and the response is 409 user_key_unreadable; supply the user's key in openviking_key.
  • The gateway checks the key with OpenViking: it must belong to the selected account and, when user_id is given, to that user.
  • A root API key cannot be bound to a gateway key, except default/default in local dev.
bash
curl -X POST "$SERVER_URL/gateway/admin/keys?account_id=team" \
  -H "X-API-Key: $OPENVIKING_API_KEY" -H "Content-Type: application/json" \
  -d '{"name":"Alice laptop","user_id":"alice","policy_id":"default","upstream_ids":["openai"]}'
json
{
  "id": "3f9c…",
  "name": "Alice laptop",
  "user_id": "alice",
  "policy_id": "default",
  "upstream_ids": ["openai"],
  "models": [],
  "prefix": "ovgw_Xk2pQ7a",
  "created_at": 1760000000.0,
  "revision": 1,
  "key": "ovgw_Xk2pQ7a…"
}

Save the key from the response right away; the gateway keeps only its hash. GET returns the same fields without key. Gateway keys cannot be changed and have no PUT. To change the context profile, upstreams, models, default peer or user, issue a new key and revoke the old one.

When the user's OpenViking API key is regenerated or the user is deleted, the gateway keys bound to it stop working and are deleted; the user's data stays. See Gateway keys.

Resetting saving. The body is {"session":"<session header value or the session from the log>","protocol":"chat"}, where protocol is chat, anthropic or responses. On success the response is {"status":"ready","message":"…"}, and when the conversation's next turn ends, the gateway writes the full history to a new OpenViking session. If the conversation is not found, the response is 404 not_found.

Deleting data. Both delete endpoints remove the conversation state the gateway keeps, and logs. Sessions and memories already stored in OpenViking are not affected. Retention and the other ways data is deleted are described in Security and data.

Errors ​

Error responses from the management API carry a stable top-level reason and a short English detail. Some carry extra fields, for example:

json
{"reason": "in_use", "detail": "Gateway keys still use this object; revoke them first.", "key_count": 2}

Check reason, not the text of detail. When the server does not have the gateway enabled, these paths do not exist and return 404; Studio shows this as not_enabled.

HTTPreasonMeaning and fix
401management_key_invalidThe management key is wrong. Ask the deployer for the current one, or see Lost the management key.
403management_key_requiredA management key is set, and changing upstreams or context profiles requires it.
401openviking_http_401OpenViking rejected the API key. Use a currently valid key.
401openviking_identity_missingOpenViking returned no user for this key.
403trusted_mode_unsupportedOpenViking uses trusted authentication. Switch to api_key authentication.
403other_accountThe key or the requested account is outside the caller's scope.
403forbiddenThe operation is beyond the caller's role or user scope.
403root_key_not_allowedA root API key cannot be bound to a gateway key. Use a user's API key.
409user_key_unreadableOpenViking stores only a hash of the user's key. Supply the user's key in openviking_key.
409in_usekey_count gateway keys still use this object.
400unknown_user, unknown_policy, unknown_upstreamThe named user, context profile or upstream does not exist.
400user_requiredRoot issued a key without user_id or openviking_key. Name the user the key is for.
404not_foundThe object does not exist, or the caller cannot see it.
422invalid_configurationThe request body or Base URL is invalid. The error never repeats submitted credentials.
403vlm_import_forbiddenThe caller may not import; can_import_vlm in /access is authoritative.
404vlm_import_unavailableA standalone gateway cannot read the server's model settings. Add upstreams by hand.
503openviking_unavailable, openviking_unreachable, openviking_timeoutThe gateway cannot reach OpenViking, or it did not answer in time. Check that OpenViking is running; for a standalone gateway, also check openviking_url (in gateway.conf or OPENVIKING_GATEWAY_OPENVIKING_URL).
503openviking_version_mismatchStandalone gateways only: OpenViking Server is older than required. required_version in the response gives the minimum version.

Other HTTP errors from OpenViking are reported as openviking_http_<status>. The gateway's own generic HTTP errors are reported as gateway_http_<status>, for example 405 gateway_http_405 for an unsupported method. These names apply to the management API, /uploads and /downloads; model routes use the reasons below.

Model route errors ​

An error the gateway produces on a model route (/gateway/v1/*, /gateway/api/v3/*, /gateway/api/compatible/v1/*) has the body {"reason": "...", "detail": "...", "request_id": "..."}; openviking_version_mismatch adds required_version. A provider's own error is relayed unchanged, with its status and body. The request record carries the same reason in error_reason.

StatusReasonOriginMeaning
401gateway_key_invalidgatewayThe gateway key is missing, wrong or revoked.
401openviking_key_invalidopenvikingOpenViking rejected the OpenViking API key the client sent, or the one behind the gateway key.
401openviking_identity_missingopenvikingOpenViking returned no identity for the key.
402openviking_not_orderedopenvikingOpenViking service is not ordered for the key.
403openviking_forbiddenopenvikingOpenViking refused the key.
403root_key_not_allowed, trusted_mode_unsupportedopenvikingA root key cannot back a gateway key; the gateway does not support trusted authentication.
429openviking_rate_limitedopenvikingOpenViking rate limited the key check.
503openviking_unavailableopenvikingOpenViking could not be reached, or failed, while the gateway checked a key for the first time.
503openviking_timeoutopenvikingOpenViking did not answer that check in time.
503openviking_version_mismatchopenvikingOpenViking Server is older than the gateway requires.
variesopenviking_erroropenvikingAny other OpenViking error during that check, with OpenViking's status.
403oauth_credential_unsupportedgatewayThe client or the upstream uses a Claude subscription token.
413body_too_largegatewayThe body exceeds max_body_bytes.
415compressed_body_unsupportedgatewayA key with allowed models received a content-encoded body.
400model_missinggatewayA key with allowed models received a body without a model.
403model_not_allowedgatewayThe model is not among the key's allowed models.
400, 403context_override_invalid, context_override_not_allowedgatewayX-OpenViking-Context is invalid, or the key's profile does not accept it.
400peer_invalidgatewayX-OpenViking-Actor-Peer is not a valid peer ID.
403policy_unavailablegatewayThe key's context profile no longer exists.
403upstream_url_not_allowedgatewayX-OpenViking-Upstream-URL names no upstream bound to the key.
404no_matching_upstreamgatewayNo enabled upstream bound to the key serves this protocol and model.
404upstream_endpoint_mismatchgatewayThe upstream is an exact endpoint for another path.
404, 403response_unknown, response_upstream_disallowedgatewayThe stored Responses response is not this key's, or its upstream is no longer allowed.
401upstream_key_missinggatewayNo upstream API key is stored or sent in X-OpenViking-Upstream-Key.
403coding_plan_disabledgatewayThe upstream is a Coding Plan key that is not allowed through the gateway.
503store_unavailablegatewayThe gateway's state store failed. The response carries Retry-After: 1.
503gateway_overloadedgatewayThe process already serves max_inflight_requests model requests. Nothing was sent to the provider. The response carries Retry-After: 1.
500internal_errorgatewayThe gateway failed unexpectedly. The detail is generic; the gateway's log has the traceback.
504upstream_timeoutupstreamThe provider did not start its reply, or a non-streamed reply stopped arriving, within upstream_timeout_seconds.
502upstream_unreachableupstreamThe gateway could not connect to the provider (DNS, refused connection, TLS).
502upstream_disconnectedupstreamThe provider closed the connection before its reply was complete.
502tool_upstream_invalid, tool_upstream_incomplete, tool_upstream_stream_error, tool_call_invalidupstreamDuring OpenViking tool rounds, the provider's reply was unusable, incomplete or an error, or the model called a tool it may not use.
502tool_loop_limitgatewayThe OpenViking tool rounds reached a limit.
504tool_loop_timeoutgatewayThe OpenViking tool rounds ran out of time.

A WebSocket request to a Responses route still gets an empty 426; its record says websocket_unsupported. A gateway_http_<status> reason on a model route would mean an error the gateway does not classify yet.

A 401 that a model client receives is not a management API error. It means the gateway key is missing, wrong or revoked, or the OpenViking key bound to it is no longer valid; see Clients get an error from the gateway.

Open source under the AGPL-3.0 License. Font licenses