Skip to content

Providers API

POST /api/v1/admin/cache/ping · operation pingCache

Cache health check (ADR 0137), with a timed result per step. A remote backend (Redis or Memcached) is pinged, a one-second probe key is written, read back and compared, and the purge generation marker goes through compare-and-swap; the probe stops at the first failing step. The in-process cache reports in_process. With semantic_cache on, the chat answer cache’s PostgreSQL store is pinged too. Live entries are never touched. Latencies are milliseconds with two decimals. Unhealthy answers 503 with the same report, so a monitor can watch the status. Requires providers:read.

Authentication: adminSession

Parameters

Name In Type Description
X-CSRF-Token header string, required Token returned by admin login/session; required with the same-origin session cookie for writes.

Responses

Status Description Body
200 Healthy, with each step —
503 Unhealthy, with each step up to the failure —

GET /api/v1/admin/secret-manager · operation getSecretManagerStatus

Secret manager status (ADR 0139). With the boot flag secret_manager, a credential whose environment variable is empty and that declares no <NAME>_FILE is read by name from HashiCorp Vault (KV v2), CyberArk Conjur, AWS Secrets Manager, Google Secret Manager or Azure Key Vault (ADR 0140). Lists every name the gateway asked for, whether it resolved, when it was read and the class of the last failure (not_found, credential_unavailable, denied, unavailable, timeout, unreachable, invalid_response; credential_unavailable is the gateway failing to obtain its own cloud credential, retried like an outage while the last good value is served). Values never leave the process. Requires providers:read.

Authentication: adminSession

Responses

Status Description Body
200 The secret_manager boot settings the selected kind uses, under their YAML names, and one entry per name asked for (never a value) application/json: SecretManagerStatus
401 Missing or invalid bearer key application/json: Error
403 Model not allowed application/json: Error
404 Feature disabled application/json: Error

GET /api/v1/admin/proxy-pools · operation getProxyPools

Named outbound proxy pools (proxy_pools) declared in the YAML, the providers that require each, and the passive member health this replica observed (consecutive connection failures, ejection, successes). Never returns proxy URLs, hosts, credentials or reference names. Requires providers:read.

Authentication: adminSession

Responses

Status Description Body
200 Pools and per-replica member health application/json: object
401 Missing or invalid bearer key application/json: Error
403 Model not allowed application/json: Error
404 Feature disabled application/json: Error

Response 200 fields:

  • application/json: object
    • observed_at (string (date-time), required)
    • proxy_pools (array of ProxyPoolStatus, required, max items 32)

POST /api/v1/admin/secret-manager/refresh · operation refreshSecretManager

Reads every known name from the secret manager now and waits, for an operator who just rotated a secret (ADR 0139). A failed read keeps the last good value and is reported. Requires providers:manage.

Authentication: adminSession

Parameters

Name In Type Description
X-CSRF-Token header string, required Token returned by admin login/session; required with the same-origin session cookie for writes.

Responses

Status Description Body
200 The same status as GET, after the reads —
401 Missing or invalid bearer key application/json: Error
403 Model not allowed application/json: Error
404 Feature disabled application/json: Error

GET /api/v1/admin/provider-presets · operation listProviderPresets

Requires providers:read. Known provider endpoint presets: OpenAI-compatible providers, curated or generated from the community cost map catalog; native Anthropic, Gemini and Gemini on Vertex AI; Azure OpenAI and AI Foundry, Vertex AI, Bedrock, Databricks and Snowflake endpoints; and self-hosted runtimes. A provider naming a preset inherits protocol, base_url, auth and the conventional key variable unless it sets them.

Authentication: adminSession

Responses

Status Description Body
200 Presets application/json: object
401 Admin session required —

Response 200 fields:

  • application/json: object
    • data (array of object, required)
      • id (string, required)
      • name (string, required)
      • protocol (string, required)
      • base_url (string, required)
      • api_key_env (string)
      • auth (ProviderAuth)
      • embeddings (boolean, required)
      • models_endpoint (boolean, required)
      • local (boolean)
      • template (boolean) — base_url has a {placeholder} to fill
      • free_source (string) — The provider’s own page saying the API is free; priced at zero from it when no catalog lists the provider (ADR 0151)

PUT /api/v1/admin/providers/{id} · operation upsertAdminProvider

Create or update an OpenAI-compatible, native Anthropic Messages, native Gemini GenerateContent, TypeSafe System One or Cloudflare Workers AI provider with optimistic versioning. A supplied secret is encrypted in PostgreSQL and never returned. A blank or omitted secret retains a credential only when both old and new effective auth types are static (bearer/header). Switching to identity or none clears the stored credential atomically; returning to static auth requires a fresh secret. Explicitly deleting the override can restore the YAML credential. Native providers require their corresponding feature flag. Optional static-secret pools retain a stable primary for account-bound or unqualified operations. Pool weights/cooldowns have separate operator flags; they add no retry loop. Metadata and secrets update atomically under the same version/audit boundary. Complete request limit64KiB.

Authentication: adminSession

Parameters

Name In Type Description
id path string, required, pattern ^[a-z][a-z0-9_-]{0,63}$
X-CSRF-Token header string, required Token returned by admin login/session; required with the same-origin session cookie for writes.

