Authorizations
QwenCloud API Key. Create one in the QwenCloud console.
Body
application/jsonThe model name.
An array of messages providing text to translate. Only user messages are supported.
Translation-specific parameters.
Whether to return the response in streaming mode. When true, the response is returned as server-sent event chunks. qwen-mt-flash and qwen-mt-lite return incremental output; qwen-mt-plus and qwen-mt-flash return non-incremental output (each chunk contains the full sequence so far).
Configuration for streaming output. Only takes effect when stream is true.
Maximum number of tokens to generate. If the output exceeds this limit, it is truncated. Defaults to the model's maximum output length.
Random number seed for reproducible results. Range: [0, 2^31-1].
Sampling temperature controlling output diversity. Higher values produce more diverse text. Range: [0, 2). Only set one of temperature or top_p.
Nucleus sampling probability threshold. Higher values produce more diverse text. Range: (0, 1.0]. Only set one of temperature or top_p.
Size of the candidate token set for sampling. Larger values increase randomness. If None or greater than 100, only top_p applies. Must be >= 0. Non-standard parameter: use extra_body in Python SDK.
Penalty for repeated sequences. Higher values reduce repetition. A value of 1.0 means no penalty. Must be > 0. Non-standard parameter: use extra_body in Python SDK.
Response
Unique request identifier.
Generated content from the model.
UNIX timestamp when the request was created.
The model used for the request.
Always chat.completion.
Currently fixed to null.
Currently fixed to null.
Token consumption information.