curl --request POST \
--url https://api.apiyi.com/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "qwen3.8-max",
"messages": [
{
"role": "user",
"content": "Introduce yourself in one sentence."
}
]
}
'import requests
url = "https://api.apiyi.com/v1/chat/completions"
payload = {
"model": "qwen3.8-max",
"messages": [
{
"role": "user",
"content": "Introduce yourself in one sentence."
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'qwen3.8-max',
messages: [{role: 'user', content: 'Introduce yourself in one sentence.'}]
})
};
fetch('https://api.apiyi.com/v1/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.apiyi.com/v1/chat/completions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'qwen3.8-max',
'messages' => [
[
'role' => 'user',
'content' => 'Introduce yourself in one sentence.'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.apiyi.com/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"qwen3.8-max\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce yourself in one sentence.\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.apiyi.com/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"qwen3.8-max\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce yourself in one sentence.\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apiyi.com/v1/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"qwen3.8-max\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce yourself in one sentence.\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"model": "<string>",
"choices": [
{
"message": {
"role": "<string>",
"content": "<string>",
"reasoning_content": "<string>",
"tool_calls": [
{}
]
},
"finish_reason": "<string>"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"completion_tokens_details": {
"reasoning_tokens": 123
},
"prompt_tokens_details": {
"cached_tokens": 123
}
}
}Qwen3.8-Max Chat API 레퍼런스
Qwen3.8-Max Chat Completions API 레퍼런스 및 실시간 플레이그라운드: OpenAI 호환 형식에 reasoning_effort 단계, 스트리밍, 함수 호출, 이미지/동영상 입력을 지원합니다.
curl --request POST \
--url https://api.apiyi.com/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "qwen3.8-max",
"messages": [
{
"role": "user",
"content": "Introduce yourself in one sentence."
}
]
}
'import requests
url = "https://api.apiyi.com/v1/chat/completions"
payload = {
"model": "qwen3.8-max",
"messages": [
{
"role": "user",
"content": "Introduce yourself in one sentence."
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'qwen3.8-max',
messages: [{role: 'user', content: 'Introduce yourself in one sentence.'}]
})
};
fetch('https://api.apiyi.com/v1/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.apiyi.com/v1/chat/completions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'qwen3.8-max',
'messages' => [
[
'role' => 'user',
'content' => 'Introduce yourself in one sentence.'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.apiyi.com/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"qwen3.8-max\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce yourself in one sentence.\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.apiyi.com/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"qwen3.8-max\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce yourself in one sentence.\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apiyi.com/v1/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"qwen3.8-max\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce yourself in one sentence.\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"model": "<string>",
"choices": [
{
"message": {
"role": "<string>",
"content": "<string>",
"reasoning_content": "<string>",
"tool_calls": [
{}
]
},
"finish_reason": "<string>"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"completion_tokens_details": {
"reasoning_tokens": 123
},
"prompt_tokens_details": {
"cached_tokens": 123
}
}
}Bearer sk-your-api-key를 넣으십시오. 예제에는 이미 reasoning_effort: "none"이 포함되어 있으며, 전송을 눌러 응답을 확인하십시오.xhigh, 출력으로 과금됩니다). 이 예제는 디버깅을 빠르고 저렴하게 유지하기 위해 추론을 비활성화합니다. 어려운 추론의 경우 reasoning_effort 필드를 제거하고 max_tokens를 4000 이상으로 올리십시오. 전체 설명은 Qwen3.8-Max 개요를 참조하십시오.매개변수 빠른 참조
| 매개변수 | 유형 | 필수 | 참고 |
|---|---|---|---|
model | string | ✓ | 항상 qwen3.8-max입니다 |
messages | array | ✓ | 표준 OpenAI 메시지 배열입니다. content는 멀티모달 배열일 수 있습니다(image_url / video_url는 데이터 URL을 허용합니다) |
max_tokens | int | 보이는 답변에 대한 출력 예산이며, 범위는 [1, 131072]입니다. 추론 token을 제한하지 않습니다 | |
reasoning_effort | string | none / minimal / low / medium / high / xhigh / max, 기본값은 xhigh입니다 | |
stream | bool | SSE 스트리밍입니다. 이 엔드포인트는 stream_options가 없어도 최종 청크에 사용량을 반환합니다 | |
response_format | object | json_schema 구조화된 출력이며, 테스트에서 엄격하게 유지됩니다 | |
tools | array | 함수 호출 도구 목록이며, 동작이 검증되었습니다 | |
tool_choice | string/object | auto / none는 그대로 작동하며, required 또는 이름이 있는 함수에는 reasoning_effort: "none"가 필요합니다 | |
n | int | 1보다 큰 값에는 reasoning_effort: "none"가 필요합니다 | |
temperature | number | 유효 범위는 [0.0, 2.0)입니다. 2를 전달하면 400을 반환합니다 | |
stop | array | 중지 시퀀스이며, 동작이 검증되었습니다 |
세 가지 쉬운 실수
max_tokens는 추론을 제한하지 않습니다. max_tokens=1를 설정했지만 여전히 출력 token 1,054개(그중 1,045개는 추론)로 청구되었습니다. 비용을 제어하려면 reasoning_effort="none"를 사용하십시오.2. 강제 도구 호출에는 추론을 꺼야 합니다. tool_choice가 "required" 또는 이름이 지정된 함수로 설정된 경우, 추론 모드에서는 400이 반환되거나 호출이 조용히 건너뛰어집니다 — 함께 reasoning_effort="none"를 전달하십시오.3. thinking_budget는 아무 효과가 없습니다. 어떤 값이든 low 티어와 동일하게 동작합니다. 대신 reasoning_effort를 사용하십시오.응답 읽기
- 추론 흔적은
choices[0].message.reasoning_content에 있습니다(추론이 켜져 있을 때 반환됩니다) - 추론 비용은
usage.completion_tokens_details.reasoning_tokens에, 캐시 적중은usage.prompt_tokens_details.cached_tokens에 있습니다 - 일부 상위 라우트는 이 두 필드를 보고하지 않습니다(테스트에서 요청의 약 3분의 1) — 정확한 추론 비용 집계가 필요하다면 이 점을 염두에 두십시오
- 7개의 유효한
reasoning_effort값은 실제로 4개의 등급에만 매핑됩니다;max는xhigh보다 더 깊게 추론하지 않습니다 - 잘못된
reasoning_effort값은 조용히 낮은 등급으로 대체하지 않고, 전체 유효 집합을 나열하는 400 응답을 반환합니다
관련
- Qwen3.8-Max 개요 — 전체 기능 매트릭스, 가격, 모범 사례
- Qwen3.6 시리즈(레거시) — 이전 5개 모델
인증
Add Authorization: Bearer YOUR_API_KEY to the request header
본문
Always qwen3.8-max
Standard OpenAI message array
Show child attributes
Show child attributes
Output budget for the visible answer, range [1, 131072]. Note: does not bound thinking tokens
Thinking tier, default xhigh. Measured to have only four real tiers: none / minimal≡low / medium / high≡xhigh≡max
none, minimal, low, medium, high, xhigh, max Valid range [0.0, 2.0); passing 2 returns 400
Valid range (0.0, 1.0]
SSE streaming. This endpoint returns usage in the final chunk even without stream_options
Stop sequences, verified working
Structured output; json_schema held strictly in testing. Pair it with reasoning_effort: none
Function calling tool list, verified working
auto / none work as-is; required or a named function requires reasoning_effort: none
Set false to limit to a single tool call, verified working
Number of candidates. Values above 1 require reasoning_effort: none
이 페이지가 도움이 되었나요?