spiderai
Log inGet an API key

DOC 02Clients

Codex Setup Guide

Connect Codex CLI and the desktop app to spiderai with a setup script or manual configuration, including the API key, model and Responses API.

Tested 2026-11-04 · Codex CLI 0.166.0
Your system

Install and configure Codex to connect to spiderai through ~/.codex.

Choose the setup script for your system

The script detects Node.js and Codex CLI and helps install them if needed. It then asks for your API key and writes ~/.codex/config.toml. The copied command does not contain your key.

BASH
curl -fsSL https://spiderai.fun/install/codex.sh | bash
Tip
The configuration in ~/.codex is used by both Codex CLI and Codex App. Restart any open CLI sessions to load it.
Tip
A key from any Codex / GPT group works with Codex. Create one on API Keys.
Alternative: install Codex manuallyExpand this if the setup script is unavailable.
Note
Before installing manually, complete the Node.js installation guide.

Step 1: Install Codex

BASH
sudo npm install -g @openai/codex@latest

This installs the latest Codex package from the npm registry. Verify it:

TERMINAL
codex --version

Step 2: Create the configuration file

Codex only needs config.toml. Put your API key in experimental_bearer_token.

BASH
# Create the configuration directory (back up existing files; the following commands overwrite them)
mkdir -p ~/.codex

# Create config.toml
cat > ~/.codex/config.toml << 'EOF'
model_provider = "codex"
model = "gpt-6.1-sol"
model_reasoning_effort = "high"
model_context_window = 272000
sandbox_mode = "workspace-write"

[model_providers.codex]
name = "codex"
base_url = "https://api.spiderai.fun/v1"
wire_api = "responses"
requires_openai_auth = false
supports_websockets = false
experimental_bearer_token = "YOUR_API_KEY"
http_headers = { "x-openai-actor-authorization" = "spiderai.fun" }

[desktop]
conversationDetailMode = "STEPS_COMMANDS"

[sandbox_workspace_write]
network_access = true

[features]
goals = true
EOF
Tip
Replace YOUR_API_KEY with an API key copied from API Keys.

Start using Codex

Run the following from your project directory:

TERMINAL
codex

For more information, see the OpenAI documentation.