Skip to main content
Model ID
Qwen/Qwen3.5-397B-A17B

API Usage

You can interact with the Qwen3.5 397B A17B model through various programming languages and methods. Below are examples showing how to use the model’s API.

API Examples

Generate a model response using the chat endpoint of Qwen3.5 397B A17B.

Shell

curl --request POST \
--url https://api.gmi-serving.com/v1/chat/completions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer *************' \
  --data '{
  "model": "Qwen/Qwen3.5-397B-A17B",
  "messages": [
  {"role": "system", "content": "You are a helpful AI assistant"},
  {"role": "user", "content": "List 3 countries and their capitals."}
  ],
  "temperature": 0,
  "max_completion_tokens": 500
}'

Python

import requests
import json

url = "https://api.gmi-serving.com/v1/chat/completions"
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer *************"
}

payload = {
    "model": "Qwen/Qwen3.5-397B-A17B",
    "messages": [
        {"role": "system", "content": "You are a helpful AI assistant"},
        {"role": "user", "content": "List 3 countries and their capitals."}
    ],
    "temperature": 0,
    "max_completion_tokens": 500
}

response = requests.post(url, headers=headers, json=payload)
print(json.dumps(response.json(), indent=2))