# Replicate Integration with Encore.ts

DevFeed: [Replicate Integration with Encore.ts](<https://devfeed.tech/articles/replicate-integration-with-encore-ts-17835.md>)

Original publisher: [Read original article](<https://encore.dev/blog/replicate-image-gen-tutorial>)

Author: Ivan Cernja

Published: 2025-11-17T00:00:00Z

Content type: tutorial

Language: en

Sources: [Encore Updates](<https://devfeed.tech/sources/encore-updates.md>)

Topics: [AI Development](<https://devfeed.tech/topics/ai-development.md>), [text-to-image](<https://devfeed.tech/topics/text-to-image.md>), [API](<https://devfeed.tech/topics/api.md>), [flux](<https://devfeed.tech/topics/flux.md>), [stable-diffusion](<https://devfeed.tech/topics/stable-diffusion.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>), [Secrets Management](<https://devfeed.tech/topics/secrets-management.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [api](<https://devfeed.tech/tags/api.md>), [diffusion](<https://devfeed.tech/tags/diffusion.md>), [flux](<https://devfeed.tech/tags/flux.md>), [integration](<https://devfeed.tech/tags/integration.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [secrets-management](<https://devfeed.tech/tags/secrets-management.md>), [stable-diffusion](<https://devfeed.tech/tags/stable-diffusion.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

## AI overview

This tutorial explains how to build a type-safe backend with Encore.ts and Replicate to run AI model predictions and generate images. It covers asynchronous results, image storage, API authentication, secret management, and models such as FLUX and Stable Diffusion.

## Source excerpt

Running AI models with Replicate and Encore