Get account ledger
https://revise.io/api/v1/account/ledgerLatest 50 entries with no pagination. available_delta_usd is the signed net change in account credit. Prompt and conversion entries expose the corresponding job ID; funding entries have neither. Use /v1/usage for historical charge aggregation.
See pricing and account credit for integration guidance.
TypeScript#
import { ReviseClient } from "@reviseio/api";
const revise = new ReviseClient({ apiKey: process.env.REVISE_API_KEY! });
const result = await revise.account.ledger();Authorization#
AuthorizationstringrequiredBearer <key>, with an API key from the console.
Responses#
200LedgerRead the latest 50 credit entries
dataarray<object>requiredProperties
idintegerrequiredkindstringrequiredprompt_idstring | nullrequiredPrompt linked to this entry, or null. Follow with GET /v1/prompt/{id}; conversion_id is null for prompt entries. Both IDs are null for funding entries.
conversion_idstring | nullrequiredConversion linked to this entry, or null. Follow with GET /v1/convert/{id}; prompt_id is null for conversion entries.
available_delta_usdstringrequiredSigned net change to the credit balance for this entry. Historical reservation holds and their releases net to zero.
example "0.050000000"
created_atstring<date-time>requiredlimitnumberrequiredalways 50
defaultErrorError
errorobjectrequiredProperties
codestringrequiredmessagestringrequireddetailsobject