> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jiekou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API Configuration and Technical Integration

## 1. What should I use as the API Base URL?

Depending on the protocol, the main options are:

* OpenAI-compatible format: [https://api.highwayapi.ai/openai](https://api.highwayapi.ai/openai) or [https://api.highwayapi.ai/openai/v1/chat/completions](https://api.highwayapi.ai/openai/v1/chat/completions)
* Anthropic native protocol: [https://api.highwayapi.ai/anthropic](https://api.highwayapi.ai/anthropic) (for tools such as Claude Code)
* Dedicated image/video generation endpoint: [https://api.highwayapi.ai/v3/](https://api.highwayapi.ai/v3/) (such as Gemini, Nano Banana, etc.)

Note: If you encounter a 404 error, check whether an extra /v1 was added at the end of the URL. Different tools handle path concatenation differently.

## 2. What should I do if an API call returns 401 "invalid token"?

1. Confirm that the API Key has been created correctly: [https://jiekou.ai/settings/key-management](https://jiekou.ai/settings/key-management)
2. Confirm that the Authorization format in the request header is: Bearer sk\_xxxxxx
3. If using Claude Code, the environment variable should be set to ANTHROPIC\_AUTH\_TOKEN=sk\_xxxxx (do not add the Bearer prefix; the tool will add it automatically)

## 3. How do I troubleshoot a 404 "page not found" response?

Common causes:

* Incorrect URL: for example, using /v3/glm-asr but spelling it incorrectly
* Incorrect model routing: for example, Codex models need to use /v1/responses instead of /v1/chat/completions
* Automatic path concatenation by tools: some tools (such as cc-switch) automatically add /chat/completions, so the Base URL should not include that path

## 4. How do I configure Jiekou.AI in Claude Code?

Configure the environment variables as follows:

Windows cmd:

```
set ANTHROPIC_BASE_URL=https://api.highwayapi.ai/anthropic
set ANTHROPIC_AUTH_TOKEN=sk_YOUR_API_KEY
set ANTHROPIC_MODEL=claude-opus-4-1-20250805
set ANTHROPIC_SMALL_FAST_MODEL=claude-sonnet-4-20250514
```

Mac/Linux bash:

```
export ANTHROPIC_BASE_URL=https://api.highwayapi.ai/anthropic
export ANTHROPIC_AUTH_TOKEN=sk_YOUR_API_KEY
export ANTHROPIC_MODEL=claude-opus-4-1-20250805
export ANTHROPIC_SMALL_FAST_MODEL=claude-sonnet-4-20250514
```

Reference documentation: [https://docs.jiekou.ai/docs/integration/claudecode](https://docs.jiekou.ai/docs/integration/claudecode)

## 5. How do I resolve Claude Code prompting forced login/verification required?

The latest version of Claude Code may require login. Solutions:

* Use the Cline extension instead (search for it in the VSCode extension marketplace)
* Or use it together with forwarding tools such as cc-switch

## 6. How do I call GPT-5.1 / Codex models? Why am I getting a 400 error?

The GPT-5.1 series (including Codex) needs to use OpenAI's Responses API, not Chat Completions:

```
curl "https://api.highwayapi.ai/openai/v1/responses" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <API Key>" \
-d '{
    "model": "gpt-5.1-codex",
    "input": [...],
    "max_output_tokens": 64000
  }'
```

## 7. What should I do if Claude 4.5 returns an error related to "thinking block"?

The error usually says: Expected 'thinking' or 'redacted\_thinking', but found 'text'. This is because after the Thinking feature is enabled for Claude 4.5, the context must contain a specific thinking block format. Recommendations:

* Clear the conversation history and start over
* Or disable the Thinking feature (if not needed)
* Use the native Anthropic protocol instead of the OpenAI-compatible protocol (the latter may have incomplete support for Thinking)

## 8. What should I do if the Claude API returns an "input too long" error?

Claude models have input length limits (usually max\_tokens supports up to 64000). Please check:

* Input text length
* Size of Base64 images (compress oversized images first)
* Accumulated length of historical conversation context

***

**Contact Support**

If the FAQ above does not resolve your issue, please contact technical support through the following methods:

* Enterprise WeChat/WeChat technical support group (recommended, fastest response)
* Information format to provide:
  * Issue description + screenshot
  * Account ID (UUID)
  * Trace ID (if available, usually included in the error message)
  * Request parameters (after masking sensitive information)
