Docs/IDE Integration & API/API Gateway

API Gateway

CodePus runs a unified gateway for all model traffic, enabling quotas, audit, and switching.

Endpoint

  • Base URL: https://api.codepus.ai/v1
  • Auth: Authorization: Bearer cpk_xxx (see API Key Management)
  • Routes

    PathProtocol
    POST /v1/chat/completionsOpenAI-compatible POST /v1/embeddingsOpenAI-compatible POST /v1/messagesAnthropic-compatible GET /v1/modelsModel list

    Rate limits

    PlanRPMTPM
    Free2040K Pro2001M Teamsharedshared
    Details: Quota & Rate Limits.

    Billing

    1:1 with upstream tokens; cache hits 50%. See Quota & Boost Packs.

    Tracing

    Response header x-request-id is your support ticket reference.