Reference
API reference
The OpenAI-compatible inference API and the management API a customer drives with an organization key.
Conventions
Base URL for this deployment is https://api.experientiallabs.ai: inference lives under /v1 and management under /api. Every call authenticates with Authorization: Bearer <key>, with one exception: the catalog reads (GET /api/models*) are public and keyless. Without a key you get the public catalog; send your key to also see the rows your organization owns. The OpenAI-compatible GET /v1/models, by contrast, requires your key. /v1 is the canonical base; if a tool appends /models, /chat/completions, /responses, /embeddings, /messages, /batches, or /files to the bare host instead, the edge serves each as its /v1 twin; no other un-prefixed path is served.
Inference (/v1)
The OpenAI-compatible surface. Point any OpenAI client at https://api.experientiallabs.ai/v1. See the Quickstart for runnable calls and Errors for the failure envelope.
| Endpoint | Purpose |
|---|---|
| GET /v1/models | List the model slugs this key can call; entries add a pricing extension (nano-USD per million tokens). |
| POST /v1/chat/completions | OpenAI Chat Completions; stream: true for SSE. |
| POST /v1/responses | OpenAI Responses; stream: true for SSE; previous_response_id continues on any worker. |
| POST /v1/embeddings | Text or token-ID embeddings, singly or in batches; float or base64 vectors. Omit stream or send false; no streaming, response cache, or Idempotency-Key replay. |
| POST /v1/messages | Anthropic Messages (Claude Code and Anthropic SDKs); x-api-key or Bearer; Anthropic-enveloped errors. |
For text vectors, see the Embeddings guide for curl, SDK, tiktoken, and LangChain examples, model discovery, and tokenizer requirements. The same route is available at POST /api/v1/embeddings.
Catalog, custom models, and waterfalls (/api)
Read the catalog and manage your org's custom models and waterfalls. See Models for request and response shapes.
| Endpoint | Purpose |
|---|---|
| GET /api/models | The catalog; filter by modality, category, provider, price, context; sort and page. |
| GET /api/models/{slug} | One model: row, deployments, and default waterfall. |
| GET /api/models/{slug}/providers | A model's deployments, with opaque route_id handles in an authorized organization context for per-request route selection. |
| POST /api/models | Create a custom model (row plus at least one deployment). |
| POST /api/models/{slug}/providers | Add a deployment or local variant to a model. |
| GET /api/models/{slug}/waterfall | Read the default chain and your org override. |
| PUT /api/models/{slug}/waterfall | Replace the ordered chain (model_provider_ids). On a shared model your chain must include one of your own connections (a byok:{connection_id} rung). |
Provider connections (/api)
Connect and verify the provider keys that back the pass-through lane. Reads never return secret material.
| Endpoint | Purpose |
|---|---|
| GET /api/orgs/{org_id}/provider-connections | List your org's provider connections (no secrets). |
| POST /api/orgs/{org_id}/provider-connections/{provider} | Create a new account with an explicit unique setup_alias, secret and config. List accounts first; 409 account_exists means choose another name, never overwrite. |
| PUT /api/orgs/{org_id}/provider-connections/{provider} | Deliberately rotate one saved account using its exact setup_alias, secret and config. A spend_error means the serving key was saved; retry that same account with PUT, not POST. |
| POST /api/orgs/{org_id}/provider-connections/{provider}/check?setup_alias={alias} | Verify the selected account. |
| POST /api/orgs/{org_id}/provider-connections/{provider}/spend-refresh?setup_alias={alias} | Refresh the selected account's reported spend. |
| DELETE /api/orgs/{org_id}/provider-connections/{provider}?setup_alias={alias} | Disconnect only the account named by the explicit setup_alias. |
Usage and keys (/api)
Read your own usage and spend and list your keys. Usage reads take org_id; an API key reads at scope=org (scope=self needs an end-user session).
| Endpoint | Purpose |
|---|---|
| GET /api/gateway/usage/daily | Grouped usage rollup (group_by day, model, or member). |
| GET /api/gateway/usage/events | The paginated per-request usage stream. |
| GET /api/gateway/catalog | Aliases as your org resolves them, each with its lane. |
| GET /api/gateway/keys/{api_key_id}/limits | Read a key's effective guardrails, daily spend cap, requests/minute, tokens/minute, with platform defaults included; null means uncapped. |
| GET /api/keys | List your org's API Keys (never secrets). |
Machine-readable reference
Agents should read /llms.txt, which carries this surface, the error table, and the core loop in one plain-text file.