> ## 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.
</Note>

## Quick Start

<CodeGroup>
  ```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!"}
    }'
  ```
</CodeGroup>

## 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`)

<Card title="Complete Setup Guide" icon="book" href="/docs/aigw/product/model-catalog">
  See all setup options and detailed configuration instructions
</Card>

***

## 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

<CardGroup cols={2}>
  <Card title="Observability" icon="chart-line" href="/docs/aigw/product/observability">
    Monitor and trace your Replicate requests
  </Card>

  <Card title="Metadata" icon="tag" href="/docs/aigw/product/observability/metadata">
    Add custom metadata to requests
  </Card>

  <Card title="Caching" icon="database" href="/docs/aigw/product/ai-gateway/cache-simple-and-semantic">
    Cache Replicate responses
  </Card>

  <Card title="Guardrails" icon="shield-check" href="/docs/aigw/product/guardrails">
    Add input/output checks
  </Card>
</CardGroup>


## Related topics

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