imgrender

Status codes and error codes

HTTP status codes and business error codes shared by the imgrender API

HTTP status codes

HTTP status codeDescriptionSuggested action
200Success
400Request failedThis is usually because the request parameters are invalid. Check the request parameters against the message.
401Authentication failedCheck that the API key is set correctly.
403Request rejectedThe server received the request, but rejected it because of a business restriction. Follow the message.
404Resource not foundCheck the request parameters.
429Rate limitedLower the request rate.
500System errorSomething went wrong on the server. Contact support.

Common error codes

The following are common error codes. Error codes specific to an API are documented on that API's page.

Error codeHTTP status codeDescriptionSuggested action
0200Success
10101500System errorSomething went wrong on the server. Contact support.
10102429Rate limitedQPS is too high. Lower the request rate.
10103400Invalid parametersCheck the request parameters against the message.
10104401Authentication failedCheck that the API key is set correctly and is still valid.
10105403Operation forbiddenThe request was rejected because of a business restriction. Follow the message.
10106403Duplicate operationThe request is a duplicate. Retry shortly.
10107404Resource not foundCheck the request parameters.
30101403Insufficient resourcesCheck that the account has enough credits.

Error response body

A failed response includes an error object in addition to code and message. A successful response does not include this field.

{
  "code": 10105,
  "message": "Try again in 30 seconds",
  "error": {
    "name": "captcha.cooldown",
    "params": { "seconds": 30 }
  }
}
FieldTypeDescription
codeintegerError category. See the table above for values.
messagestringEnglish error message that can be shown to users directly.
error.namestringStable error name, written as lowercase dot-separated English. Different scenarios under the same error code use different names.
error.paramsobjectInterpolation parameters for the message. Omitted when there are no parameters.

When your code needs to branch by scenario, match error.name. Matching the message text is unreliable. Once published, an error.name keeps its meaning; the wording of message may change.

Common error.name values for the Open API:

error.nameError codeDescription
system.validation_failed10103Request parameter validation failed. See message for details.
apikey.missing10104No API key was set.
apikey.invalid_format10104The API key format is invalid.
apikey.invalid10104The API key does not exist, or the key is incorrect.
apikey.revoked10104The API key is no longer valid. Replace it.
credits.insufficient30101Not enough credits are available.
template.not_found10107The template does not exist.
template.not_published10112The template is not published or has been archived.
render.failed20105Image rendering failed.
blueprint.*10103Blueprint parameter validation failed. See message for details.

On this page