Your instance serves four surfaces on one routing engine. Bands, pins and movement behave the same on each.
Admin API contract v1.0.0| Surface | Path | Credential |
|---|---|---|
| OpenAI-compatible | /v1/chat/completions, /v1/models | csl_api_… as Authorization: Bearer |
| Anthropic Messages-compatible | /v1/messages | csl_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"}.
| Header | Effect |
|---|---|
X-Ladder-Session: <id> | Remember this session's rung so it can step down after a run of good answers. |
X-Ladder-Escalate: 1 | Move this session up one rung. |
X-Ladder-Review: 1 | Have a reviewer rung check the answer; disagreement moves the request up. |
Responses carry x-ladder-served, x-ladder-path and x-ladder-cost (details).
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.
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.
| Method | Path | Purpose |
|---|---|---|
| GET, PATCH | /admin/v1/tenant | Name, brief, K (step_down_after), T (idle_reset_seconds) |
| GET | /admin/v1/rungs | Every rung, enabled ones in order first |
| PUT | /admin/v1/rungs/order | Set the order; rungs left out are disabled |
| PATCH | /admin/v1/rungs/{rung_id} | Enable (append) or disable one rung |
| GET | /admin/v1/bands | The four bands and their walks |
| PUT | /admin/v1/bands/{band_id} | Override a walk, or {"rungs": null} to clear it |
| GET | /admin/v1/providers | BYOK providers and the fields each needs |
| GET, POST | /admin/v1/byok | List 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}/secret | Replace the secret (and only then its destination) |
| POST | /admin/v1/byok/{key_id}/validate | Run the test call again |
| GET, POST | /admin/v1/credentials | List; 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/usage | Metadata usage; group_by = rung, day, credential, outcome |
| GET | /admin/v1/audit | Append-only log of admin actions |
| GET | /admin/v1/health | Container, store, edge and rung health |
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": "…"}]}}
| Code | Status | Meaning |
|---|---|---|
unauthorized | 401 | Missing, unknown, expired or revoked credential |
wrong_credential_kind | 403 | A credential of another kind |
not_found | 404 | The rung, key, credential or client does not exist |
brief_required | 409 | An 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, conflict | 409 | The change conflicts with current state |
subscription_token_refused | 422 | A 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_mismatch | 422 | The request was refused; details names the field |
rate_limited | 429 | Wait for Retry-After seconds |
canary_unreachable | 502 | A provider could not be reached for a key test; nothing changed |
sovereign_unavailable | 503 | No SI rung is available for csl-sovereign |
Error messages never contain key material or a provider's own error text.