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
- Create a Replicate account and add billing.
- Copy an API token (it starts with
r8_). - In ShipAny, open Admin → Settings → AI → Replicate and paste the token.
- Configure R2 storage so generated files are saved permanently.
- 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.
