Unode
User GuideAPI ReferenceHelp & SupportBusiness Cooperation

Qwen Chat

Official Documentation

Introduction

Given a list of messages comprising a conversation, the model will return a response. Qwen is a large-scale language model independently developed by the Tongyi Lab under Alibaba Group, supporting multilingual conversations, text generation, code generation, and more.

Supported Models

Currently supported models include:

ModelDescription
qwen-turboQwen Turbo chat model
qwen-plusQwen Plus chat model
qwen-maxQwen Max chat model
qwen3.5-flashQwen 3.5 Flash chat model
qwen3.5-plusQwen 3.5 Plus chat model
qwen3.6-plusQwen 3.6 Plus chat model
qwen3.7-maxQwen 3.7 Max chat model

Request Examples

Basic Text Chat

curl --location "https://www.unodetech.xyz/api/v1/services/aigc/text-generation/generation" \
  --header "Authorization: Bearer $API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "qwen-plus",
    "input": {
      "messages": [
        {
          "role": "system",
          "content": "You are a helpful assistant."
        },
        {
          "role": "user",
          "content": "Who are you?"
        }
      ]
    }
  }'

Response Example:

{
  "output": {
    "text": "",
    "finish_reason": "",
    "choices": [
      {
        "finish_reason": "stop",
        "message": {
          "content": "Hello! I'm Qwen, a large-scale language model independently developed by the Tongyi Lab under Alibaba Group. I can answer questions, create text such as stories, official documents, emails, scripts, perform logical reasoning, coding, and more. I can also express opinions and play games. I support 100 languages, including but not limited to Chinese, English, German, French, Spanish, etc., meeting international usage needs. If you have any questions or need assistance, feel free to let me know anytime!",
          "role": "assistant"
        }
      }
    ]
  },
  "usage": {
    "input_tokens": 23,
    "output_tokens": 106,
    "total_tokens": 129
  },
  "code": "",
  "message": "",
  "request_id": ""
}

Request

Endpoint

POST /api/v1/services/aigc/text-generation/generation

Create a model response for a given chat conversation.

Authentication Method

Include the following in the request headers for API key authentication:

Authorization: Bearer $API_KEY

Where $API_KEY is your API key.

Request Body Parameters

Response

Text Generation Object

Returns a text generation object.

Text Generation Object Response Example

{
  "output": {
    "text": "",
    "finish_reason": "",
    "choices": [
      {
        "finish_reason": "stop",
        "message": {
          "content": "Hello! I'm Qwen, a large-scale language model independently developed by the Tongyi Lab under Alibaba Group. I can answer questions, create text such as stories, official documents, emails, scripts, perform logical reasoning, coding, and more. I can also express opinions and play games. I support 100 languages, including but not limited to Chinese, English, German, French, Spanish, etc., meeting international usage needs. If you have any questions or need assistance, feel free to let me know anytime!",
          "role": "assistant"
        }
      }
    ]
  },
  "usage": {
    "input_tokens": 23,
    "output_tokens": 106,
    "total_tokens": 129
  },
  "code": "",
  "message": "",
  "request_id": ""
}

Last updated on