取得帳戶任務詳情
使用系統存取權杖讀取目前帳戶的資料
中國大陸用戶請注意: 中國大陸用戶請使用 https://toapis.cn 作為接口地址 (Base URL). 文檔示例中的 https://toapis.com 請替換為 https://toapis.cn.
驗證, 分頁及錯誤處理請參閱接入說明.
使用說明
分頁預設最近 24 小時, 最長 31 天, 依內部 ID 倒序. ids 批次模式不分頁, meta 不含 from/to. 僅回傳持久化中繼資料, 不含結果 URL 或提示詞; GET 不輪詢上游, 結算, 退款或傳送 Webhook. 影片轉存或結算未完成時仍為 processing, finished_at=null; 無法確認閘控時回傳 503. 帳務不明時 billing=null. pending 帳務省略金額, 確認後為 settled 或 refunded.
驗證
Authorizationstring請求頭必填使用系統存取權杖, 格式為 Bearer YOUR_SYSTEM_ACCESS_TOKEN. 此介面不接受模型 API Key, 不需要 X-User-Id.
請求參數
task_idstring路徑必填平台任務 ID, 不接受業務 ID 代替, 不允許前後空白或控制字元.
限制: minLength=1; maxLength=191.
請求示例
curl --request GET \
--url 'https://toapis.com/api/v1/account/tasks/task_example_01' \
--header 'Authorization: Bearer YOUR_SYSTEM_ACCESS_TOKEN'import requests
response = requests.get(
"https://toapis.com/api/v1/account/tasks/task_example_01",
headers={"Authorization": "Bearer YOUR_SYSTEM_ACCESS_TOKEN"},
timeout=30,
)
response.raise_for_status()
print(response.json())const url = new URL("https://toapis.com/api/v1/account/tasks/task_example_01");
const response = await fetch(url, {
headers: { Authorization: "Bearer YOUR_SYSTEM_ACCESS_TOKEN" },
signal: AbortSignal.timeout(30_000),
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}
console.log(await response.json());回應欄位
範例使用虛構資料, 並假設 credits_per_usd="100". 實際換算請以回應為準.
codeinteger業務狀態碼, 成功時為 0.
messagestring回應訊息, 成功時為空字串. 錯誤訊息依請求語言回傳.
dataobject本次查詢的結果物件.
data.idstring平台任務 ID. 任務詳情使用此值, 並非業務 ID.
data.client_business_idstring | null建立任務時儲存的客戶端業務 ID, 與平台任務 ID 不同. 無法確認或不適用時為 null.
data.api_key_idstring | null關聯模型 API Key 的 ID. 無關聯時為 null.
data.typestring任務類型. 可選值: image, video, music, other.
data.modelstring模型識別碼.
data.statusstring任務公開狀態. 影片轉存或結算未完成時仍為 processing. 可選值: pending, processing, completed, failed.
data.progressinteger任務進度百分比, 範圍為 0-100.
data.created_atstring | null建立時間. 時間格式為含時區的 RFC 3339. 無法確認或不適用時為 null.
data.finished_atstring | null可確認的任務終態時間. 處理中或尚未確認時為 null. 時間格式為含時區的 RFC 3339.
data.billingobject | null可確認的任務帳務資訊, 無法確認時為 null.
data.billing.statusstring任務帳務狀態. pending 不回傳金額; 確認後為 settled 或 refunded. 可選值: pending, settled, refunded.
data.billing.creditsstring確認後的任務帳務金額, 單位為 credits. pending 時省略. 以十進位字串回傳以保留精度.
data.billing.cost_usdstring確認後的任務帳務 USD 金額. pending 時省略. 以十進位字串回傳以保留精度.
響應示例
{
"code": 0,
"message": "",
"data": {
"id": "task_example_01",
"client_business_id": "order_example_01",
"api_key_id": "42",
"type": "video",
"model": "example-video-model",
"status": "completed",
"progress": 100,
"created_at": "2026-11-01T08:00:00Z",
"finished_at": "2026-11-01T08:01:00Z",
"billing": {
"status": "settled",
"credits": "2",
"cost_usd": "0.02"
}
}
}