> ## Documentation Index
> Fetch the complete documentation index at: https://docs.portkey.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Replicate

> Use Prisma AIRS AI Gateway as a proxy to Replicate for auth management and logging.

[Replicate](https://replicate.com/) is a platform for running machine learning models in the cloud.

> [!NOTE]
>
> Replicate doesn't use a standardized JSON format for their API, so the AI Gateway acts as a proxy, managing authentication and logging all requests.

## Quick Start

```sh cURL icon="square-terminal" theme={"system"}
# 1. Add @replicate provider in model catalog
# 2. Use it:

curl https://aigw.portkey.ai/v1/predictions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $PORTKEY_API_KEY" \
  -d '{
    "version": "MODEL_VERSION_ID",
    "input": {"prompt": "Hello, world!"}
  }'
```

## Add Provider in Model Catalog

Before making requests, add Replicate to your Model Catalog:

1. Go to [**Model Catalog → Add Provider**](https://stratacloudmanager.paloaltonetworks.com/)
2. Select **Replicate**
3. Enter your [Replicate API token](https://replicate.com/account/api-tokens)
4. Name your provider (e.g., `replicate`)

> **[Complete Setup Guide](https://docs.portkey.ai/docs/aigw/product/model-catalog.md)**
>
> See all setup options and detailed configuration instructions

***

## Using Replicate with the AI Gateway

Since Replicate doesn't follow the OpenAI format, use the AI Gateway's `post()` method to interact with any Replicate endpoint:

***

## Supported Endpoints

The AI Gateway proxies all Replicate API endpoints:

* `/predictions` - Create predictions
* `/predictions/{prediction_id}` - Get prediction status
* `/predictions/{prediction_id}/cancel` - Cancel predictions
* `/models` - List models
* `/collections` - List collections

See [Replicate's API documentation](https://replicate.com/docs/reference/http) for complete endpoint details.

***

## Next Steps

> **[Observability](https://docs.portkey.ai/docs/aigw/product/observability.md)**
>
> Monitor and trace your Replicate requests

> **[Metadata](https://docs.portkey.ai/docs/aigw/product/observability/metadata.md)**
>
> Add custom metadata to requests

> **[Caching](https://docs.portkey.ai/docs/aigw/product/ai-gateway/cache-simple-and-semantic.md)**
>
> Cache Replicate responses

> **[Guardrails](https://docs.portkey.ai/docs/aigw/product/guardrails.md)**
>
> Add input/output checks


## Related topics

- [Enterprise Gateway](https://docs.portkey.ai/docs/changelog/enterprise.md)
- [Supported Providers](https://docs.portkey.ai/docs/aigw/api-reference/inference-api/supported-providers.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.