typefile
{
"image1": "https://replicate.delivery/pbxt/O7mlwG2oNfm04ETjR9BlMhwcN2RzRwd7qZC6ME2GQldSEDsv/out-1.webp",
"image2": "https://replicate.delivery/pbxt/O7mlwFIHC0VUIW8aPAXAmd0lLznrQK3evv93yoJPWxBjGAoX/98a18959-82bb-4900-ad10-fa3ca462916a.png"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_1ch**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run flux-2-apps/mixer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
image1: "https://replicate.delivery/pbxt/O7mlwG2oNfm04ETjR9BlMhwcN2RzRwd7qZC6ME2GQldSEDsv/out-1.webp",
image2: "https://replicate.delivery/pbxt/O7mlwFIHC0VUIW8aPAXAmd0lLznrQK3evv93yoJPWxBjGAoX/98a18959-82bb-4900-ad10-fa3ca462916a.png"
};
const output = await replicate.run("flux-2-apps/mixer", { input });
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_1ch**********************************
This is your API token. Keep it to yourself.
import replicate
Run flux-2-apps/mixer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"flux-2-apps/mixer",
input={
"image1": "https://replicate.delivery/pbxt/O7mlwG2oNfm04ETjR9BlMhwcN2RzRwd7qZC6ME2GQldSEDsv/out-1.webp",
"image2": "https://replicate.delivery/pbxt/O7mlwFIHC0VUIW8aPAXAmd0lLznrQK3evv93yoJPWxBjGAoX/98a18959-82bb-4900-ad10-fa3ca462916a.png"
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_1ch**********************************
This is your API token. Keep it to yourself.
Run flux-2-apps/mixer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"input": {
"image1": "https://replicate.delivery/pbxt/O7mlwG2oNfm04ETjR9BlMhwcN2RzRwd7qZC6ME2GQldSEDsv/out-1.webp",
"image2": "https://replicate.delivery/pbxt/O7mlwFIHC0VUIW8aPAXAmd0lLznrQK3evv93yoJPWxBjGAoX/98a18959-82bb-4900-ad10-fa3ca462916a.png"
}
}' \
https://api.replicate.com/v1/models/flux-2-apps/mixer/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "5ap8kwyj2drma0ctqfrt3scre4",
"model": "flux-2-apps/mixer",
"version": "hidden",
"input": {
"image1": "https://replicate.delivery/pbxt/O7mlwG2oNfm04ETjR9BlMhwcN2RzRwd7qZC6ME2GQldSEDsv/out-1.webp",
"image2": "https://replicate.delivery/pbxt/O7mlwFIHC0VUIW8aPAXAmd0lLznrQK3evv93yoJPWxBjGAoX/98a18959-82bb-4900-ad10-fa3ca462916a.png"
},
"logs": "",
"output": "https://replicate.delivery/xezq/sVsusFXAoWaNFhZoV6a7QzF84yH9emfe4yWwE3McNVAwOyZrA/tmpv_420qs_.png",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-11-25T16:56:18.707Z",
"started_at": "2025-11-25T16:56:19.197586Z",
"completed_at": "2025-11-25T16:56:56.499723Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/5ap8kwyj2drma0ctqfrt3scre4/cancel",
"children": "https://api.replicate.com/v1/predictions/5ap8kwyj2drma0ctqfrt3scre4/children",
"get": "https://api.replicate.com/v1/predictions/5ap8kwyj2drma0ctqfrt3scre4",
"root": "https://api.replicate.com/v1/predictions/5ap8kwyj2drma0ctqfrt3scre4",
"stream": "https://stream.replicate.com/v1/files/bcwr-p2fsi3lcxjk5tgkz5sg76tdl365wapeea44pjui4zkq6ufpo6rcq",
"web": "https://replicate.com/p/5ap8kwyj2drma0ctqfrt3scre4"
},
"metrics": {
"predict_time": 37.302137589,
"total_time": 37.792723668
}
}

