replicate/kontext-chat
JavaScript
Captured source
source ↗replicate/kontext-chat
Description: Chat with your images using Black Forest Lab's FLUX.1 Kontext
Language: JavaScript
Stars: 92
Forks: 19
Open issues: 6
Created: 2025-05-30T20:50:33Z
Pushed: 2025-06-09T15:39:58Z
Default branch: main
Fork: no
Archived: no
README:
Kontext Chat
A chat app that generates images using Replicate and Cloudflare Workers.
Kontext Chat is powered by FLUX.1 Kontext Pro, a new image model from Black Forest Labs, running on Replicate. The app is built with Hono and React and it deployed on Cloudflare Workers.
See kontext-chat.replicate.dev for a live demo.
Local Development
1. Install dependencies:
npm install
1. Get a Replicate API Token:
- Sign up at https://replicate.com/ and get your REPLICATE_API_TOKEN from your account settings at https://replicate.com/account/api-tokens.
1. Set up your local environment:
- Create a .dev.vars file in the project root (already present in this repo) and add your token:
REPLICATE_API_TOKEN=your-token-here
1. Start the local dev server:
npm run dev
- The app will be available at http://localhost:8787 by default.
Deployment to Cloudflare
1. Authenticate Wrangler:
npx wrangler login
1. Set your Replicate API token as a secret:
npx wrangler secret put REPLICATE_API_TOKEN
1. Deploy:
npm run deploy
- Your app will be deployed to your Cloudflare Workers account.
Notes
- The frontend is served from the public/ directory.
- The backend is a Cloudflare Worker (entry: src/index.ts).
- The app requires a valid REPLICATE_API_TOKEN to function.
Notability
notability 4.0/10New repo, low stars, moderately notable author.