400 invalid_json | The body is not a JSON object. | Fix the JSON and send content-type: application/json. |
400 unsupported_parameter | The field's value changes the answer, and Qwen does not support that setting: for example a non-empty stop, n greater than 1, or logprobs. | Remove the field named in error.param. Sampling parameters such as temperature and top_p are accepted and do not affect the answer. |
400 invalid_stream / invalid_stream_options | stream is not a boolean, or stream_options has a field other than include_usage. | Send a boolean and only include_usage. |
400 messages_required / invalid_input / max_tokens_required | messages is missing (input in Responses); in Messages, max_tokens is missing. | Send a non-empty history and, in Messages, an output budget. |
400 invalid_token_limit / conflicting_token_limits | The output limit is below 1 or above 131,072, or both max_tokens and max_completion_tokens were sent. | Keep one field. A value above the model's limit (65,536 for the Plus models and qwen3.5-omni-plus, 131,072 for the others) is reduced to that limit by the gateway. |
400 invalid_tools / unsupported_tool_type / invalid_tool_schema | tools is not an array of objects, the type is not function, or the parameter schema is invalid. | Fix the function declaration for the selected API. |
400 unverified_server_tool | Messages requested a server tool other than web_search_* and web_fetch_*. | Use a client function; Qwen decides on search itself. |
400 stored_responses_unsupported | Responses included store: true or previous_response_id: Qwen does not store responses. | Remove these fields and send the whole history in input. |
400 background_unsupported | Responses included background: true. | Remove background: the answer arrives as a regular response or a stream. |
400 invalid_tool_choice | tool_choice requires a function that is not in tools. | Send auto, none, required, or the name of a declared function. |
400 unsupported_image / invalid_image / inline_media_required | An image for qwen3.7-max, a file that is not PNG, JPEG, or WEBP, or a URL instead of base64 (a URL or file_id in Messages and file_id in Chat receive 400 unsupported_parameter). | Choose a model with image input and send the file in the request body. |
400 unsupported_media / invalid_attachment / invalid_document / document_encoding_unsupported | The document is not PDF, TXT, CSV, Markdown, or JSON, the data is not base64, the PDF is damaged, has more than 200 pages, or too much text, or a text file is not UTF-8. | Send a supported file in the request body; split a large PDF into parts. |
400 effort_unsupported | Messages included output_config.effort. | Remove output_config: Qwen does not accept an effort level. |
404 model_not_found | The ID is not one of the seven Qwen IDs, or /qwen/v1 received another family's model. | Fetch GET /qwen/v1/models and send an exact ID. |
413 context_too_large | Input exceeds the model context, or the request text is larger than 2 MiB. | Shorten the history or lower the output budget. |
413 attachments_too_large / too_many_images | The request's attachments are too large together, or the history has more than 32 images. | Shrink the attachments, remove old ones from the history, or start a new conversation. |
413 request_body_too_large | The request body exceeds 12 MiB; base64 makes files about a third larger, so a file above 9 MiB receives this refusal. | Shrink the attachments or send them in separate requests. |