Request body (required)

  • application/json: object
    • version (integer (int64), required)
    • provider (object, required)
      • network (ProviderNetworkProfile or null)
      • id (string, required)
      • protocol (string, one of "openai", "anthropic", "gemini", "systemone", "cloudflare_ai", "runway", "bedrock", "cohere", "elevenlabs", "deepgram", "stability", "replicate", "fal", "bfl", "sagemaker", "oci", "polly", "azure_speech") — Defaults to the preset protocol. bedrock translates Chat Completions to the Converse API (SigV4 or Bedrock API key; https://bedrock-runtime.&lt;region&gt;.amazonaws.com only through this API: a custom Bedrock endpoint is set in the YAML, and an override keeps it only with the YAML base_url, ADR 0172)
      • base_url (string (uri)) — Defaults to the preset URL; required for template presets (Azure resource, Vertex project, Bedrock region)
      • api_version (string, pattern ^\d{4}-\d{2}-\d{2}$) — Anthropic API version; defaults to 2023-06-01 when omitted
      • preset (string) — A provider preset ID from GET /api/v1/admin/provider-presets
      • auth (ProviderAuth)
      • headers (object) — Fixed, non-secret headers sent on every call to this provider (anthropic-workspace-id, OpenAI-Project). Credential, framing, tracing and x-amz-* headers are refused; credentials go in auth or secret
        • any other key: string
      • forward_client_headers (array of string, max items 16) — Client request headers copied as sent to every call to this provider while serving that request (T130); nothing else the client sends is forwarded. Credential (Authorization, x-api-key, api-key, this connection’s auth header…), cookie, hop-by-hop, proxy-, content-, Accept-Encoding, tracing (traceparent, tracestate, baggage, X-Request-Id, X-Correlation-Id), x-gateway-, x-amz- and anthropic-version names are refused, as are duplicates, a name also in headers and anthropic-beta on an anthropic connection (already forwarded after validation)
      • credentials (array of ProviderCredentialPoolEntryInput, max items 16) — Optional complete pool metadata; omitted on unchanged static-auth edit preserves it. Explicit [] leaves the pool only with a valid legacy source. New pools require an explicit primary. No secret references accepted here.
      • primary_credential_id (string, pattern ^([a-z][a-z0-9_-]{0,63})?$)
      • credential_cooldown_statuses (array of integer, max items 32) — Omitted defaults to [401,429]; explicit [] disables provider-response cooldown signals.
      • credential_selection_max_body_bytes (0 or integer) — Raw0 selects65536; explicit positive values require at least1024. Larger final bodies use primary unchanged.
        • One of (1): 0
        • One of (2): integer
      • http_version (string, one of "auto", "http1", "http2") — auto (default) uses HTTP/2, except HTTP/1.1 for generativelanguage.googleapis.com, where one connection per stream measured faster
      • metrics_path (string, pattern ^/[A-Za-z0-9._~/-]{0,255}$) — T195 (provider_metrics_scrape): the path of a self-hosted model server’s own Prometheus metrics, such as /metrics. It is resolved against the origin of base_url (scheme, host and port; the path of base_url is left out) and never another host; . and .. segments and doubled slashes are refused. Omitted or empty: the connection is not scraped. At most 64 connections may set it. Omit it on a save to clear it.
      • metrics_credential (boolean, default false) — T195: also send this connection’s static bearer secret with the metrics scrape, for a server that protects its metrics with its key. Needs metrics_path, bearer authentication with one static secret and no credential pool; anything else is refused with 422.
      • batch (null or ProviderBatchStorage) — T215: object storage of a Vertex AI or Bedrock batch job. Omitted keeps the stored value; null clears it.
    • credential_secrets (object, write-only) — Pool secrets keyed by credential ID. Encrypted under separate provider/entry AAD. Never returned or logged; cannot coexist with a scalar secret.
      • any other key: string
    • secret (string, max length 2048, pattern ^[^\x00-\x08\x0A-\x1F\x7F]*$, write-only) — At most2048 bytes; HTTP-invalid ASCII controls (C0 except HTAB, and DEL) are refused before mutation. Required for a new static provider or a return from nonstatic to bearer/header auth. Blank/omitted retains only between static types. Nonstatic types reject a nonempty secret and clear stored material

Responses

Status Description Body
200 Provider override updated; metadata and new version only —
201 Provider created; metadata and new version only —
400 Invalid input application/json: Error
401 Missing or invalid bearer key application/json: Error
403 Model not allowed application/json: Error
404 Feature disabled application/json: Error
409 Configuration version conflict —
413 Provider input exceeds64KiB —
422 Provider or URL violates configuration constraints —
503 Control storage/license authority unavailable or selected configuration repository does not support managed pools —

DELETE /api/v1/admin/providers/{id} · operation deleteAdminProvider

Remove a console provider or revert a YAML provider override. Referenced providers cannot be removed. The control version must match.

Authentication: adminSession

Parameters

Name In Type Description
id path string, required
X-CSRF-Token header string, required Token returned by admin login/session; required with the same-origin session cookie for writes.

Request body (required)

  • application/json: object
    • version (integer (int64), required)

Responses

Status Description Body
204 Override removed —
400 Invalid input application/json: Error
403 Model not allowed application/json: Error
404 Provider override not found or feature disabled —
409 YAML provider is operator-owned or version conflict —
422 Provider is referenced by an active model —

m7gtw[email protected]