Get API

GET API · Developer integrations

Configure Get API for Claude Code through CCSwitch

This page describes only the CCSwitch flow verified in the existing UI: create a Get API key for Claude Code, add a Provider in the CCSwitch Claude area, paste the API key and request address currently shown in the console, enable it, and restart Claude Code completely. Because the Get API environment-variable contract for Claude Code has not been independently verified, this page does not invent commands or label the OpenAI chat Base URL as a Claude-specific endpoint.

Use the current official Claude Code installation page

Claude Code installation methods and system requirements can change. Select the current method for your system from the official installation page and use claude --version or the official diagnostic path to confirm installation. Get API does not host a copied installer.

  • Start from the current code.claude.com installation guide
  • Avoid installers from unknown sources
  • Diagnose installation separately from Provider setup

Use only the verified CCSwitch fields

The existing flow verifies selecting Claude in CCSwitch, adding a custom Provider, entering an API key and request address, and enabling it. Copy the request address from the current Get API key page rather than forcing another protocol address into Claude Code.

  • Use a key and request address from the same account
  • Select a current group intended for Claude Code
  • Do not claim an unverified CLI environment contract

Restart completely and validate the first message

A running Claude Code client may retain old settings after a Provider change. Quit it completely, start it again, and send a simple message. On failure, separate 401, 404, unavailable model, and stale configuration.

  • Confirm the new Provider is enabled
  • Quit every Claude Code process
  • Record the status and selected group

Complete the Claude Code Provider setup in CCSwitch

The reference screenshots show the verified Chinese UI; field labels may move between CCSwitch versions.

  1. Install and check Claude Code from the official channel

    Follow the current official Claude Code installation page and confirm that claude --version works. Do not download a third-party installer from this site.

  2. Create a key intended for Claude Code

    Create a Get API key and choose a group currently identified for Claude Code in the console.

    Claude Code group options while creating a Get API key
    Choose a current group intended for Claude Code. Names and availability in the live console are authoritative; the reference UI is shown in Chinese.
  3. Select Claude in CCSwitch

    Open CCSwitch and switch to the Claude Provider area in the top tool selector.

    Claude Provider selector in CCSwitch
    Enter the Claude Provider area in CCSwitch. The reference UI is shown in Chinese.
  4. Add and fill a custom Provider

    Add a Provider, paste the Get API key into the API Key field, and paste the request address from the same key page into the request-address field.

    Empty custom Provider form for Claude in CCSwitch
    Fill the name, API Key, and current console request address. The reference UI is shown in Chinese.
  5. Save and enable the Provider

    Save the configuration, enable the Provider, and confirm that it is the active selection.

    Enable action for a Claude Provider in CCSwitch
    Enable the target Provider after saving. The reference name is only an example and the UI is shown in Chinese.
  6. Restart completely and send the first message

    Quit Claude Code completely, reopen it, and send a simple message. The integration is complete only after a normal response arrives.

Check the Claude Code installation first

This command verifies only that the local CLI is available. It contains no Get API key and no unverified Provider environment variable.

claude --version

Claude Code integration troubleshooting

Separate installation, authentication, routing, and cached-client state first.

SymptomLikely causeActionSuccess check
claude command is unavailableInstallation is incomplete or PATH is staleReturn to the current official instructions, finish installation, and reopen the terminalclaude --version runs
401Incomplete or disabled key, or key pasted into the wrong fieldCopy it again from secure storage and verify the CCSwitch API Key fieldThe first message no longer returns authentication failure
404 or connection failureRequest address from another service, incomplete copy, or unsaved formCopy the current request address again from the same Get API key pageThe request reaches the intended service path
Model unavailableThe key group does not match the Claude Code targetReview the current key-group options and account accessThe target Provider returns an available model response
Old Provider remains activeTarget Provider is disabled or a Claude Code process is still runningConfirm enablement, quit every Claude Code process, and restartThe restarted client uses the new Provider

Frequently asked questions

Which request address should Claude Code use?

In the verified CCSwitch flow, copy the current request address from the Get API key page and use it with the key from the same account. Do not infer it from another protocol example.

Should I send a Claude Code key to support?

Never send the complete key. Share a redacted identifier, status, group, and steps instead; disable and rotate the key first if exposure is suspected.

Why is the old Provider still active?

The target Provider may not be enabled, or Claude Code may still be running. Save and enable it, quit every process, and then restart.

Does this page support direct Claude Code environment variables?

It makes no such claim yet. This guide covers only the verified CCSwitch configuration; an environment-variable contract requires independent verification.

Business inquiries: business@honeykid.cn