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.
| Setting | Value |
|---|---|
| Name | Any label, for example Plan2API |
| API Mode | OpenAI API Compatible |
| API Key | Your p2a_ key |
| API Host | https:// |
| API Path | Empty |
| Preview line | https:// |
| Models | openai/, claude/, more |
| Improve Network Compatibility | Off |
Add Plan2API to Chatbox
- Sign up at Plan2API with a Google account, connect a subscription and copy your
p2a_API key. - In Chatbox, click the settings button in the sidebar and select
Model Providerunder theModelsgroup. - Click
Addat the bottom of the provider list. - In the Add provider dialog, type a
Namesuch asPlan2API, keepAPI Modeon the defaultOpenAI API Compatible, and clickAdd. - Paste your
p2a_key into theAPI Keyfield. - Set
API Hosttohttps://api.plan2api.com/v1, leaveAPI Pathempty, and check that thePreviewline showshttps://api.plan2api.com/v1/chat/completions. - Add at least one model to your list with
FetchorNew, which is covered in the next section. - Click
Checknext toAPI Keyand wait forConnection 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.
| Model ID | Subscription it uses | Tick Vision |
|---|---|---|
openai/ | ChatGPT plan (Codex) | If the model accepts images |
claude/ | Claude Pro or Max | Yes |
claude/ | Claude Pro or Max | Yes |
gemini/ | Google AI Pro or Ultra | Yes |
kimi/ | Kimi Code membership | Yes |
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.
| API Host | API Path | Result |
|---|---|---|
https:// | Empty | Correct |
https:// | Empty | Correct, Chatbox adds / |
https:// | Empty | Correct, split into host and path |
https:// | / | Wrong, / appears twice |
https:// | / | Wrong, / 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
Visionis ticked. - Tool calling works across all four providers once you tick
Tool useon the model. temperatureandtop_ponly reach Gemini models, since Claude and Codex ignore them and Kimi fixestemperatureat1andtop_pat0.95.EmbeddingandRerankmodel types won't work because Plan2API has no/v1/embeddingsendpoint, so a Chatbox knowledge base needs itsEmbedding Modelfrom another provider or Chatbox AI.- Leave
Improve Network Compatibilityoff unless requests fail, because Chatbox says to enable it only when necessary, as it may reduce connection speed.
Fix Chatbox connection errors
Connection failed!: Yourp2a_key was copied incompletely or has an extra space in theAPI Keyfield, and an HTTP401invalid_api_keyerror from Plan2API means the exact same thing.Add at least one model to check connection: Chatbox requires at least one model in the provider'sModelslist before theCheckbutton will run.403no_credentials: Yourp2a_key has no connected subscription for that model's provider prefix, such as trying aclaude/model without connecting a Claude account.400model_not_found: TheModel IDis unknown, so useFetchor callGET /v1/modelsto get the exact ids Plan2API serves.Failed to fetch models: Chatbox couldn't reach the/modelsendpoint, so check yourAPI Hostvalue and look at thePreviewline to make sure/v1isn't missing or doubled.429daily_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.
# 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
- Chatbox docs: model configurationdocs.chatboxai.app
- Chatbox source: Add provider dialoggithub.com
- Chatbox source: API Host and API Path rulesgithub.com
- Chatbox source: Edit Model dialoggithub.com
- Chatbox UI inventory: provider settings textgithub.com
- Chatbox changeloggithub.com