Predictions

Prediction Overview

Create, retrieve, cancel, and delete predictions via the Skytells API.

Predictions

Predictions are the core of the Skytells API. Every model request — whether generating an image, a video, or running any AI service creates a prediction. A prediction represents a single execution of a model with specific input parameters. It tracks the entire lifecycle of that execution, from creation to completion, including status, output, and metadata.

Predictions can be created, retrieved, listed, canceled, and deleted via all of our interfaces such as REST API, SDKs, and Playground Console. Each prediction has a unique ID and a rich set of fields describing its status, input, output, timing metrics, billing info, and more.


Prediction Lifecycle

StatusDescription
queuedThe prediction is waiting to be processed.
processingThe model is actively running.
succeededThe prediction completed successfully. Output is available.
failedThe prediction encountered an error. See the error field.
canceledThe prediction was canceled before completion.

Prediction Schema

Every prediction shares the same top-level structure regardless of model type. The input, output, and parts of metrics vary depending on the model you use.

Each model type requires a different request body when creating a prediction. Refer to the model-specific documentation for exact input parameters, or use the interactive API playground below.

Try Create Prediction

Open the POST /v1/predictions API playground to create a prediction with your own parameters.

The Prediction Object

Prediction Object

Image
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "succeeded",
  "stream": false,
  "type": "inference",
  "input": {
    "prompt": "A portrait of an astronaut in a garden"
  },
  "output": [
    "https://delivery.skytells.cloud/us/2026/03/04/a1b2c3d4-output.png"
  ],
  "created_at": "2026-03-04T21:20:58.000000Z",
  "started_at": "2026-03-04T21:20:58+00:00",
  "completed_at": "2026-03-04T21:21:09+00:00",
  "updated_at": "2026-03-04T21:21:09.000000Z",
  "privacy": "private",
  "source": "api",
  "model": {
    "name": "FLUX.2-pro",
    "type": "image"
  },
  "webhook": {
    "url": "https://your-server.com/webhook",
    "events": ["prediction.succeeded", "prediction.failed"]
  },
  "metrics": {
    "image_count": 1,
    "predict_time": 10.899,
    "total_time": 10.899,
    "asset_count": 1
  },
  "metadata": {
    "billing": {
      "credits_used": 0.02
    },
    "storage": {
      "files": []
    },
    "data_available": true
  },
  "urls": {
    "get": "https://api.skytells.ai/v1/predictions/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "cancel": "https://api.skytells.ai/v1/predictions/a1b2c3d4-e5f6-7890-abcd-ef1234567890/cancel",
    "stream": "https://api.skytells.ai/v1/predictions/a1b2c3d4-e5f6-7890-abcd-ef1234567890/stream",
    "delete": "https://api.skytells.ai/v1/predictions/a1b2c3d4-e5f6-7890-abcd-ef1234567890/delete"
  }
}

Top-Level Fields

FieldTypeDescription
idstringUnique UUID identifying this prediction.
statusstringCurrent lifecycle status. One of: queued, processing, succeeded, failed, canceled.
streambooleantrue if the prediction was created in streaming mode; false otherwise.
typestringAlways "inference" for model predictions.
inputobjectModel-specific input parameters. Schema varies per model — see input object.
outputstring[] | nullArray of output URLs on success; null while queued, processing, or on failure.
created_atstringISO 8601 timestamp when the prediction was created.
started_atstringISO 8601 timestamp when inference began. May equal created_at for fast-start models.
completed_atstringISO 8601 timestamp when inference finished.
updated_atstringISO 8601 timestamp of the last status change.
privacystringVisibility of the prediction: "private" or "public".
sourcestringOrigin of the request: "api" (created via API key) or "web" (created from the dashboard).
modelobjectModel identifier. See model object.
webhookobjectWebhook configuration for this prediction. See webhook object.
metricsobjectTiming and count metrics. See metrics object.
metadataobjectBilling and storage info. See metadata object.
urlsobjectPre-built action URLs for this prediction. See urls object.
errorstring | nullPresent and non-null only when status is "failed". Contains the inference error message.

model object

OBJECT The model object identifies which model processed the prediction.

