Error codes
All errors return { status: "error", code, message, details? }, with message in the requested language (?lang=en or the Accept-Language header; Spanish by default). The limit of 60 requests per minute per IP is covered in /en/docs/rate-limits.
400INVALID_PARAMS
A required parameter is missing or has an invalid value (e.g. "count").
Recommended fix:Check the parameters against the endpoint reference and its allowed values.
400INVALID_BODY
The request body is not valid JSON, or does not have the expected shape.
Recommended fix:Send `Content-Type: application/json` with a body that matches the endpoint schema.
404UNKNOWN_GENERATOR
The `generator` in the URL does not exist (`GET /generators` lists the valid ones).
Recommended fix:Call `GET /api/v1/generators` or check the Generators section of this documentation.
400UNSUPPORTED_LOCALE
The `locale` in the URL is not supported (currently only "es").
Recommended fix:Use "es" as the locale until more countries are added.
413COUNT_LIMIT_EXCEEDED
"count" exceeds the maximum allowed by that endpoint.
Recommended fix:Lower `count` to the limit stated in the endpoint reference, or split the work into several requests.
429RATE_LIMIT_EXCEEDED
Your IP exceeded the requests-per-minute limit.
Recommended fix:Wait until the `X-RateLimit-Reset` time given in the response header, or batch several rows into a single request with `count`.
500INTERNAL_ERROR
Unexpected server error while processing the request.
Recommended fix:Try again later. If it persists, check that the request matches the endpoint schema.