AI Model APIsGeneration Tasks
Query async generation task
Query the status and results of an async generation task.
Authorization
BearerAuth
AuthorizationBearer <token>
Use Bearer Token authentication.
Format: Authorization: Bearer sk-xxxxxx
In: header
Path Parameters
task_id*string
The unique public task ID.
curl -X GET "https://us-api.tokenhub.com/generation/tasks/string"{
"code": "success",
"message": "string",
"data": {
"task_id": "task_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"media_type": "image",
"model": "gpt-image-2",
"status": "succeeded",
"progress": "100%",
"result_urls": [
"https://example.com/result-1.png",
"https://example.com/result-2.png"
],
"error": "string",
"created_at": 1780000000,
"updated_at": 1780000030,
"submit_time": 1780000000,
"start_time": 1780000005,
"finish_time": 1780000030
}
}Response Body
application/json
Last updated on