Skip to main content
POST
/
v1
/
prediction
/
Create Model Prediction
curl --request POST \
  --url https://api.eachlabs.ai/v1/prediction/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "model": "<string>",
  "version": "<string>",
  "input": {},
  "webhook_url": "<string>",
  "webhook_secret": "<string>"
}'
{
  "status": "success",
  "message": "Prediction created successfully",
  "predictionID": "abc123-def456-ghi789"
}

Authentication

Every request must include your X-API-KEY header:
curl --request POST \
  --url https://api.eachlabs.ai/v1/prediction/ \
  --header "X-API-Key: YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "flux-1-1-pro",
    "version": "1.0.0",
    "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"
  }'

Authorizations

X-API-KEY
string
header
required

Body

application/json

Create Model Prediction Request

model
string
required
version
string
required
input
object
required
webhook_url
string
webhook_secret
string

Response

Prediction created successfully

status
string
message
string
predictionID
string