# Replicate

Replicate: models, predictions, trainings, deployments, collections, hardware. Exposes **32 actions** covering the API surface an agent needs - read and write.

## What it can do

| Method | What it does |
| --- | --- |
| `replicate_account_get` | Get authenticated account info - GET /account. |
| `replicate_models_list` | List your models - GET /models. |
| `replicate_model_get` | Get one model - GET /models/&#123;owner&#125;/&#123;name&#125;. |
| `replicate_model_create` | Create a new model - POST /models. |
| `replicate_versions_list` | List model versions - GET /models/&#123;owner&#125;/&#123;name&#125;/versions. |
| `replicate_version_get` | Get one model version - GET /models/&#123;owner&#125;/&#123;name&#125;/versions/&#123;id&#125;. |
| `replicate_version_create` | Create a new model version - POST /models/&#123;owner&#125;/&#123;name&#125;/versions. |
| `replicate_predictions_list` | List your predictions - GET /predictions. |
| `replicate_prediction_get` | Get one prediction - GET /predictions/&#123;id&#125;. |
| `replicate_prediction_create` | Create a prediction (run a model) - POST /predictions. |
| `replicate_prediction_cancel` | Cancel a prediction - POST /predictions/&#123;id&#125;/cancel. |
| `replicate_trainings_list` | List your trainings - GET /trainings. |
| `replicate_training_get` | Get one training - GET /trainings/&#123;id&#125;. |
| `replicate_training_create` | Create a training (fine-tune a model) - POST /trainings. |
| `replicate_training_cancel` | Cancel a training - POST /trainings/&#123;id&#125;/cancel. |
| `replicate_deployments_list` | List deployments - GET /deployments. |
| `replicate_deployment_get` | Get one deployment - GET /deployments/&#123;id&#125;. |
| `replicate_deployment_create` | Create a deployment - POST /deployments. |
| `replicate_deployment_update` | Update a deployment - PATCH /deployments/&#123;id&#125;. |
| `replicate_deployment_delete` | Delete a deployment - DELETE /deployments/&#123;id&#125;. |
| `replicate_deployment_predictions_create` | Create a prediction on a deployment - POST /deployments/&#123;id&#125;/predictions. |
| `replicate_collections_list` | List collections - GET /collections. |
| `replicate_collection_get` | Get one collection - GET /collections/&#123;slug&#125;. |
| `replicate_collection_create` | Create a collection - POST /collections. |
| `replicate_collection_update` | Update a collection - PATCH /collections/&#123;slug&#125;. |
| `replicate_collection_delete` | Delete a collection - DELETE /collections/&#123;slug&#125;. |
| `replicate_collection_add_model` | Add a model to a collection - POST /collections/&#123;slug&#125;/models. |
| `replicate_hardware_list` | List available hardware - GET /hardware. |
| `replicate_webhooks_list` | List webhooks - GET /webhooks. |
| `replicate_webhook_get` | Get one webhook - GET /webhooks/&#123;id&#125;. |
| `replicate_webhook_create` | Create a webhook - POST /webhooks. |
| `replicate_webhook_delete` | Delete a webhook - DELETE /webhooks/&#123;id&#125;. |

## How to get credentials

This connector uses an **API key / token**. Create one in the provider
dashboard, then paste it into FlyMyAI:

- **`REPLICATE_API_TOKEN`** - Replicate - Account - API tokens (r8_...). (https://replicate.com/account/api-tokens)

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `REPLICATE_API_TOKEN` | Replicate - Account - API tokens (r8_...). |

## Troubleshooting

- **`401 Unauthorized` / `403 Forbidden`** - the token is wrong, expired, or missing a required scope; regenerate it.
- **`429 Too Many Requests`** - provider rate limit; retry after a short backoff.
- **Unexpected `4xx` on writes** - double-check required fields; the agent confirms before write actions.

## Links

- [Replicate API documentation](https://replicate.com/docs/reference/http)
