API 接入指南|文字、圖片、影片與音訊模型 - Pure Tokens
查閱 Pure Tokens 模型 API 接入方式:API Key、Base URL、模型 ID 及文字、圖片、影片、音訊和決策模型的請求範例。
選擇模型和呼叫方式
先在模型廣場選擇模型,確認模型 ID、能力和價格,再查看對應類型的請求範例。
設定 API Key 與 Base URL
從控制台建立 API Key。按指南填寫 Base URL、模型 ID 和參數;不同模型類型以頁面範例為準。
圖片、影片與音訊任務
按模型支援的方式提交生成請求;非同步媒體任務需查詢狀態並取得結果。音訊的回傳格式與檔案儲存請參照對應範例。
curl 'https://api.puretokensx.com/v1/chat/completions' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"model":"MODEL_ID_FROM_CATALOG","messages":[{"role":"user","content":"Hello"}]}'YOUR_API_KEY: use your own key. MODEL_ID_FROM_CATALOG: choose a text model supporting chat/completions from the current catalog. Image, video and audio protocols depend on the model; do not substitute this example for their contracts.
JSON: 模型廣場 / 常見問題