1. Connect
Use the API key supplied by Badlands Labs. Request API access.
| OpenAI base URL | https://api.badlandslabs.com/v1 |
|---|---|
| Anthropic base URL | https://api.badlandslabs.com |
| Authentication | Authorization: Bearer <key> or x-api-key: <key> |
Set BADLANDS_API_KEY in the terminal that launches your tool. Keep the key out of source files and browser-side code.
Windows · PowerShell
$credential = Get-Credential -UserName "badlands" -Message "Paste your API key in the password field"
$env:BADLANDS_API_KEY = $credential.GetNetworkCredential().Password
Remove-Variable credential
Invoke-RestMethod https://api.badlandslabs.com/v1/models -Headers @{ Authorization = "Bearer $env:BADLANDS_API_KEY" }
macOS / Linux · Bash
read -rsp "Badlands API key: " BADLANDS_API_KEY; echo
export BADLANDS_API_KEY
curl --fail-with-body https://api.badlandslabs.com/v1/models \
-H "Authorization: Bearer $BADLANDS_API_KEY"
2. Choose a model
Use GET /v1/models with your key to list your account's model cards. Copy the complete ID into your agent's model setting.
Model cards · 19 IDs
Reference list checked on . Use the model IDs available to your account.
| Family | Model IDs |
|---|---|
| Anthropic | anthropic/claude-opus-5.5anthropic/claude-sonnet-5anthropic/claude-haiku-4.5 |
| OpenAI | openai/gpt-6-astraopenai/gpt-6.1-solopenai/gpt-6-luna |
| Google Gemini | google/gemini-3.1-pro-previewgoogle/gemini-3.8-flashgoogle/gemini-3.5-flash-lite |
| xAI Grok | x-ai/grok-4.7x-ai/grok-4.6x-ai/grok-4.5 |
| DeepSeek | deepseek/deepseek-v4-pro-0813 |
| Qwen | qwen/qwen3.8-max-0902 |
| Moonshot AI | moonshotai/kimi-k3 |
| Z.AI | z-ai/glm-5.3 |
| MiniMax | minimax/minimax-m3 |
| Badlands capabilities | badlands/advisorbadlands/image |
The examples below configure openai/gpt-6.1-sol, or anthropic/claude-sonnet-5 for Claude Code. Replace these IDs with the model you want to use from your account's list.
3. Configure your agent
Choose your agent below. Set the key in the terminal that launches it, apply the configuration, and start a new session. Ask Reply with exactly PONG. to check the connection.
Codex CLI · Responses
Configured model in this example: openai/gpt-6.1-sol.
Edit your user config at ~/.codex/config.toml (Windows: %USERPROFILE%\.codex\config.toml). Merge these entries; keep top-level keys before any table headings.
model = "openai/gpt-6.1-sol"
model_provider = "badlands"
[model_providers.badlands]
name = "Badlands Labs"
base_url = "https://api.badlandslabs.com/v1"
env_key = "BADLANDS_API_KEY"
wire_api = "responses"
requires_openai_auth = false
Run codex from the terminal with the key. A custom-model metadata warning can appear; it is not an authentication failure.
Claude Code · Anthropic Messages
Configured model in this example: anthropic/claude-sonnet-5.
Use the root URL, without /v1. Set these variables in the same terminal as the key.
PowerShell:
$env:ANTHROPIC_BASE_URL = "https://api.badlandslabs.com"
$env:ANTHROPIC_AUTH_TOKEN = $env:BADLANDS_API_KEY
$env:ANTHROPIC_API_KEY = ""
$env:ANTHROPIC_MODEL = "anthropic/claude-sonnet-5"
claude
Bash:
export ANTHROPIC_BASE_URL="https://api.badlandslabs.com"
export ANTHROPIC_AUTH_TOKEN="$BADLANDS_API_KEY"
unset ANTHROPIC_API_KEY
export ANTHROPIC_MODEL="anthropic/claude-sonnet-5"
claude
Run /status to confirm the connection URL. If it shows another URL, check your Claude settings file for an override.
OpenCode · Chat Completions
Configured model in this example: openai/gpt-6.1-sol.
Merge this into opencode.json in your project. The key is read from your terminal environment.
{
"$schema": "https://opencode.ai/config.json",
"model": "badlands/openai/gpt-6.1-sol",
"provider": {
"badlands": {
"npm": "@ai-sdk/openai-compatible",
"name": "Badlands Labs",
"options": {
"baseURL": "https://api.badlandslabs.com/v1",
"apiKey": "{env:BADLANDS_API_KEY}"
},
"models": {
"openai/gpt-6.1-sol": { "name": "GPT-6.1 Sol" }
}
}
}
}
Run opencode. The configured selection is badlands/openai/gpt-6.1-sol. To change it, update the models entry and the top-level model value, keeping the badlands/ prefix on that top-level value.
Cline · OpenAI Compatible
Configured model in this example: openai/gpt-6.1-sol.
Open Cline settings and fill in:
| API Provider | OpenAI Compatible |
|---|---|
| Base URL | https://api.badlandslabs.com/v1 |
| API Key | Your Badlands-issued key (paste the value, not the variable name). |
| Model ID | openai/gpt-6.1-sol |
Save for the mode you use; if Plan and Act have separate settings, configure both. Start a new task and send the connection-check prompt above.
DeepSeek Harness · Custom model API
Configured model in this example: openai/gpt-6.1-sol.
In the DSH Web UI, open Settings → Models → Add model provider → Custom model API.
| Provider ID / name | badlands / Badlands Labs |
|---|---|
| Base URL | https://api.badlandslabs.com/v1 |
| API protocol | OpenAI Chat Completions |
| Credential | Your Badlands-issued key. |
| Model ID / input | openai/gpt-6.1-sol / Text |
Save and select this provider's model for a new session. Use Fetch available models to choose another model.
Need help connecting? Contact Badlands Labs with your agent name, model ID, and error message. Keep your API key private.