Worlds
取得 World 狀態
檢索 World Labs Marble 世界生成任務的狀態與結果
輪詢此端點以檢查 World Labs Marble 生成任務的狀態。如果建立任務的回應中包含 poll_url,請優先呼叫該特定 URL。
過期或不可用的公開任務可能會回傳 404 async_task_not_found。如果目前的 API key 無法確認任務的所有權,回應將為 403 task_not_owned。
路徑參數 (Path Parameters)
idstringpath必填
世界生成任務 ID。
回應 (Response)
在成功的狀態回應中,僅 id 和 status 為必填欄位。任務別名、操作 ID、世界資產、說明文字、成本以及 error 字串將在可用時回傳。任務完成並不保證所有資產 URL 都會存在。
idstring
公開任務 ID。
task_idstring
非同步任務識別碼別名。
operation_idstring
World Labs 操作 ID。
statusstring
任務狀態:pending、processing、completed、failed 或 timeout。
world_idstring
任務完成時的 World Labs 世界 ID。
world_marble_urlstring
任務完成時生成的 Marble 世界 URL。
model_urlstring
主要生成世界/模型 URL 的別名。
glb_urlstring
碰撞網格 (Collider mesh) GLB URL(若可用)。
pano_urlstring
全景影像 URL(若可用)。
thumbnail_urlstring
縮圖影像 URL(若可用)。
captionstring
生成世界的說明文字。
costobject
生成成本詳情(若可用),包含 total_credits。請查看您的使用記錄以獲取計費金額。
errorstring
任務失敗時的錯誤訊息。
請求
curl --fail-with-body "https://api.tokenlab.sh/v1/worlds/generations/ldtask_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-H "Authorization: Bearer sk-your-api-key"{ "id": "string", "task_id": "string", "operation_id": "string", "status": "pending", "world_id": "string", "world_marble_url": "string", "model_url": "string", "glb_url": "string", "pano_url": "string", "thumbnail_url": "string", "caption": "string", "cost": {}, "error": "string", "error_details": { "projection_version": 0, "status": 400, "message": "string", "type": "string", "code": "string", "param": "string", "retryable": true, "upstream": { "source": "string", "code": "string", "message": "string", "param": "string" } }}授權
BearerAuth AuthorizationBearer <token>
API Key 驗證。請在 Dashboard > API > API Keys 建立或管理 API 金鑰。
位置: header
路徑參數
id*string
世界生成任務 ID。
回應
application/json
application/json
application/json