Usage and limits
Retrieve usage
usage = client.account.usage.retrieve()
print(usage.balance_deci_micros)
print(usage.usage.requests)
print(usage.usage.characters)
print(usage.usage.audio_ms)
print(usage.usage.spent_deci_micros)The response belongs to the project associated with the supplied API key.
Money values
Money is returned as integer deci-micro-USD. 10,000,000 equals $1.00. Keep the integer value in accounting code and format it only for display.
Limit errors
- Request-rate and concurrent-generation limits raise
RateLimitError. - Insufficient credit and spending limits raise
BillingError. - Rate limits may retry only before streaming bytes are delivered.
- Billing failures are not retried automatically.
