tongflow-router-replicate

July 26, 2026 · View on GitHub

A TongFlow API plugin for Replicate. Replicate hosts tens of thousands of models behind a uniform predictions API; each node picks its owner/name model via a model picker.

Setup

Add REPLICATE_API_TOKEN in TongFlow Settings (create one at replicate.com/account/api-tokens).

EnvDefaultPurpose
REPLICATE_API_TOKENRequired. Replicate API token.
REPLICATE_TTS_VOICEDefault voice id for TTS.
REPLICATE_POLL_TIMEOUT_S900Max seconds to wait for a prediction.

How it works

Each prediction is created on the latest version of owner/name (POST /v1/models/{owner}/{name}/predictions, Prefer: wait, then poll), and the untyped output is normalized by shape (media URL → download; token list → text).

Per-model input caveat. Every Replicate model defines its own input schema. This plugin sends canonical field names (prompt, image, image_input, audio, video, first_frame_image/last_frame_image, voice_id, …) that fit the majority of the listed models, but some models use different field names — check the model's API page and adjust the picker/model if a specific one errors.

Slots

Text: gen-text, split-text, combine-text. Vision→text: image-gen-text, image-describe. Image: image-gen, image-edit, image-fusion, image-upscale, image-matting. Video: text-gen-video, image-gen-video, image-image-gen-video, video-upscale. Audio: transcribe, transcribe-timestamp, text-gen-speech-preset, text-gen-speech-clone, gen-music. 3D: image-gen-model (image → mesh).

Each slot lists several owner/name models; the first is the default. Slugs verified 2026-07 against Replicate collections — verify availability before relying on a specific one.

Licence

See the TongFlow repository.