Retrieve a credit grant
Authentication
A secret key (rl_sk_test_..., rl_sk_live_...) or a restricted key with limited scopes (rl_rk_test_..., rl_rk_live_...). A restricted key can carry agent: true and an expires_at, and is what a coding agent should hold. Keys end in a checksum so secret scanners can recognize them. People create, roll and revoke keys in the dashboard; GET /v1/api_keys lists them, masked.
Path parameters
The credit grant ID (cg_...).
Response
paid credits carry a cost basis and count as deferred revenue until used. promotional credits are free.
An amount of money that can hold fractions of a minor unit, such as a per-token cost.
When unused credits expire. A top-up or auto top-up grant always has one: one year after payment completes by default, or as the plan’s top_up.credits_expire_in or the checkout session’s credits_expire_in sets. Left out only on a grant created with POST /v1/credit_grants and no expires_at.
The allowance key behind a grant with source: allowance, or its rollover.