I’m getting HTTP 422 “Unprocessable Entity.” What does it mean?
Last updated: August 6, 2026
422 means the request reached us but something in it is invalid. Unlike some providers, we validate your request — including tool/function JSON schemas — rather than silently ignoring unsupported fields. The message in the response body tells you the cause; here are the common ones:
A. Tool schema issues
Message | Cause | Fix |
|---|---|---|
| A tool/function schema uses | Replace |
| A tool schema contains a JSON | Inline the referenced definitions so the schema is self-contained. |
| The model doesn’t have tool calling enabled on that endpoint. LangChain’s | Use a tool-capable model — check the “Supported Functionality” panel via |
| A tool object is missing its | Include at least a |
B. Field combination conflicts
Message | Cause | Fix |
|---|---|---|
|
| Remove |
|
| Remove |
C. Unknown fields — we reject unknown fields rather than silently ignoring them:
{"message":"invalid JSON payload: no such field: '<field_name>'"}Common fields that trigger this: thinking, advanced, enable_thinking, extended_thinking. If you need to toggle reasoning on a model that supports it, use chat_template_kwargs: {"enable_thinking": true} instead.
reasoning_effort sent as a boolean (e.g., True) returns a different message: "expected number or string at reasoning_effort". Use a string value ("high", "medium", "low") or a number instead.
D. Malformed messages — sending messages as a plain string instead of an array of objects:
{"message":"invalid JSON payload: unexpected character: '\"'; expected '{' at messages"}
Sending the messages field to the /v1/completions endpoint (which expects prompt) returns "no such field: 'messages'". Chat requests should go to /v1/chat/completions.
E. Parameter range validation
Message | Cause | Fix |
|---|---|---|
|
| Set to a value in (0, 1.0] |
|
| Set to a positive integer |
|
| Reduce to 32 or fewer |
|
| Provide at least one message object |
F. top_logprobs — top_logprobs is not supported on any current serverless model because all models have reasoning content parsing enabled:
{"message":"top_logprobs is not supported with reasoning content parsing."}logprobs: true alone (without top_logprobs) is accepted.
G. Context length and KV-cache
Message | Cause | Fix |
|---|---|---|
| Input exceeds the model’s context window. Context length = input + output combined. | Shorten the prompt or switch to a model with a larger context window. |
| Prompt + max_tokens × n exceeds available KV-cache capacity at request time, often under load. | Reduce |