Set up Your own code (curl / Python / Node)

One key, three APIs: OpenAI Chat, Responses and Claude Messages. Just change the base URL in the official SDKs

Steps

  1. Note the three settings

    The same key works with all three formats. With the OpenAI SDKs the base URL ends in /v1; with the Anthropic (Claude) SDKs it is the domain only.

    • Base URL (OpenAI format): https://gpt.cherrychat.org/v1 (For both Chat and Responses)
    • Base URL (Anthropic format): https://gpt.cherrychat.org (Domain only; the SDK adds /v1/messages)
    • API key: sk-your-key
    • Model name: gpt-6.1-sol
  2. Test with curl first

    Run it in a terminal. A JSON reply containing "content" means the URL and key are correct.

  3. Python (OpenAI SDK)

    Run pip install openai, save the code as demo.py and run python demo.py. The second half streams the reply as it is generated.

  4. Node.js (OpenAI SDK)

    Run npm install openai, save the code as demo.mjs and run node demo.mjs (Node.js 18 or later).

  5. Native Claude format (Anthropic SDK)

    For existing Anthropic SDK code, change only base_url and api_key; note the address is the domain only. Install with pip install anthropic or npm install @anthropic-ai/sdk.

  6. Responses API

    OpenAI's newer Responses API works too, at https://gpt.cherrychat.org/v1/responses.

  7. List available models

    The response lists every model name this key can use.

    curl https://gpt.cherrychat.org/v1/models -H "Authorization: Bearer sk-your-key"

Common pitfalls

Error → cause → fix

What you seeWhyWhat to do
HTTP 401 (invalid api key / authentication_error)The key is wrong, contains spaces or a newline, or was disabledCopy the key again from My Keys; with env variables, make sure the old value is not still loaded
HTTP 404 Not FoundThe OpenAI SDK URL lacks /v1, or the Anthropic SDK URL has an extra /v1 (/v1/v1/messages)Use https://gpt.cherrychat.org/v1 for OpenAI SDKs and https://gpt.cherrychat.org for Anthropic SDKs
Model not found (model_not_found)The model name is wrong, or the model does not support this API formatUse a name from step 7, or a model the Models page marks as supporting this format
HTTP 402 or "insufficient balance" (billing_error in Claude format)Your credits cannot cover this call. API calls are paid from credits only; memberships and unlimited plans do not applyTop up any amount in the CherryChat Store, then retry after a few seconds
HTTP 403: IP or model not allowedThis key has an IP allowlist or an allowed-models list that excludes the current IP or modelEdit the key under My Keys on the API page and adjust or remove the limit
HTTP 429 Too Many RequestsToo many requests: by default 120 per minute per key and 8 at a time per accountLower the concurrency or requests per second in the tool and wait for the Retry-After seconds; most tools retry on their own

Guide checked 2026-11-02. The tool's screens may change; the official docs win if they differ.

API · API Pricing

Operated by UK Company CHERRYCHAT LTD · Company Number 16096119 · Support WeChat: JsnonoChat · Content is AI-generated — please verify before relying on it

CherryChat

The network is slow. Still loading…