Wykonaj zapytanie GET /replicate/v1/predictions/, aby pobrać szczegóły predykcji Replicate oraz postęp w czasie rzeczywistym według ID zadania dla workflow generowania obrazów.
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, aby zobaczyć, czy predykcja nadal trwa, czy już się zakończyłaoutput dla URL-i wygenerowanych zasobówerror dla błędów po stronie dostawcymetrics, gdy potrzebujesz informacji o czasie wykonania lub liczbie obrazówNajpierw utwórz predykcję
Odpytuj po id predykcji
status osiągnie stan terminalny, a output zostanie uzupełnione lub zostanie zwrócony błąd dostawcy.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>"
}