DINGJIAI
DINGJIAI
Quick start in 5 minutesWhat is DINGJIAI?

Online use

Online chatOpens in a new windowImage generationOpens in a new window

Popular Agents

Codex SetupClaude Code SetupOne-Click Setup

API Reference

API overview
Error codes

Billing

Model pricingTroubleshooting calls

Model pricing

Model prices and billing units.

Image generation

Images Generations is billed by the number of images actually returned successfully. n is the maximum number of images attempted by the request and currently supports 1-4. If a request uses n=4 but returns only one image, only one image is charged.

An invalid n fails before any upstream request is sent, so it creates no usage log and no charge.

Text models

Token-priced model products can use up to four price components. The applicable components depend on the model product published for the current API entry:

  • Ordinary input: input tokens not counted as cache reads or cache creation.
  • Cache-hit/read input: input tokens served from an existing cache.
  • Cache-creation/write input: input tokens written to a cache when the API/wire family reports that usage; currently this applies to Anthropic Messages.
  • Output: tokens generated by the model.

Prices shown in the console are authoritative for the current account; a same-named public model id on another API entry may map to a different product.

Real upstream usage takes priority. For token-priced products, a valid non-stream success JSON object with missing or invalid usage may use an output estimate with a one-output-token minimum, even with no extractable output (including {}). Stream estimates require extractable generated output; heartbeats, empty events, and raw chunks are insufficient. An upstream disconnect, client cancellation, or delivery failure may still settle trusted partial usage or extractable output already observed by the gateway; successful chunk delivery is not required.

Available balance must be positive before a call

Account balance minus active request reservations must remain greater than zero before a model call can start. Settlement may take the account balance below zero, but an available balance of zero or less blocks another model call.

Last updated on

Error codesTroubleshooting calls

On this page

Image generationText models