ExperientialDocs
Sign in

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

  1. Mint a key in Settings, API keys and export it: export EXPLABS_API_KEY=xpl_...
  2. Pick a model slug. GET https://api-pr-683.preview.experientiallabs.ai/v1/models lists 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-683.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.

Every agent below opens on a Prompt tab: paste it into that agent and it wires itself up, verifies the key, and reports what it changed. Switch to Manual setup to do it by hand. One prompt that works in any of them lives at Setup prompts.

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.

prompt
I pasted this into you myself — wire THIS coding agent up to my Experiential
Labs gateway, so my model calls route through https://api-pr-683.preview.experientiallabs.ai and show up in my usage.
Ground rules: never print my full key (first 8 characters at most), ask me
before 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 me
instead. Print what you're doing at each step.
1. Get my key. Use EXPLABS_API_KEY from my environment if it is set; otherwise
ask me to paste one (I can mint it at https://pr-683.preview.experientiallabs.ai/settings/api-keys). It looks
like xpl_ followed by 40 hex characters.
2. Prove the key works before touching any config:
GET https://api-pr-683.preview.experientiallabs.ai/v1/models with header "Authorization: Bearer <key>" -> 200 and
the 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 before
writing):
model = "<slug I pick>"
model_provider = "explabs"
[model_providers.explabs]
name = "Experiential Labs"
base_url = "https://api-pr-683.preview.experientiallabs.ai/v1"
env_key = "EXPLABS_API_KEY"
wire_api = "responses"
Leave requires_openai_auth unset, and make sure EXPLABS_API_KEY is exported
where 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 next
model call if you now route through the gateway, otherwise via curl with my
key. Then tell me it landed and that I can watch every call at
https://pr-683.preview.experientiallabs.ai/telemetry.
5. Recap exactly what you changed (files and values, key shown as xpl_ prefix
only) so I can undo it later.

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.

prompt
I pasted this into you myself — wire THIS coding agent up to my Experiential
Labs gateway, so my model calls route through https://api-pr-683.preview.experientiallabs.ai and show up in my usage.
Ground rules: never print my full key (first 8 characters at most), ask me
before 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 me
instead. Print what you're doing at each step.
1. Get my key. Use EXPLABS_API_KEY from my environment if it is set; otherwise
ask me to paste one (I can mint it at https://pr-683.preview.experientiallabs.ai/settings/api-keys). It looks
like xpl_ followed by 40 hex characters.
2. Prove the key works before touching any config:
GET https://api-pr-683.preview.experientiallabs.ai/v1/models with header "Authorization: Bearer <key>" -> 200 and
the 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-683.preview.experientiallabs.ai/v1", "apiKey": "{env:EXPLABS_API_KEY}"},
"models": {"<slug>": {"name": "<slug>"}}}}
Fill limit.context/limit.output for each slug from
GET https://api-pr-683.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 next
model call if you now route through the gateway, otherwise via curl with my
key. Then tell me it landed and that I can watch every call at
https://pr-683.preview.experientiallabs.ai/telemetry.
5. Recap exactly what you changed (files and values, key shown as xpl_ prefix
only) so I can undo it later.

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.

