Replicate
Find Replicate models and start, inspect, list, or cancel asynchronous predictions from a Swarmz project
Connect Replicate when a project needs a hosted image, video, audio, or text model from the Replicate catalog. The connector starts asynchronous predictions and returns their provider IDs, so generated apps can poll without holding a gateway request open.
Replicate uses a shared project connection. Provider usage and billing belong to the connected account.
Availability
A Swarmz administrator must show Replicate under Platform config > Integrations. Replicate does not require a Swarmz OAuth application. A workspace member supplies an API token.
Connect Replicate
- In Replicate, create an API token for the account that will pay for predictions. Replicate documents API-token security.
- In the Swarmz project, open Settings > Integrations and select Replicate.
- Select Add connection, paste the token into API key, and select Save connection.
Swarmz checks the account endpoint, encrypts the token, and keeps it behind the connector gateway.
Available operations
| Operation | What it does | Limit per minute |
|---|---|---|
search_models | Searches public models and their documentation | 30 |
create_prediction | Starts one asynchronous prediction for a named owner and model | 10 |
get_prediction | Reads one prediction's status, output, or error | 30 |
list_predictions | Lists recent predictions with cursor pagination | 20 |
cancel_prediction | Cancels one active prediction | 10 |
Model inputs differ. Search or inspect the chosen model first, then send only fields its schema supports. Outputs can include temporary provider URLs; copy durable assets into project storage when the app must retain them.
Ask the AI to use Replicate
- “Find a public background-removal model, show me its input contract, then build an upload flow around it.”
- “Start a prediction with owner
…and model…, poll its ID, and save the completed image to project storage.” - “Build a recent-jobs screen with status, output, error, and a cancel action for active predictions.”
Starting and cancelling predictions require allow-once approval. Searching, listing, and polling are reads.
Verify Replicate
- Search for a known model and confirm its owner and name.
- Start a low-cost prediction with a unique test input.
- Poll the returned prediction ID until it succeeds or fails.
- Compare the result and run in the Replicate dashboard.
- Start a disposable long-running prediction and verify cancellation if the selected model permits it.
Troubleshoot and recover
If creation fails, verify the exact owner, model name, and current input schema. If a prediction remains queued, inspect account billing and model availability before retrying; repeated creates produce separate billable predictions.
To rotate the token, replace it in the Swarmz connection and verify list_predictions before revoking the old token. To remove access, select Remove in Swarmz and revoke the token in Replicate.