Use this endpoint to query the status and results of any task created through Market model APIs. This is a unified query interface that works with all models under the Market category.
This endpoint works with all Market models including Seedream, Grok Imagine, Kling, Claude, and any future models added to the Market.
market/common/get-task-detail.json get /api/v1/jobs/recordInfo
Copy
openapi: 3.0.0info: title: Kie.ai Common API description: Kie.ai Common API Documentation - Task Status Query version: 1.0.0 contact: name: Technical Support email: [email protected]servers: - url: https://api.kie.ai description: API Serversecurity: - BearerAuth: []paths: /api/v1/jobs/recordInfo: get: summary: Get Task Details description: >- Query the status and results of any task created in the Market models. This is a unified query interface that works with all models under the Market category. ### Supported Models This endpoint works with all Market models including: - **Seedream**: seedream, seedream-v4-text-to-image, etc. - **Grok Imagine**: text-to-image, image-to-video, text-to-video, upscale - **Kling**: text-to-video, image-to-video models - **ElevenLabs**: Audio processing models - **Claude**: Language models - **And any future models added to the Market** ### Task States - **waiting**: Task is queued and waiting to be processed - **queuing**: Task is in the processing queue - **generating**: Task is currently being processed - **success**: Task completed successfully - **fail**: Task failed ### Best Practices - **Use callbacks for production**: Include `callBackUrl` when creating tasks to avoid polling - **Implement exponential backoff**: Start with 2-3 second intervals, increase gradually - **Handle timeouts**: Stop polling after 10-15 minutes - **Download results immediately**: Generated content URLs typically expire after 24 hours operationId: get-task-details parameters: - name: taskId in: query description: The unique task identifier returned when you created the task. required: true schema: type: string example: task_12345678 responses: '200': description: Request successful content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: type: object description: The task data object containing all task information properties: taskId: type: string description: The unique identifier for this task example: task_12345678 model: type: string description: >- The model used for this task (e.g., grok-imagine/text-to-image, seedream-4.0, kling-1.0) example: grok-imagine/text-to-image state: type: string description: Current state of the task enum: - waiting - queuing - generating - success - fail example: success param: type: string description: >- JSON string containing the original request parameters used to create the task example: >- {"model":"grok-imagine/text-to-image","callBackUrl":"https://your-domain.com/api/callback","input":{"prompt":"Cinematic portrait...","aspect_ratio":"3:2"}} resultJson: type: string description: >- JSON string containing the generated content URLs. Only present when state is success. Structure depends on outputMediaType: {resultUrls: []} for image/media/video, {resultObject: {}} for text example: >- {"resultUrls":["https://example.com/generated-content.jpg"]} failCode: type: string description: >- Error code if the task failed. Empty string if successful example: '' failMsg: type: string description: >- Error message if the task failed. Empty string if successful example: '' costTime: type: integer format: int64 description: >- Processing time in milliseconds (available when successful) example: 15000 completeTime: type: integer format: int64 description: >- Completion timestamp (Unix timestamp in milliseconds) example: 1698765432000 createTime: type: integer format: int64 description: >- Creation timestamp (Unix timestamp in milliseconds) example: 1698765400000 updateTime: type: integer format: int64 description: Update timestamp (Unix timestamp in milliseconds) example: 1698765432000 example: code: 200 msg: success data: taskId: task_12345678 model: grok-imagine/text-to-image state: success param: >- {"model":"grok-imagine/text-to-image","callBackUrl":"https://your-domain.com/api/callback","input":{"prompt":"Cinematic portrait...","aspect_ratio":"3:2"}} resultJson: '{"resultUrls":["https://example.com/generated-content.jpg"]}' failCode: '' failMsg: '' costTime: 15000 completeTime: 1698765432000 createTime: 1698765400000 updateTime: 1698765432000 '400': description: Bad Request - Missing or invalid taskId parameter content: application/json: schema: $ref: '#/components/schemas/ApiResponse' example: code: 400 msg: taskId parameter is required '401': description: Unauthorized - Invalid or missing API key content: application/json: schema: $ref: '#/components/schemas/ApiResponse' example: code: 401 msg: Unauthorized '404': description: Task Not Found - The specified taskId does not exist content: application/json: schema: $ref: '#/components/schemas/ApiResponse' example: code: 404 msg: Task not found '429': description: Rate Limited - Too many requests content: application/json: schema: $ref: '#/components/schemas/ApiResponse' example: code: 429 msg: Rate limit exceeded '500': $ref: '#/components/responses/Error'components: schemas: ApiResponse: type: object properties: code: type: integer enum: - 200 - 401 - 402 - 404 - 422 - 429 - 455 - 500 - 501 - 505 description: >- Response status code - **200**: Success - Request has been processed successfully - **401**: Unauthorized - Authentication credentials are missing or invalid - **402**: Insufficient Credits - Account does not have enough credits to perform the operation - **404**: Not Found - The requested resource or endpoint does not exist - **422**: Validation Error - The request parameters failed validation checks - **429**: Rate Limited - Request limit has been exceeded for this resource - **455**: Service Unavailable - System is currently undergoing maintenance - **500**: Server Error - An unexpected error occurred while processing the request - **501**: Generation Failed - Content generation task failed - **505**: Feature Disabled - The requested feature is currently disabled msg: type: string description: Response message, error description when failed example: success responses: Error: description: Server Error securitySchemes: BearerAuth: type: http scheme: bearer bearerFormat: API Key description: >- All APIs require authentication via Bearer Token. Get API Key: 1. Visit [API Key Management Page](https://kie.ai/api-key) to get your API Key Usage: Add to request header: Authorization: Bearer YOUR_API_KEY Note: - Keep your API Key secure and do not share it with others - If you suspect your API Key has been compromised, reset it immediately in the management page
To find navigation and other pages in this documentation, fetch the llms.txt file at: https://docs.kie.ai/llms.txt