Before you start
- A personal Model Gateway key. See API keys.
- A model ID from Available models in Settings > Account > API keys, or from
GET https://gateway.langdock.com/v1/models.

YOUR_API_KEY with your key and your-model-id with a model ID in the examples below. The gateway converts between formats, so every enabled model works in every tool, including Claude models in Codex and GPT models in Claude Code.
Let your coding agent set it up
For Claude Code, Codex and OpenCode, switch Setup method to Agent setup. Langdock gives you a command that puts the key into aLANGDOCK_API_KEY environment variable in your terminal, and a prompt for the tool. Start the tool in that terminal and paste the prompt. The agent lists your models, sends a test request, backs up and updates the tool’s config file and tells you what it changed. The prompt never contains the key itself.
Set up a tool
- Claude Code
- Codex
- Cursor
- GitHub Copilot
- OpenCode
- Claude Desktop
Claude Code uses the Anthropic Messages format.Run
1
Check your models
2
Add your settings
Add this to The base URL has no
~/.claude/settings.json (Windows: %USERPROFILE%\.claude\settings.json) and create the file if it does not exist. Make sure ANTHROPIC_API_KEY is not set in your shell, because it takes precedence over the token:/v1, because Claude Code adds /v1/messages itself.3
Start Claude Code
/status to check that Anthropic base URL shows https://gateway.langdock.com. If you are signed in with a claude.ai account, run /logout first.On the classic endpoint
If your workspace does not have the Model Gateway yet, use your personal API key with the classic endpoint onapi.langdock.com. Replace the gateway URLs like this:
Use
us instead of eu for models hosted in the US. On dedicated deployments, replace https://api.langdock.com with https://<your-domain>/api/public. The classic endpoint does not convert formats, so:
- Claude Code, Claude Desktop and OpenCode work with Anthropic models only, Cursor and GitHub Copilot with OpenAI compatible models only.
- Cursor Agent does not work there, and Claude and Gemini models cannot be added to Cursor there.
- The classic Responses endpoint accepts only function tools, so Codex’s built in tools are rejected there. Use Codex through the Model Gateway.
Troubleshooting
More in Errors and troubleshooting.