Module api_definitions

Source
Expand description

This module contains the definition of the API responses by the Replicate API. The responses the documented in the HTTP API reference.

The API responses are defined as structs that implement the serde::Deserialize trait.

Structs§

CreatePrediction
POST https://api.replicate.com/v1/predictions
CreateTraining
POST https://api.replicate.com/v1/models/{model_owner}/{model_name}/versions/{version_id}/trainings
GetCollectionModels
GET https://api.replicate.com/v1/collections/{collection_slug}
GetModel
GET https://api.replicate.com/v1/models/{model_owner}/{model_name}
GetModelVersion
GET https://api.replicate.com/v1/models/{model_owner}/{model_name}/versions/{version_id}
GetPrediction
POST https://api.replicate.com/v1/predictions
GetTraining
GET https://api.replicate.com/v1/trainings/{training_id}
ListCollectionModels
GET https://api.replicate.com/v1/collections
ListCollectionModelsItem
Each item of the list of collections
ListModelVersions
GET https://api.replicate.com/v1/models/{model_owner}/{model_name}/versions
ListPredictions
GET https://api.replicate.com/v1/predictions
ListTraining
GET https://api.replicate.com/v1/trainings
ListTrainingItem
Each item of the list of trainings
PredictionsListItem
Represents a prediction in the list of predictions
PredictionsUrls
Prediction urls to iether cancel or get the prediction

Enums§

PredictionSource
Source of the prediction, either from the API or from the web
PredictionStatus
Status of the prediction, either starting, processing, succeeded, failed or canceled
WebhookEvents
Events of the webhook, either start, output, logs or completed

Functions§

object_empty_as_none
If the object is empty, return None