Skip to content

Get current organization AI credit balance

GET
/v1/billing/ai-credits

Current AI credit balance

Current organization AI credit balance

object
remaining
required

Credits remaining

number
resetsAt

When credits will next reset

string format: date-time

Unauthorized, authentication required

Standard error response

object
status
required

HTTP status code

integer
Example
400
code
required

Machine-readable error code in snake_case

string
Allowed values: bad_request unauthorized payment_required forbidden not_found conflict rate_limited internal_error project_not_found project_limit_reached service_not_found service_name_conflict subscription_not_found customer_not_found insufficient_ai_credits invalid_billing_cycle validation_failed resource_already_exists public_share_token_not_found
message
required

Error message

string
Example
Validation failed
details

Additional error details

string
Example
Project name must be between 3 and 60 characters

Too many requests

Rate limit exceeded error response

object
status
required

HTTP status code

integer
Example
429
code
required

Machine-readable error code in snake_case

string
Allowed values: bad_request unauthorized payment_required forbidden not_found conflict rate_limited internal_error project_not_found project_limit_reached service_not_found service_name_conflict subscription_not_found customer_not_found insufficient_ai_credits invalid_billing_cycle validation_failed resource_already_exists public_share_token_not_found
message
required

Error message

string
Example
Too many requests
retryAfter
required

Number of seconds until the client can retry

integer
Example
60
Retry-After
integer

Number of seconds to wait before retrying

Internal server error

Standard error response

object
status
required

HTTP status code

integer
Example
400
code
required

Machine-readable error code in snake_case

string
Allowed values: bad_request unauthorized payment_required forbidden not_found conflict rate_limited internal_error project_not_found project_limit_reached service_not_found service_name_conflict subscription_not_found customer_not_found insufficient_ai_credits invalid_billing_cycle validation_failed resource_already_exists public_share_token_not_found
message
required

Error message

string
Example
Validation failed
details

Additional error details

string
Example
Project name must be between 3 and 60 characters