Credits
Credits pay for live analyses. This page explains how your organization gets credits, what happens to a credit during an analysis, and how to check your balance.
What a credit is
One live analysis uses one credit. Every organization has one shared pool of credits, and every gfy_live_ key draws from it. Test keys never use credits.
How credits reach your organization
- Grihafy adds credits to your organization. There is no self-service purchase yet; contact us.
- Each addition is a separate grant and can have an expiry date. Credits that expire soonest are used first, so they are not wasted.
The life of a credit
When you submit a live analysis, one credit is held: set aside for that analysis but not yet used. When the analysis completes the credit is spent. If it does not complete, the credit is returned.
Granted creditsAdded by Grihafy for your organization
- become available
availableCredits you can spend now
- submitting an analysis moves 1 credit to held
- a grant with an expiry date expires if unused
heldReserved while an analysis is running or waiting for review
- completed: the credit is spent
- failed, expired or deleted: the credit returns to available
spentUsed by a completed analysis
expiredUnused credits past their expiry date
| What happens | Effect on your credit |
|---|---|
| You submit a live analysis | One credit moves from available to held. |
| The analysis completes | The held credit is spent. |
| The analysis fails | The held credit is returned to available. |
| A review step is not answered for about 7 days | The analysis expires and the credit is returned. |
| You delete the analysis before it finishes | The held credit is returned. |
| You delete a completed analysis | Nothing changes. The credit stays spent. |
| An analysis waits for a review step | The credit stays held. Answering the review does not hold another credit. |
| The plan shows several flats | One credit covers the whole plan. The other flats are created without a hold. |
| The upload is rejected (too large, wrong type or unreadable image) | No credit is held and no analysis is created. |
| You submit with no credit available | 402 insufficient_credits. Nothing is created. Retry after more credits are added. |
Check your balance
GET /v1/credits returns the live balance. Call it before a large batch of submissions.
curl https://api.grihafy.com/v1/credits \
-H "Authorization: Bearer gfy_live_..."| Field | Meaning |
|---|---|
available | Credits you can use right now. Held credits are already subtracted. Always null for a test key. |
held | Credits reserved for analyses that are queued, processing or waiting for review. |
expiringSoon | Grants that expire within 30 days, each with the amount still unused and its expiry time. |
Expiry
- Expired credits stop counting toward
availableas soon as they expire. - A credit already held for a running analysis is still spent normally if its grant expires meanwhile.
- If an analysis fails after the grant its credit came from has expired, the returned credit is not restored.
Usage history and alerts
The API reports the balance only. Members can see every grant and spend, and export them as CSV, at /org/your-org/settings/usage in the Grihafy web app. There is no low-balance notification yet, so check available and expiringSoon yourself.
A test key returns available: null. Test analyses never hold, spend or return credits. See Sandbox.