model

Image
{
  "name": "FLUX.2-pro",
  "type": "image"
}
FieldTypeDescription
namestringThe model's namespace slug (e.g. "FLUX.2-pro", "beatfusion-2.0", "truefusion-x").
typestringModel category: "image", "audio", or "video".

webhook object

OBJECTThe webhook object reflects the configuration you supply when creating a prediction via POST /v1/predictions. If you include a webhook URL and events array in your create request, they appear here. Both fields are empty/null when no webhook was registered.

webhook

With webhook
{
  "url": "https://your-server.com/webhook",
  "events": ["prediction.succeeded", "prediction.failed"]
}
FieldTypeDescription
urlstring | nullThe endpoint that receives POST notifications, or null if not set.
eventsstring[]Subscribed event types. Empty array [] if no webhook was registered. Possible values: "prediction.succeeded", "prediction.failed", "prediction.canceled".

metrics object

Timing fields (predict_time, total_time) are always present. Additional fields depend on the model type.

metrics

Image
{
  "image_count": 1,
  "predict_time": 10.899,
  "total_time": 10.899,
  "asset_count": 1
}
FieldTypeModelsDescription
predict_timenumberAllSeconds spent on model inference, excluding queue wait time.
total_timenumberAllTotal wall-clock seconds from creation to completion, including queue and setup.
image_countnumberImage onlyNumber of images generated in this prediction.
asset_countnumberImage, VideoTotal number of output assets produced.
progressnumberVideo onlyCompletion percentage (0–100) reported by the model during generation.

metadata object

OBJECT The metadata object contains billing consumption and output file storage details.

metadata

With files
{
  "billing": {
    "credits_used": 0.75
  },
  "storage": {
    "files": [
      {
        "name": "output.mp3",
        "type": "audio/mpeg",
        "size": 2124868,
        "url": "https://delivery.skytells.cloud/us/2026/03/06/b2c3d4e5-output.mp3"
      }
    ]
  },
  "data_available": true
}
FieldTypeDescription
billing.credits_usednumberCredits deducted for this prediction. Amount varies by model and output complexity.
storage.filesobject[]Stored output files while data_available is true. Each entry contains name (filename), type (MIME type), size (bytes), and url (download URL). Returns an empty array [] once the retention window expires or if storage was skipped.
data_availablebooleantrue while outputs are accessible. Becomes false once the 5-minute retention window has passed and outputs are purged from Skytells storage.

urls object

OBJECT The urls object provides pre-built endpoints for every action on this specific prediction. Use these instead of constructing URLs manually.

urls

{
  "get": "https://api.skytells.ai/v1/predictions/{id}",
  "cancel": "https://api.skytells.ai/v1/predictions/{id}/cancel",
  "stream": "https://api.skytells.ai/v1/predictions/{id}/stream",
  "delete": "https://api.skytells.ai/v1/predictions/{id}/delete"
}
FieldHTTP MethodDescription
getGETRetrieve the latest state of this prediction, including output when complete.
cancelPOSTCancel the prediction. Only valid when status is "queued" or "processing".
streamGETOpen a Server-Sent Events (SSE) stream for real-time incremental output. Only available when stream: true was set at creation time.
deleteDELETEPermanently delete this prediction and its associated outputs. Irreversible.

input object

The input schema is model-specific. Each model type expects different parameters — always check the model's documentation or fetch the schema dynamically.

input

Image (text-to-image)
{
  "prompt": "A portrait of an astronaut in a garden"
}

output object

OBJECT The output field is always an array of CDN URLs pointing to the generated files. All outputs are delivered through the Skytells CDN. It is null while the prediction is queued, processing, failed, or canceled.

output

Image
[
  "https://delivery.skytells.cloud/us/2026/03/04/a1b2c3d4-output.png"
]
Model typeOutput formatNotes
image.png, .jpg, .webpMultiple images possible when the model supports batch generation.
audio.mp3Full audio file for the completed generation.
video.mp4Single video file. Duration determined by input.seconds.

Learn more about output retention and best practices in the Data Retention and Data Governance sections.

How is this guide?

On this page