Skip to main content
idapt
HomeAI ModelsExploreResourcesPricing
Sign inUse for Free
  • Home
  • Pricing
  • AI Models
  • Skills
  • Image models
  • Voice models
  • Video models
  • Rankings
  • Multi-Model Chat
  • Agents
  • Computers
  • Drive
  • Automations
  • AI Gateway
  • All features →
  • Blog
  • About
  • Comparisons
  • Benchmarks
  • Model Match
  • Demos
  • Help center
  • FAQ
  • Privacy
  • Support
  • Developers
  • Quickstarts
  • API reference
  • API pricing
  • CLI
  • MCP
  • Migrate
  • Downloads
  • Desktop
© idapt[email protected]TermsPrivacy PolicyLegal noticeReport content
X (Twitter)Discord
Help Center
🔗

OpenCode with idapt

Found this helpful? Share it:

Set up OpenCode against idapt's compatible APIs with the steps below. This article and the AI Gateway quickstarts lander render the same shared steps, so they never drift.

OpenCode with idapt

One provider block gives OpenCode the full OpenRouter-style catalog through idapt: 200+ models, effort variants, spend caps.

  1. 1

    Point it at idapt

    json
    {
      "$schema": "https://opencode.ai/config.json",
      "provider": {
        "openrouter": {
          "name": "idapt",
          "options": {
            "baseURL": "https://idapt.app/api/openrouter/v1"
          }
        }
      }
    }

    Keep the provider id "openrouter" so opencode loads its bundled OpenRouter catalog; "name" is only the display label. Add the key with /connect inside opencode, or with "apiKey": "{env:IDAPT_API_KEY}" here. Project config sits at the repo root, user-wide at ~/.config/opencode/opencode.json.

  2. 2

    Going further

    json
    {
      "model": "openrouter/anthropic/claude-sonnet-5"
    }

    Top-level model ids compose as provider/model. Latest aliases carry a leading ~, for example openrouter/~openai/gpt-sol-latest.

GOOD TO KNOW

API keys and scopesOpenAI-compatible API referenceOpenRouter-compatible API referenceRate limits and errors

MORE QUICKSTARTS

Claude Code

Codex CLI

Cline

Cline

Moving to idapt entirely?

The quickstart keeps opencode as your surface. When you are ready to leave it, one command imports its chat history into idapt: run Import chats from coding agents (idapt chat import --from opencode), then continue in idapt directly.

Related articles

🔑

API keys and scopes

Create a key, choose its scopes, pin it to an API version, rotate it, and cap what it can spend.

🚦

Rate limits and errors

Every error shape the API returns, what each rate limit is, and how to handle a wall in code.

🛡️

Cap what an API key spends

Give every Gateway API key a lifetime, monthly, or daily USD cap, and what a capped-out key returns.

🔗

OpenAI-compatible API

Use idapt's 200+ models from any app that speaks the OpenAI API format.

🤖

Claude Code with idapt

Point Claude Code at idapt's Anthropic-compatible API with ANTHROPIC_BASE_URL and an idapt key; add MCP for workspace access.

🔗

Codex CLI with idapt

Configure OpenAI Codex CLI to route through idapt: a model_provider block in config.toml with the base URL, the chat wire API, and your key.

🔗

Cline with idapt

Use Cline with idapt: the OpenAI Compatible provider settings with base URL, key, and any catalog model id.

🧰

Import chats from coding agents

Bring your Claude Code, Codex, or OpenCode session history into idapt with one CLI command: dates and tool calls included.

Up next

Cursor with idapt

Use idapt in Cursor: enable the OpenAI API key lane, set the override base URL to idapt's compatible API, and add catalog model ids.

Was this helpful?