← All integrations

AI & Models · Integration

Embed a Replicate integration in your product

Add Replicate to your product for your customers, and give your AI agents governed access to it.

Replicate runs models as versions, and what you create against a version is a prediction. That prediction is asynchronous by design, and everything else follows from it: you create the prediction, get an identifier back, and then either poll it or let a webhook tell you it finished, because a heavy image or video model can run far longer than any request in your product should stay open. Version pinning matters too, since a version is immutable with a fixed input schema, so a model author publishing something new does not change what your existing calls do until you move to it. Outputs arrive as files to fetch rather than inline data. Tokens are held per customer by fastn, which also keeps the prediction endpoints current.

In your product

Embedded for your customers. Per-tenant auth, customized per customer, monitored by fastn.

  • Let each customer connect their own Replicate account so generation costs sit on their token instead of yours.
  • Create a prediction and hand control straight back to the user, finishing the work when the webhook lands.
  • Pin the model version your product calls, so a newly published version cannot quietly change your output overnight.
  • Fetch and store the output files a prediction produces, rather than expecting a result inside the response body.

For your AI agents

Governed, audited access for the agents you build, through the MCP server.

  • An agent starts a prediction, reports the identifier, then answers once the result is ready.
  • An agent reads a version's input schema before assembling the arguments for a run.
  • An agent lists a customer's recent predictions with their state and how long each one took.

Example prompt

Is this prediction still running, and which model version did I start it on?

Set up Replicate in 4 steps

  1. 01Enable the Replicate connector from your fastn dashboard.
  2. 02Have each customer authorise their own Replicate account, so calls run under their credentials rather than a shared key.
  3. 03Decide which model versions and predictions your product needs, and plan for predictions being asynchronous, so you create one then poll it or take a webhook.
  4. 04Call it from your product and expose it to your agents through the same governed connection.

Replicate connector reference: actions, triggers and auth

Why teams use the Replicate integration

  • Ship a Replicate integration without building it. Your customers connect their own Replicate account inside your product and work their models, requests and outputs there, and nothing lands on your team.
  • Handle the part that actually costs time: per-customer keys, quotas and cost attribution matter more than schema here, because every call is billed. fastn handles the auth, token refresh, rate limits and pagination, and when Replicate changes, its maintainer agent proposes a tested fix, so a Replicate update does not start in your backlog.

Used by these teams

Replicate integration FAQ

Can AI agents use this Replicate integration?

Yes, through the fastn MCP gateway, scoped per customer and audited. An agent starts a prediction, reports the identifier, then answers once the result is ready. For example: "Is this prediction still running, and which model version did I start it on?"

Whose Replicate API key and quota does each call use?

Each customer authorises their own Replicate account, so usage, rate limits and cost land on the customer that caused them. You are not metering a shared key and re-billing it, and one heavy customer cannot exhaust another's quota.

Are inputs and outputs auditable?

Yes. Every call is logged per tenant with the call, the input and the result, so an output can be traced back to what produced it. That matters more here than in most integrations, because a generated answer or an extracted field cannot be reconstructed from the request alone.

What can I build with the Replicate integration?

A common starting point: let each customer connect their own Replicate account so generation costs sit on their token instead of yours. The use cases above list the rest.

Add Replicate to your product

Start free with 3 customer connections. No sales call required, and no per-customer integration code.