Chatbox integration

Chatbox custom provider setup with Plan2API

To use GPT, Claude, Gemini or Kimi in Chatbox 1.24 with Plan2API, open Settings, Model Provider, Add, keep API Mode on OpenAI API Compatible, set API Host to https://api.plan2api.com/v1, leave API Path empty and paste your p2a_ key. Add a model such as openai/gpt-6.1-sol and click Check.

API Mode
OpenAI API Compatible
API Host
https://api.plan2api.com/v1
API Path
Leave empty
Free plan
50 requests a day

Updated

Chatbox settings at a glance

Here is every field you need to fill in when setting up a Chatbox custom provider.

Never pick OpenAI Responses API Compatible, Claude API Compatible or Google Gemini API Compatible, because Plan2API only speaks the Chat Completions format.

Chatbox custom provider settings for Plan2API
SettingValue
NameAny label, for example Plan2API
API ModeOpenAI API Compatible
API KeyYour p2a_ key
API Hosthttps://api.plan2api.com/v1
API PathEmpty
Preview linehttps://api.plan2api.com/v1/chat/completions
Modelsopenai/gpt-6.1-sol, claude/claude-sonnet-5, more
Improve Network CompatibilityOff

Add Plan2API to Chatbox

  1. Sign up at Plan2API with a Google account, connect a subscription and copy your p2a_ API key.
  2. In Chatbox, click the settings button in the sidebar and select Model Provider under the Models group.
  3. Click Add at the bottom of the provider list.
  4. In the Add provider dialog, type a Name such as Plan2API, keep API Mode on the default OpenAI API Compatible, and click Add.
  5. Paste your p2a_ key into the API Key field.
  6. Set API Host to https://api.plan2api.com/v1, leave API Path empty, and check that the Preview line shows https://api.plan2api.com/v1/chat/completions.
  7. Add at least one model to your list with Fetch or New, which is covered in the next section.
  8. Click Check next to API Key and wait for Connection successful!, then go back, start a new conversation and pick a Plan2API model.

Add models with Fetch or New

Clicking Fetch sends a GET request to https://api.plan2api.com/v1/models with your key in an Authorization: Bearer header and loads every model id Plan2API serves, including providers you haven't connected. You can then pick just the ones you want to add to your Chatbox list: keep to subscriptions you've connected, since any other model returns HTTP 403 no_credentials, and for Codex ids like openai/gpt-6.1-sol pick one your ChatGPT plan includes.

If you prefer adding one model at a time, click New to open the Edit Model dialog and enter the Model ID. Keep Model Type on Chat, and under Capabilities tick Vision for models that accept images and Tool use so tools can run (or just click Test Model, which runs those tests and ticks Vision and Tool use for you when they pass). Leaving capabilities unticked means Chatbox treats the model as a plain text model.

Plan2API model ids for Chatbox
Model IDSubscription it usesTick Vision
openai/gpt-6.1-solChatGPT plan (Codex)If the model accepts images
claude/claude-sonnet-5Claude Pro or MaxYes
claude/claude-opus-5-5Claude Pro or MaxYes
gemini/gemini-3.8-flash-highGoogle AI Pro or UltraYes
kimi/k3Kimi Code membershipYes

API Host and API Path combinations

Chatbox builds its request URL by joining API Host and API Path, adding /v1 on its own only when API Host doesn't end in /v1 and API Path is left empty, and automatically splitting a full /chat/completions URL if you paste one into API Host. The table below shows which combinations work and which ones break when you configure your Chatbox API host.

Whatever you type into the two fields, the Preview line must read https://api.plan2api.com/v1/chat/completions.

What Chatbox builds from API Host and API Path
API HostAPI PathResult
https://api.plan2api.com/v1EmptyCorrect
https://api.plan2api.comEmptyCorrect, Chatbox adds /v1
https://api.plan2api.com/v1/chat/completionsEmptyCorrect, split into host and path
https://api.plan2api.com/v1/v1/chat/completionsWrong, /v1 appears twice
https://api.plan2api.com/chat/completionsWrong, /v1 is missing

What works and what doesn't

  • Chat with streaming works on Claude, Codex, Gemini and Kimi models.
  • Image input works on Claude, Gemini and Kimi models and on Codex models that accept images, once Vision is ticked.
  • Tool calling works across all four providers once you tick Tool use on the model.
  • temperature and top_p only reach Gemini models, since Claude and Codex ignore them and Kimi fixes temperature at 1 and top_p at 0.95.
  • Embedding and Rerank model types won't work because Plan2API has no /v1/embeddings endpoint, so a Chatbox knowledge base needs its Embedding Model from another provider or Chatbox AI.
  • Leave Improve Network Compatibility off unless requests fail, because Chatbox says to enable it only when necessary, as it may reduce connection speed.

