Skip to main content
Models on DimiLinks belong to different groups, and the selected group directly determines the final cost. The following constraints apply before a request can run:
  • Each model is available only in a fixed set of groups. For example, claude-opus-4-8 is available only in Claude groups; the default group cannot run Claude.
  • Your API key has its own set of available groups. That set must intersect the target model’s available groups for the request to succeed.
  • You cannot extrapolate the cost of the same prompt linearly across models or groups. Billing uses “official price × model multiplier × group multiplier,” and combinations may differ by dozens of times.
Do not hardcode multipliers. Groups and prices may change at any time. Treat the GET /api/pricing response as the runtime source of truth.

Authoritative endpoint

This public endpoint requires no authentication and returns all live groups, public group descriptions, models, and multipliers:

Field definitions

How callers select a group

There are two ways to select a group in a request:
  1. Omit group (recommended): The server calculates “API key groups ∩ model enable_groups,” then selects one using auto_groups and internal priority. This default workflow is sufficient for most callers.
  2. Pass group explicitly: Add a value such as "group": "claude 特价" to the request body. The group must belong to both the API key’s available groups and the model’s enable_groups; otherwise, the API returns 403 model_not_allowed.
Specify group only when one API key has multiple eligible target groups and your application must consistently use one of them.

Billing formulas

For token-billed models (quota_type = 0):
For per-request models (quota_type = 1):
n is the number of images or videos actually produced by the task. For image endpoints, it is the n field in the request body.

Cost examples

claude-opus-4-8 in the claude 特价 group, with 1K input tokens and 500 output tokens:
  • model_ratio = 2.5, completion_ratio = 5, group_ratio = 0.3
  • input = 1000 × 2.5 × 0.3 = 750
  • output = 500 × 2.5 × 5 × 0.3 = 1875
  • total ≈ 2625 in internal system quota, converted to display currency using the account’s quota_per_unit
Comparing gpt-5.5 in the default and open ai 特价 groups:
  • default: group_ratio = 1; the full model_ratio 2.5 × completion_ratio 6 calculation applies.
  • open ai 特价: group_ratio = 0.5; the final cost is half the cost in the default group.
One asynchronous 2K image from gpt-image-2:
  • The 2K tier has model_price = 0.15; group_ratio is either gpt-image-2 = 1 or default = 1, so the request costs 0.15. Read the separate resolution_options values for the 1K and 4K tiers instead of applying the 2K price.

Video billing: two groups, two rules

Video capability is split into two groups with different billing. Confirm which group a model belongs to before calling it; see Video groups and billing rules.

The seedance/h3 group: per-second billing (tiered_expr)

minimax-h3, seedance 2.0, and seedance 2.5 use per-second billing: cost = per-second price × seconds, with the resolution determining the per-second price (seedance/h3 group ratio = 1). In /api/pricing, these models carry billing_mode: "tiered_expr" and a billing_expr that declares the per-second price of each resolution tier:

The doubao seedance group: per-token billing

doubao-seedance-2-0-260128, doubao-seedance-2-0-fast-260128, doubao-seedance-2-0-mini-260615, and doubao-seedance-2-5-260628 use per-token billing (quota_type = 0) and support 720p only. The doubao seedance group ratio is 0.7, i.e. 30% off the official baseline. Token usage depends on duration × resolution and follows the standard token formula.

Per-resolution image billing

gpt-image-2.5-flare / gpt-image-2.5-sunburst are billed by token ratio (input 37.5×, output 2×); the actual cost depends on the image size.

Engineering recommendations

  • Retrieve GET /api/pricing at startup and build a model_name → { enable_groups, model_ratio, completion_ratio, cache_ratio, quota_type, model_price } index. Use pricing_version as the cache key.
  • When showing available groups for a model in the UI, read data[].enable_groups and the usable_group descriptions directly instead of maintaining a separate hardcoded map.
  • Cost estimates must account for all four values: model_ratio, completion_ratio, cache_ratio, and group_ratio. Omitting any of them produces an inaccurate estimate.
  • When you see 403 model_not_allowed, first check whether the API key’s available groups cover the target model’s enable_groups. As a temporary workaround, set group explicitly to a group the current key actually has.