Replicate integration: image, video and audio generation for SaaS

Run Replicate models from a ShipAny app with credit-based billing — async predictions with webhooks, results saved to your own storage, and automatic credit refunds on failure.

Last updated: Oct 8, 2026

Replicate runs thousands of open-source models behind one API. ShipAny's Replicate provider plugs those models into its AI task system, so each generation is metered in credits and tracked from start to finish.

What ShipAny handles

  • Generation by media type — image, video, music, speech and text — with the model and options you choose.
  • Async predictions with webhooks: ShipAny passes a callback URL so Replicate reports back when a prediction completes, and can also query a prediction's status directly.
  • Credits per task: creating a task deducts its credit cost up front (and fails cleanly with "Insufficient credits"); if the task later fails, the credits are revoked back to the user automatically.
  • Saving outputs to your configured storage, so results outlive Replicate's temporary file URLs.

Setup

  1. Create a Replicate account and add billing.
  2. Copy an API token (it starts with r8_).
  3. In ShipAny, open Admin → Settings → AI → Replicate and paste the token.
  4. Configure R2 storage so generated files are saved permanently.
  5. Run a generation from your app and check that the task completes and the credit balance changes.

Tips

  • Set credit costs per model so your price covers Replicate's per-second compute cost with margin — video models in particular vary a lot.
  • The webhook needs a public HTTPS URL; in local development, rely on status queries instead.

Related reading

More in Integrations

Ship your AI SaaS with ShipAny

Auth, payments, credits, i18n and admin are pre-wired — start from a production-ready template and focus on your product.