Fix Chatbox connection errors

  • Connection failed!: Your p2a_ key was copied incompletely or has an extra space in the API Key field, and an HTTP 401 invalid_api_key error from Plan2API means the exact same thing.
  • Add at least one model to check connection: Chatbox requires at least one model in the provider's Models list before the Check button will run.
  • 403 no_credentials: Your p2a_ key has no connected subscription for that model's provider prefix, such as trying a claude/ model without connecting a Claude account.
  • 400 model_not_found: The Model ID is unknown, so use Fetch or call GET /v1/models to get the exact ids Plan2API serves.
  • Failed to fetch models: Chatbox couldn't reach the /models endpoint, so check your API Host value and look at the Preview line to make sure /v1 isn't missing or doubled.
  • 429 daily_requests: You've used up the Free plan's 50 chat requests for the day, which resets at 00:00 UTC.

Check the Preview line first whenever a connection check or model fetch fails, and make sure it reads https://api.plan2api.com/v1/chat/completions.

The curl commands below send the exact same requests Chatbox sends, so you can test your key and models outside the app.

curl
# What Fetch requests: the model ids your key can use
curl https://api.plan2api.com/v1/models \
  -H "Authorization: Bearer $PLAN2API_KEY"

# What a chat message requests
curl https://api.plan2api.com/v1/chat/completions \
  -H "Authorization: Bearer $PLAN2API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "openai/gpt-6.1-sol", "messages": [{"role": "user", "content": "Hi"}]}'

Use your ChatGPT or Claude plan in Chatbox

Plan2API turns a ChatGPT subscription (through Codex), Claude Pro or Max, Google AI Pro or Ultra (through Antigravity), or a Kimi membership (through Kimi Code) that you already pay for into a single p2a_ API key. One Chatbox custom provider can then run models from all four providers without separate setups.

You keep paying your provider for your subscription, Plan2API never bills per token, and your subscription's own usage limits apply. You can compare the plan tiers on the pricing page:

  • Free: $0, 1 connected subscription, 50 chat requests a day (resets at 00:00 UTC), no card required.
  • Pro: $12 a month or $99 a year, 3 connected subscriptions, no daily request cap.
  • Scale: $29 a month or $249 a year, 25 connected subscriptions, no daily request cap.

Use the AI subscriptions you already pay for as one OpenAI-compatible API key.

  • Free: 1 subscription, 50 requests a day, no card
  • Pro: $12 a month

FAQ

Which API Mode do I pick for Plan2API in Chatbox?

Pick OpenAI API Compatible, which is selected by default when you add a custom provider. Plan2API only speaks the OpenAI Chat Completions format at POST /v1/chat/completions, so OpenAI Responses API Compatible, Claude API Compatible and Google Gemini API Compatible will all fail.

Do I need to fill in the API Path in Chatbox?

No, leave API Path empty and Chatbox will automatically use /chat/completions. As long as API Host is set to https://api.plan2api.com/v1, the Preview line will read https://api.plan2api.com/v1/chat/completions.

Can I use GPT models in Chatbox with my ChatGPT subscription?

Yes, connect your ChatGPT plan through Codex on Plan2API and add openai/gpt-6.1-sol or another openai/ model id that Fetch lists from your account. Your ChatGPT plan's own usage limits apply.

Why does Chatbox say Connection failed?

Usually the p2a_ key in API Key was copied incompletely or has a trailing space; with no model added, Chatbox shows Add at least one model to check connection instead. If the key and model are set, a 403 no_credentials error means you haven't connected a subscription for that model's provider yet.

Can Chatbox knowledge bases use Plan2API?

Not for embeddings, because Plan2API doesn't have a /v1/embeddings endpoint. You'll need to select your knowledge base's Embedding Model from another provider in Settings or use Chatbox AI to handle the knowledge base processing.

Sources

  1. Chatbox docs: model configurationdocs.chatboxai.app
  2. Chatbox source: Add provider dialoggithub.com
  3. Chatbox source: API Host and API Path rulesgithub.com
  4. Chatbox source: Edit Model dialoggithub.com
  5. Chatbox UI inventory: provider settings textgithub.com
  6. Chatbox changeloggithub.com