Recover an operation without repeating the provider call
GET
/t1/operations/tasks/{id}
const url = 'https://api.tansr.com/t1/operations/tasks/example';const options = {method: 'GET', headers: {'x-tansr-app-token': '<x-tansr-app-token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.tansr.com/t1/operations/tasks/example \ --header 'x-tansr-app-token: <x-tansr-app-token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Responses
Section titled “Responses”Application-private operation receipt; result may expire independently of billing and idempotency.
Media typeapplication/json
object
protocol
required
string
taskId
required
string
requestId
required
string
operation
required
string
model
required
string
pollIntervalMs
required
integer
retainedUntil
required
string
resultAvailable
required
boolean
result
meter
object
errorCode
string
Example
{ "protocol": "nonchat-operations-v1", "status": "preparing", "billing": { "state": "unreserved" }}本文是否有帮助?
感谢反馈,我们会持续改进这篇文章。