cURL
curl --request GET \ --url https://api.eachlabs.ai/v1/prediction/{id} \ --header 'X-API-KEY: <api-key>'
{ "id": "abc123-def456-ghi789", "input": { "prompt": "A beautiful sunset over the ocean with vibrant colors", "aspect_ratio": "16:9" }, "status": "success", "output": "https://storage.example.com/predictions/abc123/image.jpg", "logs": null, "metrics": { "predict_time": 12.5, "cost": 0.05 }, "urls": { "cancel": "https://api.eachlabs.ai/v1/prediction/abc123-def456-ghi789/cancel", "get": "https://api.eachlabs.ai/v1/prediction/abc123-def456-ghi789" } }
Retrieve the status and results of a model prediction by its ID
curl --request GET \ --url https://api.eachlabs.ai/v1/prediction/abc123-def456-ghi789 \ --header "X-API-Key: YOUR_API_KEY"
Prediction ID
Prediction retrieved successfully
The response is of type object.
object
Was this page helpful?