Synthetic Insights · Reference

API reference

Your instance serves four surfaces on one routing engine. Bands, pins and movement behave the same on each.

Admin API contract v1.0.0

Surfaces and credentials

SurfacePathCredential
OpenAI-compatible/v1/chat/completions, /v1/modelscsl_api_… as Authorization: Bearer
Anthropic Messages-compatible/v1/messagescsl_api_… as x-api-key or Authorization: Bearer
Remote MCP server/mcp (streamable HTTP)csl_mcp_… as a bearer header, or OAuth 2.1 (MCP)
Admin API/admin/v1/*csl_admin_…

Each credential works only on its own surface: an API or MCP credential sent to the admin API gets 403 wrong_credential_kind. GET /healthz needs no credential and returns {"status":"ok"}.

Request headers

HeaderEffect
X-Ladder-Session: <id>Remember this session's rung so it can step down after a run of good answers.
X-Ladder-Escalate: 1Move this session up one rung.
X-Ladder-Review: 1Have a reviewer rung check the answer; disagreement moves the request up.

Responses carry x-ladder-served, x-ladder-path and x-ladder-cost (details).

Examples

curl 'https://<your-instance>.ladder.synthetic-insights.ai/v1/models' \
  -H 'Authorization: Bearer csl_api_YOUR_KEY'
from openai import OpenAI

client = OpenAI(base_url="https://<your-instance>.ladder.synthetic-insights.ai/v1",
                api_key="csl_api_YOUR_KEY")
response = client.chat.completions.with_raw_response.create(
    model="csl-specialist",
    messages=[{"role": "user", "content": "Triage this alert: repeated 401s from one IP on /admin"}],
    extra_headers={"X-Ladder-Session": "soc-shift-1"},
)
print(response.headers.get("x-ladder-served"))
print(response.parse().choices[0].message.content)
import anthropic

client = anthropic.Anthropic(base_url="https://<your-instance>.ladder.synthetic-insights.ai",
                             api_key="csl_api_YOUR_KEY")
message = client.messages.create(
    model="csl-code-review", max_tokens=1024,
    messages=[{"role": "user", "content": "Review this function for injection risks: ..."}],
)
print(message.content[0].text)

Pointing an Anthropic client here sends the request to the ladder's rungs. It does not use a Claude subscription; for that, see Claude subscription.

Admin API

Everything the setup page does is available to your own automation with an admin credential. The machine-readable contract is openapi.yaml (OpenAPI 3.1), which SI provides with your instance.

MethodPathPurpose
GET, PATCH/admin/v1/tenantName, brief, K (step_down_after), T (idle_reset_seconds)
GET/admin/v1/rungsEvery rung, enabled ones in order first
PUT/admin/v1/rungs/orderSet the order; rungs left out are disabled
PATCH/admin/v1/rungs/{rung_id}Enable (append) or disable one rung
GET/admin/v1/bandsThe four bands and their walks
PUT/admin/v1/bands/{band_id}Override a walk, or {"rungs": null} to clear it
GET/admin/v1/providersBYOK providers and the fields each needs
GET, POST/admin/v1/byokList masked keys; add a key (tested first)
PATCH, DELETE/admin/v1/byok/{key_id}Change label, model, specialty; erase
PUT/admin/v1/byok/{key_id}/secretReplace the secret (and only then its destination)
POST/admin/v1/byok/{key_id}/validateRun the test call again
GET, POST/admin/v1/credentialsList; issue (api, mcp, admin), secret shown once
DELETE/admin/v1/credentials/{credential_id}Revoke at once
GET, DELETE/admin/v1/oauth/clients[/{client_id}]MCP hosts signed in by OAuth
GET/admin/v1/usageMetadata usage; group_by = rung, day, credential, outcome
GET/admin/v1/auditAppend-only log of admin actions
GET/admin/v1/healthContainer, store, edge and rung health

Errors

Every error has the same shape. code is stable; treat a code you do not recognise as a generic error, because new codes may be added.

{"error": {"code": "brief_required", "message": "…", "request_id": "req_…",
           "details": [{"field": "…", "reason": "…"}]}}
CodeStatusMeaning
unauthorized401Missing, unknown, expired or revoked credential
wrong_credential_kind403A credential of another kind
not_found404The rung, key, credential or client does not exist
brief_required409An SI rung would serve the call, and the brief or a required attestation (llama_aup, data_handling, authorized_scope) is missing; details names each one
key_not_valid, last_admin, conflict409The change conflicts with current state
subscription_token_refused422A Claude.ai or setup token was sent as a key
invalid_request, invalid_key_format, base_url_refused, canary_rejected, unknown_rung, band_rejects_rung, attestation_text_mismatch422The request was refused; details names the field
rate_limited429Wait for Retry-After seconds
canary_unreachable502A provider could not be reached for a key test; nothing changed
sovereign_unavailable503No SI rung is available for csl-sovereign

Error messages never contain key material or a provider's own error text.