prompt
I pasted this into you myself — wire THIS coding agent up to my Experiential
Labs gateway, so my model calls route through https://api-pr-683.preview.experientiallabs.ai and show up in my usage.
Ground rules: never print my full key (first 8 characters at most), ask me
before 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 me
instead. Print what you're doing at each step.
1. Get my key. Use EXPLABS_API_KEY from my environment if it is set; otherwise
ask me to paste one (I can mint it at https://pr-683.preview.experientiallabs.ai/settings/api-keys). It looks
like xpl_ followed by 40 hex characters.
2. Prove the key works before touching any config:
GET https://api-pr-683.preview.experientiallabs.ai/v1/models with header "Authorization: Bearer <key>" -> 200 and
the 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-683.preview.experientiallabs.ai/v1; API Key = my key (no
Bearer prefix); Model ID = a slug from step 2; and per-model context window /
max output tokens from https://api-pr-683.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 next
model call if you now route through the gateway, otherwise via curl with my
key. Then tell me it landed and that I can watch every call at
https://pr-683.preview.experientiallabs.ai/telemetry.
5. Recap exactly what you changed (files and values, key shown as xpl_ prefix
only) so I can undo it later.

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.

prompt
I pasted this into you myself — wire THIS coding agent up to my Experiential
Labs gateway, so my model calls route through https://api-pr-683.preview.experientiallabs.ai and show up in my usage.
Ground rules: never print my full key (first 8 characters at most), ask me
before 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 me
instead. Print what you're doing at each step.
1. Get my key. Use EXPLABS_API_KEY from my environment if it is set; otherwise
ask me to paste one (I can mint it at https://pr-683.preview.experientiallabs.ai/settings/api-keys). It looks
like xpl_ followed by 40 hex characters.
2. Prove the key works before touching any config:
GET https://api-pr-683.preview.experientiallabs.ai/v1/models with header "Authorization: Bearer <key>" -> 200 and
the 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-683.preview.experientiallabs.ai/v1" and OPENAI_API_KEY="<my key>" wherever I
launch you, and name models by slug. If your own config wants the values
instead, it needs the same three: base URL https://api-pr-683.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 next
model call if you now route through the gateway, otherwise via curl with my
key. Then tell me it landed and that I can watch every call at
https://pr-683.preview.experientiallabs.ai/telemetry.
5. Recap exactly what you changed (files and values, key shown as xpl_ prefix
only) so I can undo it later.

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.

prompt
I pasted this into you myself — wire THIS coding agent up to my Experiential
Labs gateway, so my model calls route through https://api-pr-683.preview.experientiallabs.ai and show up in my usage.
Ground rules: never print my full key (first 8 characters at most), ask me
before 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 me
instead. Print what you're doing at each step.
1. Get my key. Use EXPLABS_API_KEY from my environment if it is set; otherwise
ask me to paste one (I can mint it at https://pr-683.preview.experientiallabs.ai/settings/api-keys). It looks
like xpl_ followed by 40 hex characters.
2. Prove the key works before touching any config:
GET https://api-pr-683.preview.experientiallabs.ai/v1/models with header "Authorization: Bearer <key>" -> 200 and
the 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 apply
the one I pick: (a) append to my shell profile, or (b) print for one-off use:
export ANTHROPIC_BASE_URL="https://api-pr-683.preview.experientiallabs.ai" # no /v1 suffix
export 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 are
rejected (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 next
model call if you now route through the gateway, otherwise via curl with my
key. Then tell me it landed and that I can watch every call at
https://pr-683.preview.experientiallabs.ai/telemetry.
5. Recap exactly what you changed (files and values, key shown as xpl_ prefix
only) so I can undo it later.

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.

prompt
I pasted this into you myself — wire THIS coding agent up to my Experiential
Labs gateway, so my model calls route through https://api-pr-683.preview.experientiallabs.ai and show up in my usage.
Ground rules: never print my full key (first 8 characters at most), ask me
before 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 me
instead. Print what you're doing at each step.
1. Get my key. Use EXPLABS_API_KEY from my environment if it is set; otherwise
ask me to paste one (I can mint it at https://pr-683.preview.experientiallabs.ai/settings/api-keys). It looks
like xpl_ followed by 40 hex characters.
2. Prove the key works before touching any config:
GET https://api-pr-683.preview.experientiallabs.ai/v1/models with header "Authorization: Bearer <key>" -> 200 and
the 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 is
git-ignored before writing my key into it):
ANTHROPIC_BASE_URL = "https://api-pr-683.preview.experientiallabs.ai"
ANTHROPIC_AUTH_TOKEN = "<my key>"
ANTHROPIC_API_KEY = ""
The empty ANTHROPIC_API_KEY is required: it stops Claude Code from trying to
authenticate 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 next
model call if you now route through the gateway, otherwise via curl with my
key. Then tell me it landed and that I can watch every call at
https://pr-683.preview.experientiallabs.ai/telemetry.
5. Recap exactly what you changed (files and values, key shown as xpl_ prefix
only) so I can undo it later.

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 Logs and Credits; agents read their own via GET https://api-pr-683.preview.experientiallabs.ai/api/gateway/usage/daily. Mint one key per agent to see spend broken out per tool.

  • Error handling is uniform across agents: see Errors for the stable codes and the retry playbook.
  • Which models an agent can reach, and how each is paid for, is the catalog and lanes story in Models.