Guides
Coding agents
Point Claude Code, Conductor, Codex, OpenCode, Cline, or any OpenAI-compatible agent at the gateway: one base URL, one key, every model in your catalog, and all usage in one place.
Before you start
- Mint a key in Settings, API keys and export it:
export EXPLABS_API_KEY=xpl_... - Pick a model slug.
GET https://api-pr-668.preview.experientiallabs.ai/v1/modelslists every slug your key can call; the snippets below use examples from the public catalog.
Every agent below works the same way: its provider configuration gets the base URL https://api-pr-668.preview.experientiallabs.ai/v1, the key rides as Authorization: Bearer, and models are named by bare slug. Streaming is SSE on both Chat Completions and the Responses API.
OpenAI Codex CLI
Codex configures custom gateways as a model_providers entry in ~/.codex/config.toml. Current Codex releases speak only the Responses API (wire_api = "responses" is the sole supported value since early 2026), which the gateway serves at /v1/responses.
Paste this into the agent. It wires itself up, then proves the key works.
I pasted this into you myself — wire THIS coding agent up to my ExperientialLabs gateway, so my model calls route through https://api-pr-668.preview.experientiallabs.ai and show up in my usage.Ground rules: never print my full key (first 8 characters at most), ask mebefore you edit any config file or shell profile, and if you cannot do a step(no file access, settings live in a GUI), print the exact manual steps for meinstead. Print what you're doing at each step.1. Get my key. Use EXPLABS_API_KEY from my environment if it is set; otherwiseask me to paste one (I can mint it at https://pr-668.preview.experientiallabs.ai/settings/api-keys). It lookslike xpl_ followed by 40 hex characters.2. Prove the key works before touching any config:GET https://api-pr-668.preview.experientiallabs.ai/v1/models with header "Authorization: Bearer <key>" -> 200 andthe model slugs I can call. Remember the list; I'll pick models from it.3. Apply the OpenAI Codex CLI integration:Add to ~/.codex/config.toml (create it if missing, show me the diff beforewriting):model = "<slug I pick>"model_provider = "explabs"[model_providers.explabs]name = "Experiential Labs"base_url = "https://api-pr-668.preview.experientiallabs.ai/v1"env_key = "EXPLABS_API_KEY"wire_api = "responses"Leave requires_openai_auth unset, and make sure EXPLABS_API_KEY is exportedwhere I launch you.4. Verify end to end. Make one tiny completion with the surface you configured("reply with the single word: ok", small max output) — via your own nextmodel call if you now route through the gateway, otherwise via curl with mykey. Then tell me it landed and that I can watch every call athttps://pr-668.preview.experientiallabs.ai/telemetry.5. Recap exactly what you changed (files and values, key shown as xpl_ prefixonly) so I can undo it later.
model = "gpt-5.5"model_provider = "explabs"[model_providers.explabs]name = "Experiential Labs"base_url = "https://api-pr-668.preview.experientiallabs.ai/v1"env_key = "EXPLABS_API_KEY"wire_api = "responses"
Run Codex with EXPLABS_API_KEY exported. Leave requires_openai_auth unset: setting it forces a ChatGPT login instead of your gateway key.
previous_response_id. The gateway honors continuation on any worker instance and retains continuations for 24 hours; an expired id returns 400 continuation_unavailable and Codex resends the conversation.OpenCode
OpenCode takes a custom provider in opencode.json (per-project at the repo root, or global at ~/.config/opencode/opencode.json) using the @ai-sdk/openai-compatible package, which targets /v1/chat/completions.
Paste this into the agent. It wires itself up, then proves the key works.
I pasted this into you myself — wire THIS coding agent up to my ExperientialLabs gateway, so my model calls route through https://api-pr-668.preview.experientiallabs.ai and show up in my usage.Ground rules: never print my full key (first 8 characters at most), ask mebefore you edit any config file or shell profile, and if you cannot do a step(no file access, settings live in a GUI), print the exact manual steps for meinstead. Print what you're doing at each step.1. Get my key. Use EXPLABS_API_KEY from my environment if it is set; otherwiseask me to paste one (I can mint it at https://pr-668.preview.experientiallabs.ai/settings/api-keys). It lookslike xpl_ followed by 40 hex characters.2. Prove the key works before touching any config:GET https://api-pr-668.preview.experientiallabs.ai/v1/models with header "Authorization: Bearer <key>" -> 200 andthe model slugs I can call. Remember the list; I'll pick models from it.3. Apply the OpenCode integration:Write the provider block into this project's opencode.json (or~/.config/opencode/opencode.json if I prefer global — ask):{"provider": {"explabs": {"npm": "@ai-sdk/openai-compatible","name": "Experiential Labs","options": {"baseURL": "https://api-pr-668.preview.experientiallabs.ai/v1", "apiKey": "{env:EXPLABS_API_KEY}"},"models": {"<slug>": {"name": "<slug>"}}}}Fill limit.context/limit.output for each slug fromGET https://api-pr-668.preview.experientiallabs.ai/api/models/<slug> so my context window is right.4. Verify end to end. Make one tiny completion with the surface you configured("reply with the single word: ok", small max output) — via your own nextmodel call if you now route through the gateway, otherwise via curl with mykey. Then tell me it landed and that I can watch every call athttps://pr-668.preview.experientiallabs.ai/telemetry.5. Recap exactly what you changed (files and values, key shown as xpl_ prefixonly) so I can undo it later.
{"$schema": "https://opencode.ai/config.json","model": "explabs/claude-opus-5","provider": {"explabs": {"npm": "@ai-sdk/openai-compatible","name": "Experiential Labs","options": {"baseURL": "https://api-pr-668.preview.experientiallabs.ai/v1","apiKey": "{env:EXPLABS_API_KEY}"},"models": {"claude-opus-5": {"name": "Claude Opus 5","limit": {"context": 200000,"output": 64000}}}}}}
Models you list here appear in the /models picker automatically. Set limit.context and limit.outputfrom the catalog's values (GET https://api-pr-668.preview.experientiallabs.ai/api/models/<slug>), since OpenCode cannot infer them for a custom gateway.
Cline (VS Code)
Cline is configured in the extension's settings UI, not a file.
Paste this into the agent. It wires itself up, then proves the key works.
I pasted this into you myself — wire THIS coding agent up to my ExperientialLabs gateway, so my model calls route through https://api-pr-668.preview.experientiallabs.ai and show up in my usage.Ground rules: never print my full key (first 8 characters at most), ask mebefore you edit any config file or shell profile, and if you cannot do a step(no file access, settings live in a GUI), print the exact manual steps for meinstead. Print what you're doing at each step.1. Get my key. Use EXPLABS_API_KEY from my environment if it is set; otherwiseask me to paste one (I can mint it at https://pr-668.preview.experientiallabs.ai/settings/api-keys). It lookslike xpl_ followed by 40 hex characters.2. Prove the key works before touching any config:GET https://api-pr-668.preview.experientiallabs.ai/v1/models with header "Authorization: Bearer <key>" -> 200 andthe model slugs I can call. Remember the list; I'll pick models from it.3. Apply the Cline integration:Your settings live in the VS Code UI, so print these for me to set by hand:API Provider "OpenAI Compatible"; Base URL https://api-pr-668.preview.experientiallabs.ai/v1; API Key = my key (noBearer prefix); Model ID = a slug from step 2; and per-model context window /max output tokens from https://api-pr-668.preview.experientiallabs.ai/api/models/<slug>.4. Verify end to end. Make one tiny completion with the surface you configured("reply with the single word: ok", small max output) — via your own nextmodel call if you now route through the gateway, otherwise via curl with mykey. Then tell me it landed and that I can watch every call athttps://pr-668.preview.experientiallabs.ai/telemetry.5. Recap exactly what you changed (files and values, key shown as xpl_ prefixonly) so I can undo it later.
- Open Cline's settings and set API Provider to
OpenAI Compatible. - Base URL:
https://api-pr-668.preview.experientiallabs.ai/v1 - API Key: your
xpl_...key (noBearerprefix). - Model ID: a slug from
/v1/models, e.g.claude-opus-5. - Set the model's context window and max output tokens in Cline's per-model fields from the catalog's values; Cline cannot infer them for models it does not recognize.
Any other OpenAI-compatible tool
Tools built on the official OpenAI SDKs (and most terminal agents, including Blackbox and Grok Build) honor the standard environment pair; nothing else changes:
Paste this into the agent. It wires itself up, then proves the key works.
I pasted this into you myself — wire THIS coding agent up to my ExperientialLabs gateway, so my model calls route through https://api-pr-668.preview.experientiallabs.ai and show up in my usage.Ground rules: never print my full key (first 8 characters at most), ask mebefore you edit any config file or shell profile, and if you cannot do a step(no file access, settings live in a GUI), print the exact manual steps for meinstead. Print what you're doing at each step.1. Get my key. Use EXPLABS_API_KEY from my environment if it is set; otherwiseask me to paste one (I can mint it at https://pr-668.preview.experientiallabs.ai/settings/api-keys). It lookslike xpl_ followed by 40 hex characters.2. Prove the key works before touching any config:GET https://api-pr-668.preview.experientiallabs.ai/v1/models with header "Authorization: Bearer <key>" -> 200 andthe model slugs I can call. Remember the list; I'll pick models from it.3. Apply the Any other OpenAI-compatible tool integration:Export OPENAI_BASE_URL="https://api-pr-668.preview.experientiallabs.ai/v1" and OPENAI_API_KEY="<my key>" wherever Ilaunch you, and name models by slug. If your own config wants the valuesinstead, it needs the same three: base URL https://api-pr-668.preview.experientiallabs.ai/v1, my key, and a slug.4. Verify end to end. Make one tiny completion with the surface you configured("reply with the single word: ok", small max output) — via your own nextmodel call if you now route through the gateway, otherwise via curl with mykey. Then tell me it landed and that I can watch every call athttps://pr-668.preview.experientiallabs.ai/telemetry.5. Recap exactly what you changed (files and values, key shown as xpl_ prefixonly) so I can undo it later.
export OPENAI_BASE_URL="https://api-pr-668.preview.experientiallabs.ai/v1"export OPENAI_API_KEY="xpl_..."
If a tool asks for the values in its own config instead, it needs the same three: base URL https://api-pr-668.preview.experientiallabs.ai/v1, the key, and a model slug.
Claude Code
The gateway serves the Anthropic Messages API at /v1/messages, so Claude Code connects like any LLM gateway: point ANTHROPIC_BASE_URL at it (no /v1 suffix; Claude Code appends the path) and pass your key as ANTHROPIC_AUTH_TOKEN. Any catalog slug works as the model, not just Claude models.
Paste this into the agent. It wires itself up, then proves the key works.
I pasted this into you myself — wire THIS coding agent up to my ExperientialLabs gateway, so my model calls route through https://api-pr-668.preview.experientiallabs.ai and show up in my usage.Ground rules: never print my full key (first 8 characters at most), ask mebefore you edit any config file or shell profile, and if you cannot do a step(no file access, settings live in a GUI), print the exact manual steps for meinstead. Print what you're doing at each step.1. Get my key. Use EXPLABS_API_KEY from my environment if it is set; otherwiseask me to paste one (I can mint it at https://pr-668.preview.experientiallabs.ai/settings/api-keys). It lookslike xpl_ followed by 40 hex characters.2. Prove the key works before touching any config:GET https://api-pr-668.preview.experientiallabs.ai/v1/models with header "Authorization: Bearer <key>" -> 200 andthe model slugs I can call. Remember the list; I'll pick models from it.3. Apply the Claude Code integration:You cannot repoint yourself mid-session. Offer me two placements and applythe one I pick: (a) append to my shell profile, or (b) print for one-off use:export ANTHROPIC_BASE_URL="https://api-pr-668.preview.experientiallabs.ai" # no /v1 suffixexport ANTHROPIC_AUTH_TOKEN="<my key>"export ANTHROPIC_MODEL="<slug I pick>"Then tell me to restart you from a shell with those set. Warn me plainly:extended thinking is unavailable through the gateway and image pastes arerejected (the lane is text-only).4. Verify end to end. Make one tiny completion with the surface you configured("reply with the single word: ok", small max output) — via your own nextmodel call if you now route through the gateway, otherwise via curl with mykey. Then tell me it landed and that I can watch every call athttps://pr-668.preview.experientiallabs.ai/telemetry.5. Recap exactly what you changed (files and values, key shown as xpl_ prefixonly) so I can undo it later.
export ANTHROPIC_BASE_URL="https://api-pr-668.preview.experientiallabs.ai"export ANTHROPIC_AUTH_TOKEN="xpl_..."export ANTHROPIC_MODEL="claude-opus-5"claude
/v1/messages/count_tokens answers an explicit 404 not_found_error (Claude Code estimates locally).Conductor
Conductor (the Mac app that runs parallel Claude Code agents in git worktrees) delegates provider configuration to Claude Code's environment contract, so it uses the same three variables. Set them in Settings, Environment under the Claude Code section:
Paste this into the agent. It wires itself up, then proves the key works.
I pasted this into you myself — wire THIS coding agent up to my ExperientialLabs gateway, so my model calls route through https://api-pr-668.preview.experientiallabs.ai and show up in my usage.Ground rules: never print my full key (first 8 characters at most), ask mebefore you edit any config file or shell profile, and if you cannot do a step(no file access, settings live in a GUI), print the exact manual steps for meinstead. Print what you're doing at each step.1. Get my key. Use EXPLABS_API_KEY from my environment if it is set; otherwiseask me to paste one (I can mint it at https://pr-668.preview.experientiallabs.ai/settings/api-keys). It lookslike xpl_ followed by 40 hex characters.2. Prove the key works before touching any config:GET https://api-pr-668.preview.experientiallabs.ai/v1/models with header "Authorization: Bearer <key>" -> 200 andthe model slugs I can call. Remember the list; I'll pick models from it.3. Apply the Conductor integration:Print these for me to put in Settings -> Environment (Claude Code section),or write them to this repo's .conductor/settings.local.toml under[environment_variables] if I prefer (make sure that file isgit-ignored before writing my key into it):ANTHROPIC_BASE_URL = "https://api-pr-668.preview.experientiallabs.ai"ANTHROPIC_AUTH_TOKEN = "<my key>"ANTHROPIC_API_KEY = ""The empty ANTHROPIC_API_KEY is required: it stops Claude Code from trying toauthenticate with Anthropic directly.4. Verify end to end. Make one tiny completion with the surface you configured("reply with the single word: ok", small max output) — via your own nextmodel call if you now route through the gateway, otherwise via curl with mykey. Then tell me it landed and that I can watch every call athttps://pr-668.preview.experientiallabs.ai/telemetry.5. Recap exactly what you changed (files and values, key shown as xpl_ prefixonly) so I can undo it later.
ANTHROPIC_BASE_URL=https://api-pr-668.preview.experientiallabs.aiANTHROPIC_AUTH_TOKEN=xpl_...ANTHROPIC_API_KEY=
ANTHROPIC_API_KEY must be present and empty: it stops Claude Code from trying to authenticate with Anthropic directly. To scope the gateway to one repository instead, put the same variables in .conductor/settings.local.toml (machine-local, so the key stays out of the shared config):
[environment_variables]ANTHROPIC_BASE_URL = "https://api-pr-668.preview.experientiallabs.ai"ANTHROPIC_AUTH_TOKEN = "xpl_..."ANTHROPIC_API_KEY = ""
ANTHROPIC_MODEL or the ANTHROPIC_DEFAULT_*_MODEL variables in the same environment block. The Claude Code lane limits above apply unchanged.Watch what your agents spend
Every call an agent makes lands in the same usage stream as the rest of your traffic. Humans read it at Telemetry and Credits; agents read their own via GET https://api-pr-668.preview.experientiallabs.ai/api/gateway/usage/daily. Mint one key per agent to see spend broken out per tool.