CLIENT & SDK CONFIG UTILITY

Claude Code, Codex & Cursor API Config Generator

Pick your AI coding agent or backend SDK, choose an active catalog model ID, and copy a verified configuration file plus a minimal connectivity smoke test.

ExecutionZero login · 100% browser-localProtocol templates checked November 11, 2026
01

Generate copy-ready client and SDK configuration

Select your coding agent or backend SDK to match the exact endpoint (/v1/responses, /v1/chat/completions, or Anthropic environment variables) and catalog model ID.

1. Configuration file or SDK snippet

request.example
// ~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://app.llmfly.ai",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_CLAUDE_GROUP_API_KEY",
    "ANTHROPIC_MODEL": "claude-sonnet-5-5",
    "ANTHROPIC_SMALL_FAST_MODEL": "claude-haiku-5-5"
  }
}

2. Minimal connectivity smoke test

request.example
claude -p "Reply with OK." --model claude-sonnet-5-5
02

Engineering reference and rollout checks

Protocol differences between Claude Code, Codex CLI, and Cursor

Developer tools do not share a single wire format even when they connect to the same gateway domain. Claude Code speaks Anthropic's native Messages protocol and expects ANTHROPIC_BASE_URL set to https://app.llmfly.ai without a trailing /v1 suffix, paired with a key from the Claude Code group.

By contrast, Codex CLI and newer OpenAI reasoning models (such as gpt-6-astra, gpt-6.1-sol, gpt-6-sol, and gpt-6.1-terra) rely on the OpenAI /v1/responses wire API so reasoning summaries, patches, and shell tool calls survive multi-turn execution. Cursor and standard chat libraries connect to https://app.llmfly.ai/v1 using /v1/chat/completions.

Client / SDKBase URLWire protocolConfig file location
Claude Codehttps://app.llmfly.aiAnthropic Messages API~/.claude/settings.json
Codex CLIhttps://app.llmfly.ai/v1OpenAI Responses API (responses)~/.codex/config.toml
Cursor IDEhttps://app.llmfly.ai/v1OpenAI Chat CompletionsCursor Settings -> Models
OpenAI Python / TS SDKhttps://app.llmfly.ai/v1Responses or Chat CompletionsServer environment variables

Preventing 401, 403, and 404 errors during first-time setup

Three configuration mistakes cause over 90% of initial connection failures: appending /v1 twice (resulting in /v1/v1/chat/completions 404s), typing a marketing display name like "GPT-6 Astra" instead of the exact lowercase catalog ID gpt-6-astra, or using an API key assigned to a different model group than the requested route.

  • Keep official vendor credentials and LLMFly AI gateway keys in separate shell profiles or project directories so CLI sessions never bill the wrong account.
  • Run the non-streaming smoke test shown in step 2 before enabling MCP servers, repository indexing, or background sub-agents.
  • Issue distinct API keys per developer laptop, CI runner, and staging service so leaked or expired keys can be revoked individually.

Frequently asked questions

Why does Claude Code omit /v1 in ANTHROPIC_BASE_URL?

Claude Code appends /v1/messages internally according to Anthropic's SDK convention. Including /v1 in ANTHROPIC_BASE_URL produces /v1/v1/messages and fails with HTTP 404.

When should Python or TypeScript apps use client.responses.create instead of chat.completions.create?

Use client.responses.create for GPT-6 Astra, GPT-6.1 Sol, GPT-6 Sol, and GPT-6.1 Terra—especially when combining reasoning effort with function calling or built-in Responses tools.

Can I use any API key for both Claude Code and GPT models?

Check your key's group assignment in the LLMFly AI console. Claude Code routes and OpenAI Codex/GPT routes belong to specific billing groups in Model Plaza.

Create a dedicated key for your coding environment

Generate a scoped API key in the console and verify your first CLI or SDK request in under a minute.

Get API Key