프로젝트
GitHub에서 보기
fujc683/qwen4-max-api
소개
Qwen4 Max API: chat completions, streaming defaults and reasoning tokens.
AI 및 머신러닝측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalQwen4 Max API — endpoint, streaming, reasoning tokens
How to call Qwen4 Max on APIMart: chat completions, streaming defaults and reasoning output.
https://gola.apimart.ai/k-SBK4VP
Endpoint
OpenAI-compatible chat completions:
curl -X POST https://api.apimart.ai/v1/chat/completions \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"qwen4-max","messages":[{"role":"user","content":"explain vector databases"}]}'
Streaming
The endpoint streams by default. Parse data: lines, or pass "stream": false
for a single JSON body.
from openai import OpenAI
client = OpenAI(base_url="https://api.apimart.ai/v1", api_key=KEY)
for chunk in client.chat.completions.create(
model="qwen4-max",
messages=[{"role": "user", "content": "write a haiku"}],
stream=True):
print(chunk.choices[0].delta.content or "", end="")
Reasoning output
Qwen4 Max can emit a separate reasoning_content field alongside content.
Treat it as chain-of-thought: useful for debugging, not for showing to end users.
{"delta": {"role": "assistant", "content": "", "reasoning_content": "..."}}
usage.completion_tokens_details.reasoning_tokens tells you how many tokens were
spent thinking — that part is billed as output.
Parameters that matter
| Field | Notes |
|---|---|
messages |
standard role/content array |
stream |
true by default on this endpoint |
max_tokens |
cap output; reasoning tokens count toward it |
temperature |
0-2; lower for extraction, higher for ideation |
tools |
function calling, OpenAI schema |
Pricing
| Per 1M tokens | |
|---|---|
| Input | $1.4286 |
| Output | $4.2857 |
Gotchas
- Streaming is on unless you pass
stream: false - Reasoning tokens are billed as output — budget for 2-3x on hard tasks
- Very long prompts benefit from prompt caching; cached tokens are cheaper
Related
- All prompt collections: fujc683 repositories
License
CC BY 4.0
관련 프로젝트 살펴보기
불러오는 중…