Credits
Get remaining credits
What the account of the key has loaded and spent, in dollars. Your balance is total_credits minus total_usage. It costs nothing to call.
/ v1 / creditsAuthorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your API key.
Response
The totals of the account.
dataobjectrequiredThe totals.
Show child attributesHide child attributes
total_creditsnumberrequiredEverything loaded: top-ups and adjustments.
Example:
25total_usagenumberrequiredEverything spent, by every key of the account.
Example:
3.4182
The key is missing, wrong, revoked or expired.
errorobjectrequiredThe error.
Show child attributesHide child attributes
messagestringrequiredWhat went wrong, for a person to read.
typestringrequiredThe error family, as in the OpenAI API.
Example:
"authentication_error"codestringrequiredThe exact cause. Branch on this one. All codes: Limits and errors.
Example:
"invalid_api_key"paramnullrequiredAlways
null.
Temporarily unavailable. Retry after a short wait.
errorobjectrequiredThe error.
Show child attributesHide child attributes
messagestringrequiredWhat went wrong, for a person to read.
typestringrequiredThe error family, as in the OpenAI API.
Example:
"authentication_error"codestringrequiredThe exact cause. Branch on this one. All codes: Limits and errors.
Example:
"invalid_api_key"paramnullrequiredAlways
null.