Skip to content

Credits and usage

Billable services are settled in account credits. Amounts are given in millicredits (millicredits); 1000 millicredits equal 1 credit. Amounts you send in requests must be integers; amounts in balances and records may carry one decimal place (0.1 millicredit). credit_precision in responses is 4, meaning at most 4 decimal places once converted to credits.

GET /api/v1/billing/credits/balance
Terminal window
curl https://omnidoc.top/api/v1/billing/credits/balance \
-H "X-API-Key: $OMNIDOC_API_KEY"

Key fields:

FieldMeaning
availableMillicredits available now, after debt; negative when in debt
debtDebt in millicredits: the part of completed jobs’ actual cost that exceeded the balance. Credits that arrive later (top-ups, daily grants, redeem codes, refunds and so on) pay off the debt first
spentTotal millicredits settled
expiredMillicredits that expired or were withdrawn
today_chargedMillicredits settled today
lotsCredit lots currently valid and their expiry
GET /api/v1/billing/credits/plans

A public endpoint that needs no sign-in and returns the packs on sale (purchase_plans, keyed by plan code). On sale now:

Plan codeCreditsPriceBonus
credits_3000_v43,000¥9.90—
credits_10000_v410,000¥29.90—
credits_25000_v425,000¥698%
credits_50000_v4 (recommended)50,000¥12916%
credits_125000_v4125,000¥29925%
credits_450000_v4450,000¥99935%
  • “Bonus” is computed against the price of 10,000 credits for ¥29.90 and is the bonus_percent field; the recommended pack has recommended: true. Neither field appears when it is not set.
  • price_fen (in fen, 1/100 yuan) is authoritative for the price, and total_millicredits (millicredits) for the credits. Purchased credits do not expire; packs can be bought again and arrive in one go each time.
  1. The balance is checked against a threshold before a job starts: the balance (after debt) must be above the job’s threshold, for example “pages × 2 credits” for PDF translation, the length of the source text for other files (at least 2 credits), and for audio, video and speech the cost computed from the duration or characters the server measured (prices in audio, video and voices). With an API key that has a budget, the key’s remaining budget must also be above the threshold. Otherwise the response is 402 (a file translation job ends as failed with quota_exceeded=true, a media job ends with error_code=insufficient_credits) and nothing is charged. Starting a job does not change the balance.
  2. Actual usage is charged when it finishes: file translation (including images), batched rich text, document operations, audio, video and speech are charged in full for actual usage on completion. An API key’s budget only takes part in the check before the start and never reduces the charge for a completed job; if that pushes the key’s used budget past its limit, the key cannot start new jobs until the limit is raised. Failed or cancelled jobs are not charged.
  3. The balance can go negative: the part of the actual cost that exceeds the balance is recorded as debt and the balance shows as negative; credits that arrive later pay off the debt first. New jobs cannot start while the balance is negative; top up.

Clients never submit “how much should be charged”; the server computes the settled amount from what was delivered.

GET /api/v1/billing/credits/operations?limit=20
GET /api/v1/billing/credits/operations/{operation_id}
GET /api/v1/billing/credits/jobs/{job_id}

A record contains the operation ID, status, billing basis, and the amounts charged and refunded. Listed with an API key, operations include only those started by that key.

GET /api/v1/usage?limit=50
GET /api/v1/usage/summary

The usage endpoints return the account’s file count, characters, tokens and processing time.

Checking the balance, job status, usage, settlement records, result lists and download addresses costs no credits.