200. Anything else is an error, and an error costs no credits.
The error body
400 answers, and 404 for a job, are JSON:
errorslists every problem, not only the first.pathsays which param is wrong: where it is (queryorparams) and its name.codeis7001for a bad param and7002for not found.- Read
messageto fix your request, but do not match on its text in code; it may change. Match on the status andcode.
401, 402, 403 and 429 answers are JSON with one error message, for example {"error": "Missing or unknown API key"}. A 401 also has a WWW-Authenticate: Bearer header. A path that does not exist gets a plain-text 404.
Retries
Retry5xx answers, with a growing wait between tries. Retry 429 after its Retry-After. Do not retry 400, 401, 402, 403 or 404; they will fail again.