Skip to main content

Predictions API

client.predictions retrieves, lists, and waits on predictions. The same methods cover every content type.

Quick Examples

Get a Prediction

List Predictions

Wait for Completion

Core Operations

Retrieving Predictions

Listing Predictions

Waiting for Completion

wait() raises TimeoutError if the prediction does not finish within timeout.

Prediction Statuses

Media-Specific APIs

Image, document, audio, and video clients extend Predictions.

Image Predictions

Document, Audio, and Video Predictions

Response Structure

Auto-casting Responses

Common Patterns

Process and Wait

Batch Processing

Error Handling

Best Practices

Efficient Polling

Using Appropriate Timeouts

Progress Reporting with tqdm