canonical: https://jentic.com/apis/replicate.com/replicate

# Replicate API

Jentic publishes the only available OpenAPI specification for Replicate API, keeping it validated and agent-ready. Run open-source ML models in the cloud without managing infrastructure across 20 endpoints covering predictions, model versioning, training, deployments, and collections. Supports thousands of community-contributed models for image generation, language processing, audio synthesis, and video creation with automatic GPU scaling and pay-per-second billing.

## For AI agents

Run predictions on thousands of open-source ML models, train custom versions, and deploy dedicated infrastructure. Supports image, text, audio, and video models with automatic scaling.

## Scope

Does not handle model training data storage, vector databases, or real-time streaming inference - use for batch predictions, model versioning, and deployment management only.

## Capabilities

- Run predictions on any public or private model with automatic GPU provisioning
- Train custom model versions on your own datasets with configurable hardware
- Deploy models to dedicated always-on infrastructure for low-latency production traffic
- Browse curated model collections organized by task like text-to-image or speech synthesis
- Version and publish models with semantic versioning and hardware requirements
- Cancel in-progress predictions and training runs to manage compute costs
- Query available hardware options for GPU selection during model deployment

## Use cases

### AI Agent Model Inference via Jentic

AI agents discover and invoke ML models on Replicate through Jentic's intent-based search. Agents specify what they need (e.g., 'generate an image from text') and Jentic returns matching Replicate operations with input schemas for the specific model version. No SDK setup or model hosting required - agents call POST /v1/predictions with a model version ID and inputs, then poll for results.

Example prompt: Search Jentic for 'run an image generation model', load the POST /v1/predictions schema, and execute with version ID for stable-diffusion and a text prompt input

### On-Demand Image Generation

Generate images from text prompts by running predictions against community models like Stable Diffusion, FLUX, and SDXL. Create a prediction via POST /v1/predictions with the model version and prompt, then poll until the output URL is available. Replicate handles GPU provisioning, scaling to zero when idle, and pay-per-second billing so you only pay for actual compute time.

Example prompt: Create a prediction on POST /v1/predictions with a Stable Diffusion XL version ID, input prompt 'a mountain landscape at sunset', and poll GET /v1/predictions/{prediction_id} until status is 'succeeded'

### Custom Model Training

Fine-tune open-source models on custom datasets using Replicate's training endpoints. Create a training run via POST /v1/models/{model_owner}/{model_name}/versions/{version_id}/trainings with your training data and hyperparameters. Monitor progress via GET /v1/trainings/{training_id}. The resulting model version can be used for predictions immediately or deployed to dedicated hardware.

Example prompt: Create a training run via POST /v1/models/stability-ai/sdxl/versions/{version_id}/trainings with a dataset URL and 2000 training steps, then poll for completion

### Production Model Deployment

Deploy models to dedicated always-on infrastructure for consistent low-latency responses via POST /v1/deployments. Unlike on-demand predictions that cold-start from zero, deployments keep models warm on reserved GPUs. Run predictions against deployments via POST /v1/deployments/{deployment_owner}/{deployment_name}/predictions for predictable latency in production applications.

Example prompt: Create a deployment via POST /v1/deployments for a text generation model with min_instances=1, then run a prediction via POST /v1/deployments/{owner}/{name}/predictions

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /v1/predictions | Run a prediction on a model version |
| GET | /v1/predictions/{prediction_id} | Get prediction status and output |
| POST | /v1/predictions/{prediction_id}/cancel | Cancel a running prediction |
| GET | /v1/models | List available models |
| GET | /v1/models/{model_owner}/{model_name}/versions | List versions of a model |
| POST | /v1/deployments | Create a dedicated model deployment |
| GET | /v1/collections/{collection_slug} | Get models in a curated collection |
| GET | /v1/hardware | List available hardware options |

## Key resources

- **Predictions** — Run, monitor, and cancel inference jobs on any model version
- **Models** — Browse, list versions, and inspect model metadata and inputs
- **Trainings** — Fine-tune models on custom datasets with configurable hardware
- **Deployments** — Dedicated always-on infrastructure for production model serving
- **Collections** — Curated groups of models organized by task category
- **Hardware** — Available GPU options for training and deployment

## Why Jentic

- **Setup:** Wiring Replicate by hand means setting its bearer auth on every call, polling prediction ids until a model run finishes, and tracking model owner and version yourself. Through Jentic you install once, import the Replicate API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Replicate puts the prediction id in the URL path (/v1/predictions/{prediction_id}), so a rule can pin your agent to the predictions it creates: it can create and read those runs. You choose the operations it may call, so a destructive one like prediction cancel is not included unless you add it.
- **Credential handling:** Your Replicate token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'run an image generation model' or 'check a prediction status', and Jentic returns the matching Replicate operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Hugging Face API** — Model hub with inference API and broader ecosystem of datasets and spaces
- **Stability AI API** — Official Stable Diffusion API with direct vendor support and optimizations
- **OpenAI API** — Proprietary LLMs and DALL-E for tasks not covered by open-source models
- **Pinecone API** — Vector database for storing embeddings generated by Replicate models

## FAQ

### Why is there no official OpenAPI spec for Replicate API?

Replicate does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Replicate API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Replicate API use?

The Replicate API uses Bearer token authentication. Pass your API token in the Authorization header as 'Bearer r8_...'. Through Jentic, your Replicate token is stored encrypted in your Jentic One instance and agents receive scoped access without the raw token entering their context.

### Can I run any open-source model on Replicate?

Yes. Replicate hosts thousands of community-contributed models accessible via POST /v1/predictions. Specify the model version ID and input parameters. Popular models include Stable Diffusion XL, FLUX, LLaMA, and Whisper. You can also push your own models using Cog packaging and run them through the same predictions API.

### What are the rate limits for the Replicate API?

Replicate does not enforce strict per-minute rate limits. Instead, concurrency is limited by your plan: free accounts get 1 concurrent prediction, paid accounts scale based on GPU availability. The API returns 429 status codes if you exceed concurrent prediction limits. Deployment endpoints have separate concurrency based on configured instances.

### How do I run a prediction on Replicate through Jentic?

Search Jentic for 'run a model prediction on Replicate' to discover the POST /v1/predictions operation. The schema requires a version ID (model version hash) and an input object matching the model's schema. Execute through Jentic's SDK (pip install jentic) and poll the returned prediction URL until status shows 'succeeded'. The output field contains your results.

### What is the difference between predictions and deployments?

POST /v1/predictions runs inference on shared, auto-scaling infrastructure that cold-starts from zero - ideal for variable traffic and cost efficiency. POST /v1/deployments creates dedicated always-on GPU instances that stay warm - ideal for production workloads needing consistent sub-second latency. Deployments cost more but eliminate cold-start delays.

### Can I limit what my agent is allowed to do with the Replicate API?

Yes. Jentic One runs self-hosted, so your own rules decide which Replicate operations and credentials your agent may use. Because Replicate puts the prediction id in the URL path (/v1/predictions/{prediction_id}), you can pin an agent to only creating predictions and reading their status, while leaving a destructive operation like prediction cancel out unless you add it. You choose the exact set of endpoints the agent can call, so it never reaches training or deployment operations you have not granted.
