User Setup

Setup Guide

Your complete first time setup guide. Need another topic? Email hello@apitokendeal.com.

Installation Guide

Step 0: Get your API key

First, sign in to your Account page. Under API Keys, select Show and copy your key. It starts with sk-.

Keep it private: treat your API key like a password. Do not share it in screenshots, GitHub issues, public code, or chat messages.

Step 1: Choose a tool

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.

Do not know what Terminal is? Use the Official App path below. It uses a normal app interface, so you do not need Terminal or command-line setup to begin.

Step 2: Install your tool

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.

Recommended for beginners: Install OpenCode

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

Install Codex from its official website, then continue to Step 3.

Install Claude Code

Install Claude Code from its official website, then continue to Step 3.

Install OpenClaw

Install OpenClaw from its official website, then continue to Step 3.

Install Hermes Agent

Install Hermes Agent from its official website, then continue to Step 3.

Step 3: Install CC Switch

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.

  1. Open the official CC Switch website: ccswitch.io/en/
  2. Download the latest release for your operating system: on Mac, choose the .dmg file; on Windows, choose the .exe installer or .zip archive.
  3. Open CC Switch, select your installed tool, add a Custom Configuration, then enter the APItokendeal values below.
  4. Click Fetch Model, then choose a model under Actual Request Model. Set Menu Display Name to the same model name, then save and enable the configuration.
APItokendeal configuration
Provider Name:APItoken
Base URL:https://api.apitokendeal.com/v1
API Key:Paste the sk-... key from your Account page
Model:Refer to the Model Catalog

Choose 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.

Keep your API key private. Do not paste it into public GitHub issues, screenshots, shared terminals, or client-side code.

Step 4: Test your setup

  1. Open the tool you installed.
  2. Start a new chat or coding session.
  3. Send: Hello, which model are you?
  4. If you receive a response, your API key and endpoint are working.

Common errors

If it does not work, check the error code below. Do not share your key when asking for help.

ErrorWhat it meansWhat 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.

Optional CLI path (alternative to Step 2)

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.

Already installed OpenCode or another coding app? Ask it: Install the CLI version for this app and tell me how to start it. You may not need to run the manual commands below.

Before installing a CLI: install Node.js

macOS with Homebrew: install Homebrew if needed, then run this command. It installs Node.js and npm together.

macOS Terminal
brew install node

Windows: open PowerShell and run this command.

Windows PowerShell
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.

Terminal or PowerShell
node --version
npm --version
  1. Open CC Switch and ensure the required app is set up.
  2. Set the API base URL to https://api.apitokendeal.com/v1.
  3. Paste your APItokendeal API key from the Account page.
  4. Save the configuration, then fully restart the CLI or app. For example, quit and reopen OpenCode CLI.
  5. Run a small test request before using it in a real project.
Install OpenCode CLI
Mac
curl -fsSL https://opencode.ai/install | bash
Windows PowerShell
npm install -g opencode-ai

Official guide.

Install Codex CLI
Mac
curl -fsSL https://chatgpt.com/codex/install.sh | sh
Windows PowerShell
npm install -g @openai/codex

Official guide.

Install Claude Code CLI
Mac
curl -fsSL https://claude.ai/install.sh | bash
Windows PowerShell
irm https://claude.ai/install.ps1 | iex

Official guide.

Install OpenClaw CLI
Mac
curl -fsSL https://openclaw.ai/install.sh | bash
Windows PowerShell
iwr -useb https://openclaw.ai/install.ps1 | iex

Official guide.

Install Hermes Agent CLI
Mac
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
Windows PowerShell
irm https://hermes-agent.nousresearch.com/install.ps1 | iex

Official guide.

Useful CLI commands

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.

CommandWhat it doesWhen 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.

Introduction

5. CLI, MCP, And Skills

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.

ConceptWhat It IsBest Used ForExample
CLICommand-line interface you run in Terminal.Launching agents, running code tasks, installing tools, scripting workflows.opencode, codex, claude
MCPModel 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
TerminalThe shell environment (bash, zsh) where CLI tools run.Running commands, installing packages, managing files, starting dev servers.Terminal.app, iTerm2, Warp
SkillsReusable 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 ProviderThe model endpoint and key your tool calls.Routing agent requests through APItokendeal instead of directly through each model vendor.https://api.apitokendeal.com/v1

Suggested MCP Installations

These MCP tools are commonly used alongside coding agents:

  • Ponytail AI: install via npm install -g @dietrichgebert/ponytail — helps keep solutions minimal.
  • Browser Control: MCP server that lets agents control a browser. Install the package matching your agent (e.g. Playwright MCP, Puppeteer MCP, or your agent's built-in browser tool).
  • Chrome Browser MCP: connects agents to a Chrome instance for web tasks. Follow the tool's setup guide for your agent.

6. Tool Overview

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.

Claude Code

Anthropic's coding assistant for terminal-based development. Use CC Switch or compatible configuration tools when you need provider switching.

Opencode

Open-source terminal coding agent designed for agentic software development. It can work with compatible model providers and project-level instructions.

VS Code

Popular code editor with built-in terminal, extensions marketplace, and AI agent support. Hosts MCP-capable extensions like Cline and GitHub Copilot.

Cline

VS Code agent extension with Plan/Act workflows, tool execution, file editing, and MCP support. Good for users who prefer an editor-first agent.

Trae

AI coding IDE focused on assisted development, autocomplete, agent workflows, and project generation. Best for users who want an IDE experience.

OpenClaw

Personal AI assistant/agent project that emphasizes taking actions across apps and workflows. Useful for automation-style agent experiments.

Hermes Agent

Agent-oriented project focused on signal delivery and specialized workflows. Treat it as a domain-specific agent rather than a general coding IDE.

7. Plan & Build Mode

Many coding agents offer two modes of operation and configurable thinking depth:

ModeWhat It DoesWhen To Use
PlanThe 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.

Thinking Level

Some agents let you set how much reasoning effort the model uses:

  • Low: fast responses, minimal reasoning — good for simple tasks, cheap models, high throughput.
  • Medium: balanced reasoning — default for most tasks.
  • High: deep reasoning — complex bugs, architecture decisions, nuanced requirements.

Higher thinking levels use more tokens. Start with medium and adjust based on the task.

8. Coming Topics

These guides are planned for future updates:

  • GitHub: connecting agents to repos, PR workflows, GitHub MCP.
  • Repository Setup: cloning, branching, syncing code with your agent.
  • Vercel Deployment: deploying apps from your agent to Vercel.
  • Docker: containerized development environments for agents.
  • Environment Variables: managing secrets and config across tools.

9. Suggest a Topic

Missing something in this guide? Send your suggestion to hello@apitokendeal.com and we'll consider adding it.