Skip to main content

Predictions API

client.predictions gets, lists, and waits on predictions for every content type.

Quick Examples

Get a Prediction

List Predictions

Wait for Completion

Core Operations

Retrieving Predictions

Listing Predictions

Waiting for Completion

wait() throws TimeoutError when the prediction does not finish before the timeout.

Prediction Statuses

Feedback Operations

Get Feedbacks for a Prediction

Create Feedback

Media-Specific APIs

Image Predictions

Document, Audio, and Video Predictions

Response Structure

Common Patterns

Process and Wait

Batch Processing

Error Handling

TypeScript Interfaces

Best Practices

Efficient Polling

Using Callbacks for Long-Running Jobs