Skip to content

invalid_json

Invalid JSON. The request body is not valid JSON.

HTTP status 400
Type invalid_request_error
Code invalid_json
Can retrying help? No. The same request gets the same answer until you change it or fix the cause.
Charged? No. This refusal is free.

Send a JSON object with Content-Type: application/json.

{
"error": {
"type": "invalid_request_error",
"code": "invalid_json",
"message": "The request body is not valid JSON.",
"param": null,
"doc_url": "https://docs.halationlab.ai/errors/invalid-json/",
"request_id": "req_01JD3Y5RJ6M3XW6J8K2N4P7Q9T"
}
}

See Errors for the error shape and how to handle errors in general, and Billing outcomes for what every outcome costs.