Query usage
YYYY-MM-DD format for start_date and end_date.
Check balance
Use the account endpoints in the API Reference for the current balance and subscription fields. Preserve the precision returned by the API so small image, audio, and music charges are not rounded away.Reconciliation practices
- Save the request time, model, input size, output size, and response ID.
- Save task IDs for image and music jobs so users can resume after refreshing the page.
- Show the actual failure reason for failed tasks instead of displaying only a generic error.