Content पर जाएं

Task cost प्राप्त करें

GET/v1/tasks/{task_id}/cost

हाल के SandBase task का asynchronous settlement status, अंतिम cost और token usage प्राप्त करें।

Path parameters

stringtask_idज़रूरी

किसी billable operation द्वारा लौटाया गया opaque task ID, जिसमें मौजूद होने पर x-task-id response header भी शामिल है।

Response

booleansettledज़रूरी

अंतिम cost settlement पूरा हुआ है या नहीं। जब तक यह true न हो, cost अंतिम नहीं है।

stringcost · estimated_costज़रूरी

छह दशमलव स्थानों वाली USD राशियाँ। estimated_cost, settlement से पहले का best-effort संदर्भ है।

objectusageज़रूरी

Task के लिए दर्ज token counts।

वैकल्पिक<object>pricing

Settlement के बाद, जब discount दर्ज हुआ हो: original_cost, discount_amount, discount_percent, और वैकल्पिक discount_type। original_cost में से discount_amount घटाने पर cost मिलता है।