DeepSeek R1 Distill Qwen 32B
DeepSeek-R1-Distill-Qwen-32B 是以 DeepSeek-R1 範例從 Qwen2.5-32B 微調而來的稠密文字推理模型。它適用於多步驟數學、程式設計與邏輯任務,採用製造商特定的提示方式,發布設定具有 131,072 個位置。
- Ailoot Ultra · OpenAI Chat
POST /v1/chat/completionsdeepseek-ai/DeepSeek-R1-Distill-Qwen-32B - Ailoot Ultra · Anthropic Messages
POST /v1/messagesdeepseek-ai/DeepSeek-R1-Distill-Qwen-32B
關於模型
此說明介紹模型的能力。Ailoot 可用的輸入、輸出與選項,依所選方法列於下方。
DeepSeek-R1-Distill-Qwen-32B 是 DeepSeek 以 Qwen2.5-32B 為基礎建立的 32B 稠密推理檢查點。DeepSeek 使用 DeepSeek-R1 生成的推理範例微調基礎模型。成果是獨立的文字模型,適用於需要多個相連步驟的問題,例如數學推導、演算法問題或依限制條件進行推理。
此蒸餾版本與完整 R1 模型的差異
開發者發布時,將 DeepSeek-R1-Zero、DeepSeek-R1,以及以 Qwen 或 Llama 為基礎的蒸餾模型分開。完整 R1 系列透過自身訓練流程發展推理;蒸餾階段則將 R1 生成範例中的模式,轉移至獨立的稠密檢查點。此項目為以 Qwen 為基礎的 32B 蒸餾版,並非完整 R1 模型、R1-Zero,或未修改的 Qwen2.5-32B 基礎模型。
發布的 Qwen 蒸餾模型使用 800,000 筆精選樣本微調。DeepSeek 也變更其設定及 tokenizer,並指示使用者保留這些設定。訓練來源說明其推理取向,而具名檢查點及自身設定則決定實際發布版本。這不代表每次回答新問題時,都會自動諮詢更大的教師模型。
32B 檢查點的設定使用因果語言模型架構,包含 64 層、40 個查詢注意力頭及 8 個鍵/值頭。最大位置數設為 131,072。此設定數值是針對發布的模型;不應將部署指令範例或 R1 家族的另一成員,視為相同的上下文設定。模型接收文字並生成文字,而非接收影像,或產生視覺與音訊產出。
準備數學或程式碼任務
對於數學問題,請提供完整條件、定義變數,並說明定義域或假設。指出最終結果應為精確表達式、數值近似值,或某項主張的證明。實用的請求可以要求先推導,再提供最終表達式及對原始條件的檢查。開發者建議提供完整的數學解題回答,並將最終答案放入 LaTeX 方框。
對於演算法問題,請提供輸入範圍、所需輸出及解法限制。要求解題方法、實作,以及為何能保留所需性質的說明。若問題涉及現有程式碼,請提供相關函式、產生非預期行為的輸入,以及預期結果。回答可以比較實際路徑與預期路徑,並提出修正;程式的執行及驗證是應用程式的獨立步驟。
對於限制條件問題,請明確列出允許的選項及彼此關係。例如,排程請求可以提供參與者、可用時間,以及使兩項安排互不相容的規則。要求建議安排,並為每項決定列出支持規則,同時要求明確保留任何未解決條件。這讓推理任務可供檢查,而非在沒有基本限制的情況下要求模型選擇。
DeepSeek 專屬使用建議
DeepSeek 建議此系列將所有指令放在使用者提示中,避免另設 system prompt。這與依賴 system 訊息定義任務的一般聊天範本不同。請將所需答案格式、來源資料及實際問題放在一起,並清楚區隔。
建議的 temperature 範圍為 0.5 至 0.7,優先採用 0.6。開發者指出,此建議有助於避免重複或不連貫的輸出。它也指出,某些查詢可能產生空的推理區塊,並建議以開始推理標記作為輸出開頭。這些是針對發布之推理流程的建議,並不保證單一設定即可確立正確性。
實用的答案規格可以要求方法說明、有依據的重要步驟,以及獨立的最終產出。數學任務可用方框表達式呈現最終結果。程式碼任務應將程式碼與假設及範例輸入分開。邏輯任務應讓每項結論與支持它的規則或所給事實相連。這讓推理文字及應用程式所需結果各自發揮不同作用。
上下文、輸出與整合邊界
發布設定中的 131,072 最大位置數,應與完整提示及生成推理一併考量。開發者在評估中使用 32,768-token 生成設定,但此實驗設定並非此檢查點另行公布的輸出容量規格。請勿從基準測試設定推導答案上限,也不要將原始 Qwen Instruct 版本的 8,192-token 輸出數值套用至修改後的蒸餾版本。
請讓輸入聚焦於實際的數學、程式設計或邏輯問題,並說明所需的最終形式。外部計算器、儲存庫、文件剖析器或搜尋函式,都必須由周邊應用程式提供;它們不會只因選擇文字推理檢查點而自動包含在內。實用的結果是文字解法或建議實作,其假設、方法及最終答案均對應所提供的問題。
實用任務
實用任務
英文技術範例
Solve a bounded scheduling problem
Schedule three one-hour interviews in slots 09:00, 10:00 and 11:00. Ada cannot attend 09:00; Ben cannot attend 11:00; Chen must be before Ada. Each person gets one distinct slot. Give a valid schedule, explain how each constraint is satisfied and state whether another schedule is possible.預期結果
A person-to-slot table, a constraint check and a justified uniqueness or non-uniqueness conclusion.檢查結果
Check all three constraints and distinct slots directly against the proposed schedule.Ailoot Ultra · OpenAI Chat POST /v1/chat/completions deepseek-ai/DeepSeek-R1-Distill-Qwen-32B
deepseek-ai/DeepSeek-R1-Distill-Qwen-32B
deepseek-ai/DeepSeek-R1-Distill-Qwen-32B入門
DeepSeek-R1-Distill-Qwen-32B 是以 DeepSeek-R1 範例從 Qwen2.5-32B 微調而來的稠密文字推理模型。它適用於多步驟數學、程式設計與邏輯任務,採用製造商特定的提示方式,發布設定具有 131,072 個位置。
- 接受的輸入
- 文字
- 結果
- 文字
Ailoot 可用 · 輸入與方法
Ailoot Ultra · OpenAI Chat POST /v1/chat/completions
- 輸入
text- 輸出
text- 輸出格式
- json 或 SSE
| 欄位 | 類型 | 要求 | 值與限制 | 預設值 |
|---|---|---|---|---|
欄位model | 類型string | 要求必填 | 值與限制 deepseek-ai/DeepSeek-R1-Distill-Qwen-32B | 預設值— |
欄位messages | 類型message[] | 要求必填 | 值與限制 項目數下限: 1 | 預設值— |
欄位messages[].role | 類型string | 要求必填 | 值與限制 範例:system, user, assistant, tool, function 條件: 這些角色由 原始碼中的相容型別明確表示;確切角色集合仍依模型而定。 依模型而定 | 預設值— |
欄位messages[].content | 類型string|content_part[]|null | 要求選填 | 值與限制 | 預設值— |
欄位messages[].tool_calls | 類型tool_call[] | 要求選填 | 值與限制 | 預設值— |
欄位messages[].tool_call_id | 類型string | 要求選填 | 值與限制 適用條件: role=tool;使用實際回傳的 ID | 預設值— |
欄位messages[].name | 類型string | 要求選填 | 值與限制 | 預設值— |
欄位messages[].reasoning_content | 類型string | 要求選填 | 值與限制 適用條件: 此模型使用推理內容時,將實際回傳的推理內容帶回後續請求 | 預設值— |
欄位messages[].reasoning_details | 類型object|array | 要求選填 | 值與限制 依模型而定 | 預設值— |
欄位max_tokens | 類型integer | 要求選填 | 值與限制 最小值: 1 依模型而定 | 預設值— |
欄位max_completion_tokens | 類型integer | 要求選填 | 值與限制 最小值: 1 依模型而定 | 預設值— |
欄位stream | 類型boolean | 要求選填 | 值與限制 | 預設值false |
欄位stream_options.include_usage | 類型boolean | 要求選填 | 值與限制 依模型而定 | 預設值— |
欄位temperature | 類型number | 要求選填 | 值與限制 依模型而定 | 預設值— |
欄位top_p | 類型number | 要求選填 | 值與限制 依模型而定 | 預設值— |
欄位stop | 類型string|string[] | 要求選填 | 值與限制 依模型而定 | 預設值— |
欄位tools | 類型function_tool[] | 要求選填 | 值與限制 依模型而定 | 預設值— |
欄位tools[].type | 類型string | 要求選填 | 值與限制 function 依模型而定 | 預設值— |
欄位tools[].function.name | 類型string | 要求必填 | 值與限制 適用條件: 已提供函式工具 | 預設值— |
欄位tools[].function.description | 類型string | 要求選填 | 值與限制 | 預設值— |
欄位tools[].function.parameters | 類型JSON_schema | 要求選填 | 值與限制 | 預設值— |
欄位tool_choice | 類型string|object | 要求選填 | 值與限制 依模型而定 | 預設值— |
欄位parallel_tool_calls | 類型boolean | 要求選填 | 值與限制 依模型而定 | 預設值— |
欄位response_format | 類型object | 要求選填 | 值與限制 依模型而定 | 預設值— |
欄位reasoning_effort | 類型string | 要求選填 | 值與限制 依模型而定 | 預設值— |
欄位reasoning | 類型object | 要求選填 | 值與限制 依模型而定 | 預設值— |
欄位service_tier | 類型string | 要求選填 | 值與限制 依模型而定 | 預設值— |
欄位instructions | 類型string | 要求選填 | 值與限制 相容性欄位 | 預設值— |
欄位functions | 類型function[] | 要求選填 | 值與限制 依模型而定 | 預設值— |
欄位function_call | 類型string|object | 要求選填 | 值與限制 依模型而定 | 預設值— |
欄位prompt_cache_options | 類型object | 要求選填 | 值與限制 依模型而定 | 預設值— |
欄位modalities | 類型string[] | 要求選填 | 值與限制 text | 預設值— |
欄位provider | 類型object | 要求選填 | 值與限制 條件: 此 Ultra 文字路由拒絕 provider.options | 預設值— |
欄位cache_control.ttl | 類型string | 要求選填 | 值與限制 條件: 實際提示詞快取位置拒絕 1h | 預設值— |
輸入素材組合
文字 · UTF8 文字
messages[].content
方法參數與生命週期
| 參數 | 規格 |
|---|---|
參數content_type | 規格application/json |
參數required | 規格model, messages |
參數material_types | 規格text |
參數messages | 規格具有 role/content 結構的訊息陣列 |
參數file_material | 規格實際 UTF-8 文件以原文文字插入;不推定檔案 ID |
參數optional_controls | 規格stream, temperature, top_p, stop, max_tokens, max_completion_tokens, reasoning, response_format, tools, tool_choice |
參數control_scope | 規格依模型而定;使用者函式工具與託管工具不同 |
參數output_modalities | 規格text |
參數hosted_operations | 規格false |
參數multimodal_input_binding | 規格null |
生命週期: synchronous_or_streamed
將確切模型 ID 與 messages 一併送出。
上下文長度不是輸出上限。
文字檔案可提供原文文字;圖片/音訊/檔案物件輸入需要精確綁定。
方案
費率資訊不會增加請求選項。支援的參數列於所選方法中。
- 快速模式
- 未指定 選取快速模式時
- flex 模式
- 未指定 選取 flex 模式時
- 最高推理強度
- 未指定 最高推理強度採用 default 調整值時
Ailoot 費率
各設定的價格
| 設定 | 費率表 | 費用 |
|---|---|---|
| 設定詞元基本費率 | 費率表基本費率 | 費用 輸入 · 輸入 Token $0.00036 / 1K Token 輸出 · 輸出 Token $0.00036 / 1K Token 輸入 · 讀取快取 $0 / 1K Token 輸入 · 寫入快取 $0 / 1K Token 輸入 · 寫入快取,1 小時 — / 1K Token |
Ailoot 會在請求前預留估算金額。取得結果後,依實測用量結算最終費用。串流結算採用最終用量紀錄。預留金額與結算的運作方式 →
請求範例
Ailoot Ultra · OpenAI Chat
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B", "messages": [{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}]}')
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
r=json.loads(Path("result.json").read_text())
for x in r.get("choices",[]):
if x.get("message",{}).get("content"): print(x["message"]["content"])
PY_RESULT
from openai import OpenAI
import os
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
result=client.chat.completions.create(model='deepseek-ai/DeepSeek-R1-Distill-Qwen-32B',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}])
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
save_result(result.to_dict(mode="json"))
from openai import OpenAI
import os
from pathlib import Path
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
with client.chat.completions.stream(model='deepseek-ai/DeepSeek-R1-Distill-Qwen-32B',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
for event in stream:
payload=event.to_dict(mode="json")
log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
print(json.dumps(payload,ensure_ascii=False))
final=stream.get_final_completion()
save_result(final.to_dict(mode="json"),"stream-result")
接收並儲存結果
Ailoot Ultra · OpenAI Chat
json 或 SSE
保留所有已完成的結果
請保留所有完整傳回的回應、檔案與內容區塊。
保留每個候選項及其內容/工具呼叫/推理。SSE 中依候選項/工具索引組合增量,保留最終完成原因與用量。
需要檢查原始回應時
保留請求/回應 ID 與標頭。未提供通用的文字工作擷取 URL。
回應欄位
| 欄位 | 類型 |
|---|---|
欄位choices[].index | 類型integer |
欄位choices[].message.content | 類型string|null |
欄位choices[].message.tool_calls | 類型tool_call[] |
欄位choices[].message.reasoning_content | 類型string |
欄位choices[].message.reasoning_details | 類型object|array |
欄位choices[].finish_reason | 類型string|null |
欄位usage | 類型object |
錯誤與後續步驟
| 回應 | 條件 | 下一步 |
|---|---|---|
回應400 · invalid_request_error | 條件必要欄位、素材表示方式或參數值無效 | 下一步提出新的建立請求前,先修正指定欄位。 |
別名
模型別名
Ailoot Ultra deepseek-ai/DeepSeek-R1-Distill-Qwen-32B
方法路徑別名
請使用上方列出的 API 方法路徑。
相關呼叫用 ID
Ailoot Ultra · Anthropic Messages POST /v1/messages deepseek-ai/DeepSeek-R1-Distill-Qwen-32B
deepseek-ai/DeepSeek-R1-Distill-Qwen-32B
deepseek-ai/DeepSeek-R1-Distill-Qwen-32B入門
DeepSeek-R1-Distill-Qwen-32B 是以 DeepSeek-R1 範例從 Qwen2.5-32B 微調而來的稠密文字推理模型。它適用於多步驟數學、程式設計與邏輯任務,採用製造商特定的提示方式,發布設定具有 131,072 個位置。
- 接受的輸入
- 文字
- 結果
- json · sse
Ailoot 可用 · 輸入與方法
Ailoot Ultra · Anthropic Messages POST /v1/messages
- 輸入
text- 輸出
json,sse- 輸出格式
- JSON 或 SSE
| 欄位 | 類型 | 要求 | 值與限制 | 預設值 |
|---|---|---|---|---|
欄位model | 類型string | 要求必填 | 值與限制 deepseek-ai/DeepSeek-R1-Distill-Qwen-32B | 預設值— |
欄位messages | 類型message[] | 要求必填 | 值與限制 | 預設值— |
欄位messages[].role | 類型string | 要求必填 | 值與限制 user, assistant | 預設值— |
欄位messages[].content | 類型string | 要求必填 | 值與限制 | 預設值— |
欄位max_tokens | 類型integer | 要求必填 | 值與限制 | 預設值— |
欄位stream | 類型boolean | 要求選填 | 值與限制 | 預設值false |
輸入素材組合
文字 · UTF-8 文字
messages[].content 字串
方法參數與生命週期
| 參數 | 規格 |
|---|---|
參數content_type | 規格application/json |
參數required | 規格model, messages, max_tokens |
參數optional_controls | 規格stream |
參數material_types | 規格text |
參數text_file_material | 規格讀取實際 UTF-8 文件,將文字放入指定的 input 或訊息內容字串。 |
生命週期: synchronous_or_streamed
方案
費率資訊不會增加請求選項。支援的參數列於所選方法中。
- 快速模式
- 未指定 選取快速模式時
- flex 模式
- 未指定 選取 flex 模式時
- 最高推理強度
- 未指定 最高推理強度採用 default 調整值時
Ailoot 費率
各設定的價格
| 設定 | 費率表 | 費用 |
|---|---|---|
| 設定詞元基本費率 | 費率表基本費率 | 費用 輸入 · 輸入 Token $0.00036 / 1K Token 輸出 · 輸出 Token $0.00036 / 1K Token 輸入 · 讀取快取 $0 / 1K Token 輸入 · 寫入快取 $0 / 1K Token 輸入 · 寫入快取,1 小時 — / 1K Token |
Ailoot 會在請求前預留估算金額。取得結果後,依實測用量結算最終費用。串流結算採用最終用量紀錄。預留金額與結算的運作方式 →
請求範例
Ailoot Ultra · Anthropic Messages
{
"model": "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B",
"max_tokens": 128,
"messages": [
{
"role": "user",
"content": "Summarize the incident report."
}
],
"stream": false
}set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 document}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json, os
from pathlib import Path
source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
raise SystemExit('Choose a document containing text')
payload = {'model': 'deepseek-ai/DeepSeek-R1-Distill-Qwen-32B', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
Path('request.json').write_text(json.dumps(payload, ensure_ascii=False), encoding='utf-8')
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
-H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
PY_RESULT
import json, os
from pathlib import Path
source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
raise SystemExit('Choose a document containing text')
payload = {'model': 'deepseek-ai/DeepSeek-R1-Distill-Qwen-32B', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
from urllib.request import Request, urlopen
from urllib.error import HTTPError
api_key = os.environ['AILOOT_API_KEY']
if not api_key.strip():
raise SystemExit('Set AILOOT_API_KEY before making a request')
headers = {'x-api-key': 'PLACEHOLDER_KEY', 'anthropic-version': '2023-06-01', 'Content-Type': 'application/json'}
headers['x-api-key'] = api_key
request = Request('https://api.ailoot.ai/v1/messages', data=json.dumps(payload, ensure_ascii=False).encode('utf-8'), headers=headers, method='POST')
try:
with urlopen(request, timeout=120) as response:
raw = response.read()
Path('response-headers.txt').write_text(str(response.headers), encoding='utf-8')
except HTTPError as error:
Path('result.json').write_bytes(error.read())
Path('response-headers.txt').write_text(str(error.headers), encoding='utf-8')
raise
Path('result.json').write_bytes(raw)
import json
from pathlib import Path
result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
接收並儲存結果
Ailoot Ultra · Anthropic Messages
JSON 或 SSE
保留所有已完成的結果
請保留所有完整傳回的回應、檔案與內容區塊。
保留所有內容區塊、思考簽章與實際工具使用 ID。組合所有 SSE 區塊增量;第一個文字區塊不是完整輸出。
需要檢查原始回應時
保留請求/回應 ID 與標頭。未提供通用的文字工作擷取 URL。
回應欄位
| 欄位 | 類型 |
|---|---|
欄位id | 類型string |
欄位model | 類型string |
欄位content[] | 類型text|thinking|tool_use|other content block |
欄位stop_reason | 類型string|null |
欄位usage | 類型object |
錯誤與後續步驟
| 回應 | 條件 | 下一步 |
|---|---|---|
回應400 · invalid_request_error | 條件必要欄位、素材表示方式或參數值無效 | 下一步提出新的建立請求前,先修正指定欄位。 |
別名
模型別名
Ailoot Ultra deepseek-ai/DeepSeek-R1-Distill-Qwen-32B
方法路徑別名
請使用上方列出的 API 方法路徑。
相關呼叫用 ID
FAQ · deepseek-ai/DeepSeek-R1-Distill-Qwen-32B
- 可以使用哪些輸入與結果?
POST /v1/chat/completions·deepseek-ai/DeepSeek-R1-Distill-Qwen-32B:text→textPOST /v1/messages·deepseek-ai/DeepSeek-R1-Distill-Qwen-32B:text→json,sse- 請求使用哪些欄位?
POST /v1/chat/completions·deepseek-ai/DeepSeek-R1-Distill-Qwen-32B:model,messages,stream,modalities,providerPOST /v1/messages·deepseek-ai/DeepSeek-R1-Distill-Qwen-32B:model,messages,max_tokens,stream- 適用哪些限制?
POST /v1/chat/completions·deepseek-ai/DeepSeek-R1-Distill-Qwen-32B:messages.min_items:1