Consulte GET /replicate/v1/predictions/ para obter os detalhes da prediction do Replicate e o progresso em tempo real pelo ID da tarefa em fluxos de geração de imagem.
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 para ver se a prediction ainda está em execução ou já foi finalizadaoutput para URLs dos recursos geradoserror para falhas do lado do provedormetrics quando você precisar de detalhes sobre o tempo de execução ou a quantidade de imagensCrie a prediction primeiro
Faça polling pelo id da prediction
status se torne terminal e output seja preenchido ou um erro do provedor seja retornado.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>"
}