payload_too_large error
payload_too_large is returned with HTTP 413. Retryable: no. Sending the same request again returns the same error. Nothing is charged for this error.
What it means
The request body is too large.
Most likely cause
The request body is over the 64 KB limit, usually because a whole list or a file was sent as one input.
How to fix it
Send one lookup input per request and keep the JSON body small. Split large lists into separate requests.
Example
A body of about 70 KB is refused with HTTP 413 before it is parsed.
printf '{"ip":"%s"}' "$(head -c 70000 /dev/zero | tr '\0' a)" | curl -i -X POST https://YOUR_API_HOST/v1/ip -H "Authorization: Bearer $LOOKVALID_API_KEY" -H "Content-Type: application/json" --data-binary @-
An error response is one JSON envelope. Branch on code, never on the message text. The message and fix of a real response can be more specific than the defaults shown here.
{
"error": {
"code": "payload_too_large",
"message": "The request body is too large.",
"fix": "Send one lookup input per request and keep the JSON body small. Split large lists into separate requests.",
"docs_url": "https://lookvalid.com/docs/errors/payload_too_large",
"retryable": false,
"request_id": "req_3fK9pQ2xVb7LmN4sTz8WcA"
}
}
See also
- All error codes with the response envelope.
- API reference.
- Quote the
request_idwhen you write to hello@lookvalid.com.