Docs/IDE Integration & API/API Reference Overview

CodePus API Reference Overview

CodePus offers an official AI gateway compatible with the OpenAI protocol. Free and trial allowances are available only within the official CodePus IDE, website, and mobile apps, with no external API access; paid accounts 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/completions and more.
  • Proxy Base URL — set proxyBaseUrl in 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.