Codex
OpenAI-style coding agent focused on code editing, command execution, and repository workflows. Use your APItokendeal endpoint if the tool allows custom OpenAI-compatible providers.
Your complete first time setup guide. Need another topic? Email hello@apitokendeal.com.
First, sign in to your Account page. Under API Keys, select Show and copy your key. It starts with sk-.
New to coding agents? Start with OpenCode. It is the simplest recommended path in this guide. If you already use Codex, Claude Code, Cline, OpenClaw, or Hermes, choose that tool instead.
Install one tool from its official source. After it opens successfully, return here and connect your API key with CC Switch in the next step.
Install OpenCode from its official website. You do not need an OpenCode subscription to configure it with your own API key. Open it once after installation; if you see the OpenCode window with a new chat or project area, installation worked. Then continue to Step 3 below.
Install Codex from its official website, then continue to Step 3.
Install Claude Code from its official website, then continue to Step 3.
Install OpenClaw from its official website, then continue to Step 3.
Install Hermes Agent from its official website, then continue to Step 3.
CC Switch is a small app that connects your chosen coding tool, such as OpenCode or Claude Code, to your APItokendeal API key. You only need to set it up once. You do not need Anthropic or OpenRouter accounts.
https://api.apitokendeal.com/v1sk-... key from your Account pageChoose a model from the Model Catalog. Use the exact model ID under Actual Request Model, and use that same model name for Menu Display Name.
Hello, which model are you?If it does not work, check the error code below. Do not share your key when asking for help.
| Error | What it means | What to do |
|---|---|---|
| 400 Invalid request or context limit | The request format is invalid, or the chat is longer than the selected model supports. | Check the tool configuration, start a new chat, or shorten/compact the conversation. |
| 401 Unauthorized | Your API key is wrong, incomplete, or not activated. | Copy the full sk-... key again from your Account page. |
| 403 Forbidden | The key is disabled, expired, or cannot use that model. | Check the key status and select a supported model from the Model Catalog. |
| 404 Model not found | The model ID is not available or was typed incorrectly. | Use the exact ID under Actual Request Model, not its display name. |
| 413 Request too large | Your prompt, pasted file, or image is too large. | Send less content at once or split the task into smaller requests. |
| 429 Rate limit or quota exhausted | Too many requests were sent, or the key has no token credits left. | Wait a minute and retry. If it continues, check your remaining balance in Account. |
If your error is not listed here, email hello@apitokendeal.com with the error message and your tool name. Never include your API key.
Terminal is a text-based app for running commands. On Mac, open Terminal from Applications → Utilities. On Windows, open PowerShell from the Start menu. If this feels unfamiliar, use the Official App path above instead.
Install the CLI version for this app and tell me how to start it. You may not need to run the manual commands below.macOS with Homebrew: install Homebrew if needed, then run this command. It installs Node.js and npm together.
brew install node
Windows: open PowerShell and run this command.
winget install OpenJS.NodeJS.LTS
Alternative for Mac or Windows: download the LTS installer from nodejs.org.
Verify: run both commands below. Each should print a version number.
node --version npm --version
https://api.apitokendeal.com/v1.curl -fsSL https://opencode.ai/install | bash
npm install -g opencode-ai
curl -fsSL https://chatgpt.com/codex/install.sh | sh
npm install -g @openai/codex
curl -fsSL https://claude.ai/install.sh | bash
irm https://claude.ai/install.ps1 | iex
curl -fsSL https://openclaw.ai/install.sh | bash
iwr -useb https://openclaw.ai/install.ps1 | iex
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
irm https://hermes-agent.nousresearch.com/install.ps1 | iex
These slash commands are common in coding-agent CLIs. Availability and exact behavior vary by tool, so check your installed app if a command is not recognized.
| Command | What it does | When to use it |
|---|---|---|
| Starts a fresh conversation or task. | Use it when you want to start separate work without the previous chat context. | |
| Condenses the current conversation context. | Use it in a long session to retain important context while reducing token use. | |
| Shows or changes the active model. | Use it to switch between a fast, lower-cost model and a stronger reasoning model. |
These terms are related but not the same. Most agent workflows use at least one CLI, may connect tools through MCP, and may organize repeatable instructions as skills.
| Concept | What It Is | Best Used For | Example |
|---|---|---|---|
| CLI | Command-line interface you run in Terminal. | Launching agents, running code tasks, installing tools, scripting workflows. | opencode, codex, claude |
| MCP | Model Context Protocol. A standard way for AI agents to use external tools and data sources. | Connecting files, browsers, databases, docs, APIs, and custom tools to an agent. | Browser MCP, filesystem MCP, database MCP |
| Terminal | The shell environment (bash, zsh) where CLI tools run. | Running commands, installing packages, managing files, starting dev servers. | Terminal.app, iTerm2, Warp |
| Skills | Reusable instructions or workflows loaded by an agent for a specific task type. | Repeatable processes such as image generation, code review, deployment, or support flows. | Project setup skill, review skill, image generation skill |
| API Provider | The model endpoint and key your tool calls. | Routing agent requests through APItokendeal instead of directly through each model vendor. | https://api.apitokendeal.com/v1 |
These MCP tools are commonly used alongside coding agents:
npm install -g @dietrichgebert/ponytail — helps keep solutions minimal.OpenAI-style coding agent focused on code editing, command execution, and repository workflows. Use your APItokendeal endpoint if the tool allows custom OpenAI-compatible providers.
Anthropic's coding assistant for terminal-based development. Use CC Switch or compatible configuration tools when you need provider switching.
Open-source terminal coding agent designed for agentic software development. It can work with compatible model providers and project-level instructions.
Popular code editor with built-in terminal, extensions marketplace, and AI agent support. Hosts MCP-capable extensions like Cline and GitHub Copilot.
VS Code agent extension with Plan/Act workflows, tool execution, file editing, and MCP support. Good for users who prefer an editor-first agent.
AI coding IDE focused on assisted development, autocomplete, agent workflows, and project generation. Best for users who want an IDE experience.
Personal AI assistant/agent project that emphasizes taking actions across apps and workflows. Useful for automation-style agent experiments.
Agent-oriented project focused on signal delivery and specialized workflows. Treat it as a domain-specific agent rather than a general coding IDE.
Many coding agents offer two modes of operation and configurable thinking depth:
| Mode | What It Does | When To Use |
|---|---|---|
| Plan | The agent researches, explores the codebase, and produces a written plan before writing any code. | Complex tasks, unfamiliar codebases, expensive models where you want to review first. |
| Build (Act) | The agent writes code and runs commands directly, with minimal upfront planning. | Simple edits, boilerplate, refactors you're confident about, fast iteration. |
Some agents let you set how much reasoning effort the model uses:
Higher thinking levels use more tokens. Start with medium and adjust based on the task.
These guides are planned for future updates:
Missing something in this guide? Send your suggestion to hello@apitokendeal.com and we'll consider adding it.