What are Predictions

What are Predictions

Understanding predictions (tasks) in WaveSpeedAI.

Overview

A prediction is a single request to generate content using an AI model. Each prediction has:

  • A unique ID for tracking
  • A status indicating progress
  • Outputs containing URLs to generated content

Prediction Lifecycle

Created → Processing → Completed (or Failed)

Status Values

StatusDescription
createdTask received and queued
processingAI model is generating content
completedGeneration successful, outputs available
failedError occurred, see error message

Creating a Prediction

Send a POST request to a model endpoint:

curl -X POST "https://api.wavespeed.ai/api/v3/wavespeed-ai/flux-dev" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "A cat in space"}'

Response:

{
  "code": 200,
  "data": {
    "id": "pred_abc123",
    "status": "created",
    "urls": {
      "get": "https://api.wavespeed.ai/api/v3/predictions/pred_abc123"
    }
  }
}

Checking Prediction Status

Poll the prediction endpoint:

curl "https://api.wavespeed.ai/api/v3/predictions/pred_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response when completed:

{
  "code": 200,
  "data": {
    "id": "pred_abc123",
    "status": "completed",
    "outputs": ["https://...generated-image.png"],
    "timings": {
      "inference": 2500
    }
  }
}

Viewing Predictions

Web Interface

View all your predictions at wavespeed.ai/predictions.

Predictions Page

API

List recent predictions:

curl "https://api.wavespeed.ai/api/v3/predictions" \
  -H "Authorization: Bearer YOUR_API_KEY"

Data Retention

  • Predictions are stored for 7 days
  • Download outputs before they expire
  • After 7 days, prediction data and outputs are deleted

Alternatives to Polling

Instead of repeatedly checking status, you can use:

  • Webhooks — Receive notifications when tasks complete
  • Streaming — Get real-time progress updates (supported by some models)

See How to Use Webhooks for details.

Next Steps

© 2025 WaveSpeedAI. All rights reserved.