CodePus API Reference Overview
CodePus offers an official AI gateway compatible with the OpenAI protocol. Free and trial allowances are available only within the CodePus IDE, with no external API access; accounts with an active paid subscription can also use the issued API Key (prefix cpk_) from the IDE or third-party programs.
Quick Start
- Create an API Key: go to API Key Management and generate a key starting with
cpk_. - Configure the Base URL: see Proxy Base URL to point your client at the CodePus gateway.
- Make a request: follow the OpenAI-Compatible API protocol.
Core Docs
- API Gateway — gateway address, authentication and request spec.
- OpenAI-Compatible API — compatibility notes for
/v1/chat/completionsand more. - Proxy Base URL — set
proxyBaseUrlin your IDE or third-party tools. - API Key Management — create, rotate and revoke
cpk_keys. - Quota & Boost — Credits quota, rate limits and booster strategy.
- IDE Sign-in & Device Binding — device authorization and sign-in flow.
- IDE Integration Troubleshooting — common error codes and fixes.
Authentication
All requests must carry the HTTP header:
Authorization: Bearer cpk_xxxxxxxxxxxxxxxx
Need Help?
See IDE Integration Troubleshooting or go to Contact Support.