Get account
const url = 'https://reignitor.com/v1/me';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://reignitor.com/v1/me \ --header 'Authorization: Bearer <token>'Returns the account that owns the API key, and its current credit balance. Use it to check that a key works before you start a render.
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”The key is valid.
object
The account’s first name, if set.
The account’s current credit balance.
Example
{ "user_id": "3f1c2a9e-8b7d-4c1e-9f0a-2d6b5e4c3a21", "email": "dev@example.com", "name": "Sam", "credits_remaining": 42}The key is missing, malformed, unknown or revoked.
Every error has a human-readable error. Most also have a machine-readable code.
object
A message you can show to a person.
A stable code to branch on. Not every error has one.
Extra context for some codes, such as retryAfter or usage figures.
Seconds to wait before retrying. Present on some RATE_LIMITED errors.
Examples
No key, or not an emp_ key
{ "error": "Unauthorized", "code": "NO_API_KEY"}Unknown or revoked key
{ "error": "Invalid or revoked API key", "code": "INVALID_API_KEY"}The key is valid but the account is not on the Agency plan.
Every error has a human-readable error. Most also have a machine-readable code.
object
A message you can show to a person.
A stable code to branch on. Not every error has one.
Extra context for some codes, such as retryAfter or usage figures.
Seconds to wait before retrying. Present on some RATE_LIMITED errors.
Example
{ "error": "API access is part of the Agency plan.", "code": "PLAN_UPGRADE_REQUIRED", "feature": "api_access", "plan": "pro"}The account that owns the key is suspended.
Every error has a human-readable error. Most also have a machine-readable code.
object
A message you can show to a person.
A stable code to branch on. Not every error has one.
Extra context for some codes, such as retryAfter or usage figures.
Seconds to wait before retrying. Present on some RATE_LIMITED errors.
Example
{ "error": "Account suspended", "code": "ACCOUNT_SUSPENDED"}Something went wrong on our side.
Every error has a human-readable error. Most also have a machine-readable code.
object
A message you can show to a person.
A stable code to branch on. Not every error has one.
Extra context for some codes, such as retryAfter or usage figures.
Seconds to wait before retrying. Present on some RATE_LIMITED errors.
Example
{ "error": "Something went wrong handling that request."}