CherryINCherryIN
New API Guides

OpenAI-Compatible Setup Guide

Use CherryIN with Cline, Dify, n8n, Chatbox, CherryStudio, and other OpenAI-compatible tools

Who is this for?

If your tool supports any of the following setup styles, you can use this guide directly:

  • OpenAI
  • OpenAI Compatible
  • Custom OpenAI
  • A manual Base URL + API Key setup

Typical examples include Cline, Dify, n8n, CherryStudio, Chatbox, and most AI clients or workflow tools that support the OpenAI protocol.

You only need 3 values

FieldWhat to enterExample
Base URLCherryIN's OpenAI-compatible endpointhttps://open.cherryin.net/v1
API KeyThe token you created in the CherryIN consolesk-xxxxxxxx
Model IDFull model name in provider/model formatanthropic/claude-sonnet-4.5

Token Group Tip

For most users, a default group token is the easiest option because it can access more models directly. If you want discounted models from a promotional group, make sure the token and model group match. See Quick Start.

What these fields are usually called in tools

Tool field nameWhat you should enter
API Provider / ProviderSelect OpenAI, OpenAI Compatible, or Custom OpenAI
Base URL / API Base URL / Endpointhttps://open.cherryin.net/v1
API Key / Bearer TokenYour CherryIN API key
Model / Model IDFor example anthropic/claude-sonnet-4.5
Organization IDUsually leave blank

Universal setup template

  1. Choose an OpenAI or OpenAI Compatible provider in your tool.
  2. Set Base URL to https://open.cherryin.net/v1.
  3. Paste your CherryIN key into API Key.
  4. Enter a full model ID such as anthropic/claude-sonnet-4.5.
  5. Save, test, or send a message to verify the setup.

Model Name Format

CherryIN model IDs must use the full provider/model format. For example, use anthropic/claude-sonnet-4.5, not just claude-sonnet-4.5.

When should you use Chat Completions vs Responses?

ScenarioRecommended API
Most chat tools, IDE assistants, and workflow nodesChat Completions
A tool lets you choose the raw API mode and you want to use a GPT-5.x modelResponses API

GPT-5.x Compatibility

For GPT-5.x models such as openai/gpt-5.2-chat, prefer the Responses API instead of Chat Completions.

Chat Completions example

curl https://open.cherryin.net/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxxxx" \
  -d '{
    "model": "anthropic/claude-sonnet-4.5",
    "messages": [
      {"role": "user", "content": "Hello, introduce yourself in one sentence."}
    ]
  }'

Responses API example

curl https://open.cherryin.net/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxxxx" \
  -d '{
    "model": "openai/gpt-5.2-chat",
    "input": "Summarize CherryIN setup in 3 bullet points."
  }'

Common issues

1. 401 Unauthorized

Usually caused by one of these:

  • The API key was copied incorrectly
  • There is an extra space or newline in the key
  • The tool isn't sending the key as a Bearer token

2. Model not found

Make sure you're using the full model ID, for example:

  • Correct: anthropic/claude-sonnet-4.5
  • Incorrect: claude-sonnet-4.5

3. The tool only says OpenAI, not OpenAI Compatible

That can still work if the tool lets you manually set a custom Base URL. If it doesn't allow a custom endpoint at all, it usually can't connect to CherryIN directly.

4. GPT-5.x request fails

Check whether the tool is hardcoded to /chat/completions. If so, switch to a setup that supports the Responses API, or test with a non-GPT-5.x model first.

Next steps