Skip to content
  • Input Modality: Image / Text / Video

  • Output Modality: Text

  • Platform Capabilities: Function Calling, Structured Output, Web Search, Prefill Continuation, Context Caching, Hybrid Reasoning

I. OpenAI Compatibility — Chat Completions

Request Protocol

https

Parameter Name Type Required Description
Content-Type string Yes application/json
Authorization string Yes Bearer ${your_ak}

Request URL

https://genaiapi.cloudsway.net/v1/chat/completions

Request Body Parameters

Parameter Name Secondary Parameters Three-level parameter Level 4 Parameters Type Required Description
model - - - string Required in Compatible mode Model name. qwen3.7-plusor qwen3.7-plus-2026-05-26.
messages - - - array Yes Dialogue context, arranged in chronological order.
role - - string Yes system / user / assistant / tool.
content - - string or array Depending on the message type Plain text is of type string; content containing images/videos or explicit caching is of type array.
- type - string In multi-modal/explicit caching scenarios, it is text / image_url / video / video_url.
- text - string When type= text, it is Enter the text.
- image_url url string When type= image_url, it is Image URL or Base64 Data URL.
- video - array When type= video, it is Videos in the form of an image list.
- video_url url string When type= video_url, it is URL of the video file, or a Base64 Data URL.
- video_url fps float No Frames extracted per second,[0.1,10], default value: 2.0.
- min_pixels - integer No Minimum pixels for images/video frames. Qwen3.7 input images: default/minimum 65536;video/image list: default 65536, minimum 4096.
- max_pixels - integer No Image/video frame maximum pixel. Qwen3.7 input image ( vl_high_resolution_images = false): default 2621440, maximum 16777216; video/image list : default 655360, maximum 2048000.
- total_pixels - integer No Video frame extraction total pixel limit. Qwen 3.7 series : default/maximum 819200000.
- cache_control type string for explicit caching type fixed ephemeral.
partial - - boolean No Assistant Message. Defaults to false. Prefix continuation. qwen3.7-plus supported.
tool_calls / tool_call_id - - - No Fields related to Function Calling.
stream - - - boolean No Defaults to false. Enables streaming output.
stream_options include_usage - - boolean No Only valid when stream= true. Defaults to false. The usage information is returned in the last chunk.
temperature - - - float No [0,2). Default: non-thinking 0.7; thinking 0.6.
top_p - - - float No (0,1.0]. Default: non-thinking 0.8; thinking 0.95.
top_k - - - integer No Default 20.
repetition_penalty - - - float No Default 1.05.
presence_penalty - - - float No [-2.0,2.0]. Default: non-thinking mode 1.5; thinking mode 0.5.
response_format type - - string Yes (if this object is passed) text/ json_object. qwen3.7-plus supports structured output.
max_tokens - - - integer No Deprecated, please use max_completion_tokens instead.
max_completion_tokens - - - integer No Maximum tokens for complete output (chain of thought + response). The maximum output on the platform model page is 131072.
vl_high_resolution_images - - - boolean No Defaults to false. For the Qwen 3.7 series, when set to true, it fixes the upper limit to 16777216.
enable_thinking - - - boolean No Whether to enable the reasoning mode. After being enabled, it will return reasoning_content.
preserve_thinking - - - boolean No Defaults to false. Historical reasoning_contentis spliced back into the input. Supported by qwen3.7-plus.
thinking_budget - - - integer No Max tokens for reasoning. The Qwen3.7 series supports a maximum reasoning chain of 262144 tokens.
tool_stream - - - boolean No Defaults to false. Only valid when stream= true. qwen3.7-plus text modality supported.
enable_code_interpreter - - - boolean No Defaults to false. Code interpreter.
seed - - - integer No random seed, default 1234.
stop - - - string or array No Stop words.
tools / tool_choice / parallel_tool_calls - - - - No Function Calling related.

Request Example (Compatible · Text)

curl -X POST "https://genaiapi.cloudsway.net/v1/chat/completions" \
  -H "Authorization: Bearer ${your_ak}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.7-plus",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Who are you?"}
    ]
  }'

Request Example (Compatible · Multimodal)

curl -X POST "https://genaiapi.cloudsway.net/v1/chat/completions" \
  -H "Authorization: Bearer ${your_ak}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.7-plus",
    "messages": [
      {
        "role": "user",
        "content": [
          {"type": "text", "text": "What is in this image?"},
          {"type": "image_url", "image_url": {"url": "https://example.com/image.jpg"}}
        ]
      }
    ],
    "enable_thinking": true
  }'

Request Example (Endpoint Mode)

