Truy vấn GET /replicate/v1/predictions/ để lấy chi tiết prediction của Replicate và tiến trình thời gian thực theo ID tác vụ cho quy trình tạo ảnh.
curl --request GET \
--url https://api.cometapi.com/replicate/v1/predictions/{id} \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"input": {},
"model": "<string>",
"output": [
"<string>"
],
"status": "<string>",
"created_at": "<string>",
"data_removed": true,
"logs": "<string>",
"urls": {
"get": "<string>",
"cancel": "<string>",
"stream": "<string>"
},
"error": "<string>",
"metrics": {
"image_count": 123,
"predict_time": 123
},
"version": "<string>",
"started_at": "<string>",
"completed_at": "<string>"
}status để xem prediction vẫn đang chạy hay đã hoàn tấtoutput cho các URL tài nguyên được tạo raerror cho các lỗi từ phía providermetrics khi bạn cần thời gian thực thi hoặc thông tin chi tiết về số lượng ảnhTạo prediction trước
Poll theo prediction id
status chuyển sang trạng thái kết thúc và output đã được điền hoặc có lỗi từ provider được trả về.Bearer token authentication. Use your CometAPI key.
Prediction id returned by the create endpoint.
Current prediction state.
Show child attributes
Show child attributes
curl --request GET \
--url https://api.cometapi.com/replicate/v1/predictions/{id} \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"input": {},
"model": "<string>",
"output": [
"<string>"
],
"status": "<string>",
"created_at": "<string>",
"data_removed": true,
"logs": "<string>",
"urls": {
"get": "<string>",
"cancel": "<string>",
"stream": "<string>"
},
"error": "<string>",
"metrics": {
"image_count": 123,
"predict_time": 123
},
"version": "<string>",
"started_at": "<string>",
"completed_at": "<string>"
}