Client Setup

Claude Sonnet 5.5: Claude Code Setup and Model ID Guide

Use claude-sonnet-5-5 as the official Claude API model ID for Claude Sonnet 5.5. For Claude Code through LLMAPI, set ANTHROPIC_BASE_URL=https://llmapi.pro, without /v1, and put your LLMAPI key in ANTHROPIC_AUTH_TOKEN.

Before launching, check the exact model ID and billing mode available to your account. An official model specification, an LLMAPI catalog entry and a successful request with your own key answer different questions; do not use one as a substitute for the others.

Confirm the official model ID and capabilities

The official Claude model overview identifies Sonnet 5.5 as follows:

Setting Official Sonnet 5.5 specification
Claude API model ID claude-sonnet-5-5
Thinking Adaptive
Default effort high
Context window 1M tokens
Maximum output 128K tokens

The overview also lists text and image input, text output, multilingual capabilities, vision and tool use for the current model lineup, which includes Sonnet 5.5.

Use the exact identifier when selecting this model. Do not shorten it to claude-sonnet-5 when your intended selection is Sonnet 5.5.

Treat these as vendor specifications, not as an LLMAPI billing schedule or proof of access through a particular key. Before planning a large-context workload, check the relevant account's model access and applicable limits separately.

Match the base URL to the client protocol

The LLMAPI documentation distinguishes Anthropic-protocol clients from OpenAI-compatible clients. The Claude Code guide specifies that Claude Code uses the Anthropic protocol and calls /v1/messages.

Configuration target Address How to use it
Claude Code or Anthropic SDK base URL https://llmapi.pro Configure without /v1
OpenAI-compatible client base URL https://llmapi.pro/v1 Configure with /v1
Claude Code's messages request endpoint https://llmapi.pro/v1/messages Distinguish the complete endpoint from the base URL

For Claude Code, use the first row. Do not put the complete messages endpoint into ANTHROPIC_BASE_URL, and do not copy the OpenAI-compatible base URL into that setting.

A correct base URL is only one part of setup. Also check that the selected model supports your client protocol and that the key matches the billing mode you intend to use.

Configure Claude Code

The commands below apply the environment-variable configuration and claude --model selection syntax documented in the Claude Code setup guide to the official Sonnet 5.5 ID.

These are configuration examples, not a report of a successful Sonnet 5.5 request through your account. First confirm the model's availability for your billing mode, then replace YOUR_API_KEY locally with the matching LLMAPI key.

macOS or Linux

export ANTHROPIC_BASE_URL=https://llmapi.pro
export ANTHROPIC_AUTH_TOKEN=YOUR_API_KEY
claude --model claude-sonnet-5-5

Windows PowerShell

$env:ANTHROPIC_BASE_URL="https://llmapi.pro"
$env:ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
claude --model claude-sonnet-5-5

Windows CMD

set ANTHROPIC_BASE_URL=https://llmapi.pro
set ANTHROPIC_AUTH_TOKEN=YOUR_API_KEY
claude --model claude-sonnet-5-5

Run the configuration and launch command from the terminal you intend to use. Keep the model argument explicit during the initial check so you can compare it directly with the intended catalog entry.

The setup guide also documents persistent environment configuration through shell startup files on macOS or Linux and setx on Windows. Consider making the settings persistent only after checking the base URL, key type and model selection.

Check LLMAPI model access and billing separately

Use the LLMAPI model catalog to look for the exact claude-sonnet-5-5 identifier. Follow the Claude Code guide to check the model's billing mode and client-protocol support before selecting it.

Keep these checks separate:

Check What to establish
Official model identity The intended Claude API ID is claude-sonnet-5-5
LLMAPI listing The exact identifier is listed for your intended use
Billing mode The selected model and key belong to the intended subscription or metered setup
Account access Your account has the necessary access and remaining allowance or balance
Request result A small request using your configuration completes successfully

LLMAPI documents two distinct billing arrangements:

  • Monthly subscription: use a subscription key; supported models share the plan quota.
  • Pay-as-you-go API billing: use a separate API key and balance.

Topping up API credit does not increase subscription quota. Select the matching key type in the Console rather than assuming that credit added to one billing arrangement funds the other.

For subscription allowances and API billing options, consult the current plans page. It describes subscription allowances in model-weighted units and metered rates that depend on the selected model and channel. Do not substitute Anthropic's official vendor prices for your applicable LLMAPI charges.

Validate the setup before a larger workload

Start with a small, non-sensitive task rather than a maximum-context request. Use this sequence to isolate the configuration you are checking:

  1. Confirm that your intended model is Sonnet 5.5, with the exact ID claude-sonnet-5-5.
  2. Check the LLMAPI listing, billing mode and client-protocol support for that selection.
  3. Select the corresponding subscription or metered API key and check its remaining allowance or balance.
  4. For Claude Code, verify that ANTHROPIC_BASE_URL is exactly https://llmapi.pro, without /v1.
  5. Launch with the explicit model argument and inspect the result of a small request.

If the request does not complete, compare those settings before changing unrelated options. Do not treat the official specification table, a catalog listing or the presence of environment variables as proof that your account has completed a model request.

The essential setup is the exact Sonnet 5.5 ID, the Anthropic-protocol base URL without /v1, and a key that matches your intended LLMAPI billing mode. Verify those together before relying on the configuration for a larger task.

分享这篇文章

开始使用 LLM API

免费套餐可用。Claude Code 一行配置。

免费开始