AI & Machine Learningreplicate.com ↗
Replicate API for AI Agents
Run open-source ML models via API
Replicate lets you run open-source machine learning models through a simple API. AI agents can use Replicate to generate images, transcribe audio, process video, and run any model from the Replicate catalog.
What AI agents can do with Replicate
Structured actions an AI agent can execute through the Replicate API
Action
Description
Inputs
Outputs
createPrediction
Run a model prediction
model, input, webhook
prediction_id, status, output
getPrediction
Check prediction status
prediction_id
status, output, metrics
listModels
Browse available models
query, cursor
models[], next_cursor
Use cases for Replicate + AI agents
- Image generation with Stable Diffusion and FLUX
- Audio transcription with Whisper
- Video processing and generation
- Running custom fine-tuned models
- Multi-model AI pipelines
How to connect Replicate to an AI agent
- 1Get your Replicate API token
- 2Generate an AgentSpec for model prediction actions
- 3Define actions for each model you want agents to use
- 4Publish for discovery
- 5Handle async predictions with polling or webhooks
Best practices
✓Use webhooks for long-running predictions instead of polling
✓Include model version in predictions for reproducibility
✓Cache model outputs when inputs are identical
✓Add reasoning docs about which model to use for which task
✓Handle cold start latency in your agent workflow
Frequently asked questions
What models can AI agents run on Replicate?+
Any model in the Replicate catalog — image generators (FLUX, SDXL), language models (Llama, Mistral), audio models (Whisper), and thousands more. Agents can select models based on task requirements.
How do agents handle async predictions?+
Create a prediction, then poll with getPrediction until status is "succeeded". For better performance, use webhooks to get notified when predictions complete.
Is Replicate cost-effective for AI agents?+
You pay per second of compute, with no minimum. Cold starts are free. This makes it efficient for agents that need occasional access to powerful models without maintaining infrastructure.
More AI & Machine Learning APIs
Learn more
Make Replicate agent-native with Elba
Generate an AgentSpec for your Replicate integration in seconds. Free to use.