Create Model Prediction
Create a new prediction for a specific model.
Using a configured model fallback
Saving or enabling a model fallback does not automatically apply it to prediction requests. To opt a prediction into an enabled fallback configuration, include fallback_selector at the top level of the request body, alongside model and input (not inside input). Its value is the saved fallback configuration's slug, not the fallback model's slug or ID. The configuration must belong to the API key's organization and the requested primary model.
For example, if you have saved an enabled configuration with the slug quality-recovery for flux-1-1-pro, send:
{
"model": "flux-1-1-pro",
"fallback_selector": "quality-recovery",
"input": {
"prompt": "A beautiful sunset over the ocean",
"aspect_ratio": "16:9"
}
}
Replace quality-recovery with your saved configuration's slug, and keep model and input set for the primary model. The saved configuration supplies the fallback models and input mappings. Omit fallback_selector to run only the primary model, even when a fallback configuration exists.
Request
- Base URL: https://api.eachlabs.ai
- URL: https://api.eachlabs.ai/v1/prediction
- Auth: HTTP bearer
Request body
Example request
{
"model": "flux-1-1-pro",
"fallback_selector": "quality-recovery",
"version": "0.0.1",
"input": {
"prompt": "A beautiful sunset over the ocean with vibrant colors",
"aspect_ratio": "16:9"
},
"webhook_url": "https://your-app.com/webhook",
"webhook_secret": "your-secret-key"
}Response
Prediction created successfully
Example response
{
"status": "success",
"message": "Prediction created successfully",
"predictionID": "abc123-def456-ghi789"
}Changes
No recorded changes to this operation across all 1 revision of this API.