Skip to content

Credits API ​

Every processing job consumes credits from a balance. The Credits API reads balances, packages and transaction histories for a user, an organisation or a collection, and answers what an operation costs. How credits work and where to top up is on Credits and cost.

Authentication is the same as for every other API: a Transkribus account and a Bearer token, see Authentication.

Reading your balance ​

Get the authenticated user's credit balance ​

GEThttps://api-credit.transkribus.org/user/balance

User identity comes from the bearer token (trp_user_id).
BALANCE_SOURCE=legacy (dual-read phase) returns the legacy shape;
on legacy outage it falls back to the local computation with
header X-Balance-Source: new_degraded. Locally computed balances
additionally carry superModelEligibleBalance — the sum of
personal package balances that may pay for super-model (TrHtr)
jobs (welcome-standard credits are excluded). Frontends treat an
absent field as "eligibility gate unavailable".
When ENABLE_WELCOME_GRANT=true this read lazily creates the
one-time welcome grant (20 super-eligible + 30 restricted).

Responses​

{ userId, addOn, scholar, organisation, superModelEligibleBalance? }

Try it out

Playground​

Authorization

Samples​

Get user's package overview (all packages with their transactions) ​

GEThttps://api-credit.transkribus.org/user/packages
Try it out

Playground​

Authorization

Samples​

GEThttps://api-credit.transkribus.org/user/transactionHistory
Try it out

Playground​

Authorization

Samples​

What things cost ​

Calculate cost breakdown for a job ​

GEThttps://api-credit.transkribus.org/costs

Returns how credits would be consumed from different pools (team, scholar, topup). Proxy phase: when colId AND modelId are provided (and WRITE_MODE=proxy), the preview is proxied to the legacy TRP costs endpoints (collection-package aware) and translated into the same schema; the source response field says which path answered (legacy | local | local-fallback).

Parameters​

Query Parameters

nrOfPages*
Type
integer
Required
modelType*
Type
string
Required
provider*
Type
string
Required
docType*
Type
integer
Required
Valid values
01
colId

Legacy collection id — with modelId, enables the legacy proxy

Type
integer
modelId

Legacy model id — with colId, enables the legacy proxy

Type
integer
credits

Legacy credit selection strategy (omitted → AUTO)

Type
string
Valid values
"USER_ONLY""COLLECTION_ONLY"
Try it out

Playground​

Authorization
Variables
Key
Value

Samples​

What the reference leaves out ​

Allocation, top-up, deduction and refund operations in the Credits group are called by the platform itself when jobs run and purchases complete; they are listed for completeness. Migration, mission control, analytics and shadow comparison are operations tooling and are left out of the sidebar.

Transkribus Developer Platform