Get available credits
Returns the account’s credits available for a new task.
GET
/v1/creditsAuthorization
AuthorizationBearer <token>Create a Open AI Image API key in Settings. Send it only from a trusted server.
In: header
Response Body
200
creditsnumberThe credits available for a new task.
401
errorobjectA valid API key is required
Properties
messagestringThe error message.
codenumberThe HTTP status code.
403
errorobjectProduct API is disabled
Properties
messagestringThe error message.
codenumberThe HTTP status code.
429
errorobjectToo many requests
Properties
messagestringThe error message.
codenumberThe HTTP status code.
500
errorobjectUnable to complete the request
Properties
messagestringThe error message.
codenumberThe HTTP status code.
curl "https://openaiimage.com/v1/credits" \
-H "Authorization: Bearer sk_sd_example"{
"credits": 950
}