Skip to content

replicate/kontext-realtime

Repository files navigation

screenshot


Kontext Realtime

Create and edit images using your voice.

🍿 Watch the demo video

This is a realtime demo of voice-powered function calling using Cloudflare Workers, Replicate, and the OpenAI Realtime API.

It generates images using Flux Schnell and edits them using Flux Kontext Pro.

Created from this guide and template: https://replicate.com/docs/guides/openai-realtime?utm_campaign=kontext-realtime&utm_source=project

Prerequisites

Here's what you'll need to build this project:

Development

Copy .dev.vars.example to .dev.vars:

cp .dev.vars.example .dev.vars

Edit .dev.vars and add your OpenAI API key and Replicate API token:

OPENAI_API_KEY=...
REPLICATE_API_TOKEN=...

Install dependencies

npm install

Run local server

npm run dev

Deploy

Upload your secrets

npx wrangler secret put OPENAI_API_KEY
npx wrangler secret put REPLICATE_API_TOKEN

Replicate API Token

When you first load the app, you will be prompted to enter your Replicate API token in a modal dialog. The token is stored in your browser's localStorage and used for all Replicate API requests. You can get a token from Replicate's API tokens page.

You no longer need to set the REPLICATE_API_TOKEN environment variable or use wrangler secret put for this project.

npm run deploy

About

Create and edit images using your voice

Resources

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •