Skip to main content
POST
/
v1
/
prediction
/
run
Run Model Prediction Synchronously
curl --request POST \
  --url https://api.eachlabs.ai/v1/prediction/run \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "model": "eachlabs-llm-router",
  "input": {
    "model": "openai/gpt-4o-mini",
    "messages": [
      {
        "role": "user",
        "content": "Write a one sentence caption."
      }
    ]
  }
}
'
{
  "status": "success",
  "message": "Prediction completed successfully",
  "predictionID": "abc123-def456-ghi789",
  "output": {
    "text": "A cinematic sunset over the ocean."
  },
  "error": ""
}

Documentation Index

Fetch the complete documentation index at: https://docs.eachlabs.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-API-Key
string
header
required

API key for authentication

Body

application/json
model
string
required

Model slug or identifier

Example:

"flux-1-1-pro"

input
object
required

Input parameters for the prediction

Example:
{
"prompt": "A beautiful sunset over the ocean with vibrant colors",
"aspect_ratio": "16:9"
}
version
string
deprecated

Deprecated. This field is ignored. Kept for backwards compatibility.

Example:

"0.0.1"

webhook_url
string<uri>

Optional webhook URL to receive prediction result asynchronously

Example:

"https://your-app.com/webhook"

webhook_secret
string

Optional secret used to sign webhook requests

Example:

"your-secret-key"

Response

Prediction completed or failed synchronously

status
string

Final status of the synchronous prediction

Example:

"success"

message
string

Human-readable message

Example:

"Prediction completed successfully"

predictionID
string

Unique prediction identifier

Example:

"abc123-def456-ghi789"

output

Prediction output, when available

error
string

User-facing error message when the prediction failed

Example:

""

Last modified on May 28, 2026