Skip to Content
API referenceBilling API

Billing API

Base path: /api/v1/subscription/. Python: client.billing.

Plans, subscriptions, credit balance, and usage history.

Rate card

What each operation costs is set in one rate card and can change without a release, so read it at runtime instead of hard-coding a price:

curl https://indox.org/api/v1/subscription/rate_card/ 

No authentication is needed. Only operations currently on sale are listed. Python: client.billing.rate_card().

FieldMeaning
credits_per_usdCredits per US dollar.
operations[].keyconvert.document, convert.image, convert.video (video and audio), convert.model, convert.font, office.convert.
operations[].unitper_job: charged once per conversion request, however many output formats it asks for (documents and PDFs, fonts, office files). per_output: charged once per requested output format (images, video and audio, 3D models).
operations[].creditsCredits charged per unit.
ai[]AI features: base_credits is charged per use, plus the tokens used at the model’s rate. label is the display name.

PDF tools (merge, split, compress and the other PDF operations) are free for signed-in callers and are not on the card.

Every format listing returns the same credits value the job is charged: /api/v1/pdf_handler/formats/ and /operations/, /api/v1/convert/image/formats/, /api/v1/convert/video/formats/, /api/v1/convert/model/operations/, /api/v1/fonts/formats/ and /routes/. GET /pricing_plan/ carries credit_cost and credits_per_usd.

A signed-in request whose balance is below the price is refused with 402 before any work starts. An operation that is not on sale answers 503 {"detail": "subscription.price_unavailable"}, on its listing and on submit.

Reading your account

MethodPathPythonReturns
GET/credits/balance/billing.credits_balance()credit_amount, usd_equivalent, has_subscription, subscription_remaining
GET/credits/threshold/billing.credits_threshold()Low-balance alert thresholds: soft_threshold, hard_threshold, is_active
PUT/credits/threshold/billing.set_credits_threshold(soft_threshold=..., hard_threshold=..., is_active=True)The saved thresholds
GET/current/billing.current_subscription()The active cycle (plan, status, cycle_used, cycle_total, resets_at, …); 204 when there is none, which Python returns as {}
GET/tasks/usage-by-feature/?since=billing.usage_by_feature(since=None)Credits spent per feature since a cutoff
GET/purchase_history/billing.purchase_history()Past purchases
GET/pricing_plan/billing.pricing_plans()Plans for sale
POST/credits/promo-code/billing.redeem_promo(code)Redeem a promo code; the body is {"code": ...} and no longer takes purchase_amount

Purchases need a sign-in

POST /purchase_initiate/, POST /purchase_initiate/pay-as-you-go/ and POST /storage/initiate/ refuse an API key with 403; call them with a sign-in access token (Auth). In Python, pass it as access_token= to purchase_initiate, purchase_pay_as_you_go or storage_initiate.

See Concepts → Credits for the basics.