Account (User)
Represents a real user or team. An account holds quota, and every API call is billed against it. An account belongs to a group, which determines the multiplier applied when the account uses a model.Token (API key)
A string likesk-XXXXXXXX that serves as your credential when calling the API.
One account can create multiple tokens, and each token can be configured separately:
- Quota limit: the maximum amount this token may spend (
-1means unlimited). - Expiry: leave empty for no expiry.
- Model scope: an allowlist of models this token may call (empty = all).
- IP allowlist: restrict calls to specific IPs (optional).
Group
Groups implement tiered pricing. For example:
When different groups call the same model, the actual charge is multiplied by the group’s multiplier.
Groups can also be linked to channel groups — higher tiers are routed to more stable upstream channels.
Channel
A channel is the connection config between OpenPAI and an upstream model service. One model can be served by multiple channels:Model
Model IDs match the upstream’s official names, e.g.gpt-5.5, claude-opus-4-8, gemini-3.1-pro-preview.
In the OpenPAI console or the Models overview you can view:
- Model ID and its upstream
- Input / output price multipliers
- Context window
- Supported capabilities (vision, tools, streaming, caching, etc.)
Tokens and quota
OpenPAI uses token-based billing, consistent with OpenAI:- prompt_tokens: the input tokens you send to the model.
- completion_tokens: the output tokens the model returns.
- cached_tokens: tokens that hit the prompt cache, billed at a lower rate.
- reasoning_tokens: chain-of-thought tokens produced by reasoning models (invisible but billed).
Endpoint
OpenPAI exposes 3 protocol endpoints at once; pick the one that matches your existing code:
All three endpoints share the same
sk- key and account quota — just choose the protocol closest to your existing application.