Receipts & Billing
Receipts & Billing
Receipts
Every response — including error responses after admission, and streamed responses — carries two headers:
x-singularity-request-idx-singularity-receipt-id
Fetch the receipt any time with GET /v1/receipts/{id}. There’s no SDK helper for this endpoint — call it directly.
A full receipt looks like this:
Field glossary
state— the request’s lifecycle state;settledonce billing is final.served_modelvsrequested_model— what actually ran the request vs what you asked for. These differ on contract calls.transformed_fields— which fields in your request the gateway modified or injected, such as an omitted output-limit field.usage.estimated—trueif token counts are estimated rather than exact.total_cost_usd— the exact charge, as a 12-decimal string.contract— present only on contract calls:{"slug": "...", "revision": 3}.
usage and total_cost_usd are null until the request reaches a terminal state.
Credits
Credits are prepaid. Buy them in the dashboard at https://app.singularityapi.dev via Stripe Checkout.
- New accounts get a $1 signup grant.
- Deposit-match promotion: purchases are matched 100% with promotional credit, capped at $1,000 lifetime per account.
- Promotional credit is spent before paid credit, and can expire.
Reserve-then-settle
Each request reserves its maximum possible cost up front — computed from the model’s list price and the request’s token bounds — then settles to the exact amount at completion. The receipt’s total_cost_usd reflects the final, settled charge.
If you don’t have enough credit to cover the reservation, the request fails with 402 insufficient_credit. See Errors & Rate Limits for the full error envelope.
A price change never affects an in-flight or already-settled request.