Credits
One credit pays for one analyzed note. The API and the web app draw from the same organization balance.
How charging works
- When an analysis starts, one credit is held. For a batch, one credit per note is held when you create it.
- If the analysis succeeds, the held credit is charged.
- If the note is out of scope or the analysis fails, the held credit returns to your balance.
Notes that end out of scope or fail are never charged, so they're limited instead: at most 25 a day per organization. For more information, see Uncharged notes.
A held credit is already out of your balance, so credits_remaining and GET /v1/credits show what's free to spend.
If the balance doesn't cover a request, the response is 402 insufficient_credits, and nothing is charged. For a
batch, nothing is stored or held either.
You buy credit packs on the Billing page in the app. There's no API endpoint for purchases.
Get the balance
GET/v1/credits
Returns the balance and the lots it's drawn from. Only lots with credits left are listed, the soonest to expire first.
A lot that never expires has "expires_at": null. Credits are spent from the lot that expires first.
curl -s https://api.medchartscan.io/v1/credits \
-H "Authorization: Bearer $ACCESS_TOKEN"{"balance": 49, "lots": [{"remaining": 49, "expires_at": null}]}| Field | Description |
|---|---|
balance | Credits available to spend now. |
lots | Each lot with credits left: remaining and expires_at. |
Plan ahead for batches
A batch needs the whole number of notes in its balance before it starts. To avoid a 402, check the balance first and
split the notes into smaller batches if needed. Every analysis response also includes credits_remaining, so you can
track the balance without an extra call.