curl -X POST "https://genaiapi.cloudsway.net/v1/ai/{endpoint}/chat/completions" \
  -H "Authorization: Bearer ${your_ak}" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {"role": "user", "content": "Hello"}
    ],
    "stream": false
  }'

Example of Streaming Request

curl -X POST "https://genaiapi.cloudsway.net/v1/chat/completions" \
  -H "Authorization: Bearer ${your_ak}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.7-plus",
    "messages": [
      {"role": "user", "content": "Please briefly introduce artificial intelligence."}
    ],
    "stream": true,
    "stream_options": {"include_usage": true}
  }'

II. OpenAI Compatibility — Responses API

Header

Parameter Name Type Required Description
Content-Type string Yes application/json
Authorization string Yes Bearer ${your_ak}

Request URL

https://genaiapi.cloudsway.net/v1/responses

Request Body Parameters

Parameter Name Secondary Parameters Type Required Description
model - string Required in Compatible mode qwen3.7-plus/ qwen3.7-plus-2026-05-26
input - string or array Yes Plain text or message array
role / content / type / text - when it is an array EasyInputMessage: input_text / output_text
type / image_url - when it is user input_image, URL or Base64 Data URI
instructions - string No System Instructions
previous_response_id - string No Previous response ID for multi-turn dialogue (valid for 7 days)
conversation - string No Session ID, cannot be used together with previous_response_id
stream - boolean No Defaults to false
store - boolean No Defaults to true
tools type string Yes (if tools are passed) web_search / web_extractor / function etc.
tool_choice - string/object No Default: auto
temperature - float No [0, 2)
top_p - float No (0, 1.0]
enable_thinking - boolean No Mode of thought, return the reasoning output item
reasoning effort string No none/minimal/low/medium/high/xhigh/max
max_output_tokens - integer No Maximum output tokens, minimum 16

Request Example

curl -X POST "https://genaiapi.cloudsway.net/v1/responses" \
  -H "Authorization: Bearer ${your_ak}" \
  -H "Content-Type: application/json" \
  -H "x-dashscope-session-cache: enable" \
  -d '{
    "model": "qwen3.7-plus",
    "input": "What can you do?",
    "enable_thinking": true
  }'

Example of Multi-turn Dialogue

curl -X POST "https://genaiapi.cloudsway.net/v1/responses" \
  -H "Authorization: Bearer ${your_ak}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.7-plus",
    "input": "Explain the main idea of GBDT",
    "previous_response_id": "resp_id_returned_from_first_round"
  }'

III. Anthropic Compatibility — Messages API

Header

Parameter Name Type Description
Content-Type string application/json
Authorization string Bearer ${your_ak}

Request URL

https://genaiapi.cloudsway.net/v1/messages

Request Body Parameters

Parameter Name Secondary Parameters Three-level parameter Type Required Description
model - - string Required in Compatible mode qwen3.7-plus/ qwen3.7-plus-2026-05-26
max_tokens - - integer Yes Max Tokens for Response, Upper Limit 131072
system - - string/array No System prompt, which can carry cache_control
messages role/content - array Yes user / assistant / system
type=text / text - when it is an array Text content
type=image / source url/base64/media_type/data when it is an array Image Input
type=video / source url/base64/media_type/data when it is an array Video Input
type=tool_use / tool_result - It is when FC Tool Calls and Results
stream - - boolean No Defaults to false
temperature - - number No [0, 2)
top_p - - number No Nuclear Sampling
top_k - - integer No Candidate set size
stop_sequences - - array No stop sequence
thinking type / budget_tokens - object No enabled/disabled; budget_tokens is to be deprecated
tools name/description/input_schema - array Yes (if tools are passed) Function Calling
tool_choice type / name - object No auto/any/none/tool
output_config format.type / format.schema - object No qwen3.7 series strictly structured output (json_schema)

Request Example

curl -X POST "https://genaiapi.cloudsway.net/v1/messages" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${your_ak}" \
  -d '{
    "model": "qwen3.7-plus",
    "max_tokens": 1024,
    "system": "You are a helpful assistant",
    "messages": [
      {"role": "user", "content": "Who are you?"}
    ],
    "thinking": {"type": "disabled"}
  }'

Sample Image Input

curl -X POST "https://genaiapi.cloudsway.net/v1/messages" \
  -H "Content-Type: application/json" \
  -H "Authorization: ${your_ak}" \
  -d '{
    "model": "qwen3.7-plus",
    "max_tokens": 1024,
    "messages": [{
      "role": "user",
      "content": [
        {"type": "text", "text": "Describe this image"},
        {"type": "image", "source": {"type": "url", "url": "https://example.com/a.jpg"}}
      ]
    }]
  }'