typetext
{
"aspect_ratio": "4:3",
"height": 2048,
"image_input": [
"https://replicate.delivery/pbxt/NtYVbXdBTBIx7sMNsBlRNf9bsKnpZ3zq3Hyfz6CKE9psN5hj/replicate-prediction-5y13bdp685rm80csxnt9z04q5w.jpeg",
"https://replicate.delivery/pbxt/NtYVcCioE19QcU797VRdbGRxHeo9vf5gKt9lPJRCjCqXI9gb/replicate-prediction-g5pbdkt1csrm80csxnxbj4bsxc.jpg"
],
"max_images": 1,
"prompt": "Improve the character clothing and weapons of the ordered characters in the first image with design and outfit elements from the attached image. Change the kid into a goblin, and the goblin is wearing a hat. Keep the characters in the same order",
"sequential_image_generation": "disabled",
"size": "2K",
"width": 2048
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_CFj**********************************
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 bytedance/seedream-4 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
aspect_ratio: "4:3",
height: 2048,
image_input: ["https://replicate.delivery/pbxt/NtYVbXdBTBIx7sMNsBlRNf9bsKnpZ3zq3Hyfz6CKE9psN5hj/replicate-prediction-5y13bdp685rm80csxnt9z04q5w.jpeg","https://replicate.delivery/pbxt/NtYVcCioE19QcU797VRdbGRxHeo9vf5gKt9lPJRCjCqXI9gb/replicate-prediction-g5pbdkt1csrm80csxnxbj4bsxc.jpg"],
max_images: 1,
prompt: "Improve the character clothing and weapons of the ordered characters in the first image with design and outfit elements from the attached image. Change the kid into a goblin, and the goblin is wearing a hat. Keep the characters in the same order",
sequential_image_generation: "disabled",
size: "2K",
width: 2048
};
const output = await replicate.run("bytedance/seedream-4", { input });
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
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_CFj**********************************
This is your API token. Keep it to yourself.
import replicate
Run bytedance/seedream-4 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"bytedance/seedream-4",
input={
"aspect_ratio": "4:3",
"height": 2048,
"image_input": ["https://replicate.delivery/pbxt/NtYVbXdBTBIx7sMNsBlRNf9bsKnpZ3zq3Hyfz6CKE9psN5hj/replicate-prediction-5y13bdp685rm80csxnt9z04q5w.jpeg","https://replicate.delivery/pbxt/NtYVcCioE19QcU797VRdbGRxHeo9vf5gKt9lPJRCjCqXI9gb/replicate-prediction-g5pbdkt1csrm80csxnxbj4bsxc.jpg"],
"max_images": 1,
"prompt": "Improve the character clothing and weapons of the ordered characters in the first image with design and outfit elements from the attached image. Change the kid into a goblin, and the goblin is wearing a hat. Keep the characters in the same order",
"sequential_image_generation": "disabled",
"size": "2K",
"width": 2048
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].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_CFj**********************************
This is your API token. Keep it to yourself.
Run bytedance/seedream-4 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": {
"aspect_ratio": "4:3",
"height": 2048,
"image_input": ["https://replicate.delivery/pbxt/NtYVbXdBTBIx7sMNsBlRNf9bsKnpZ3zq3Hyfz6CKE9psN5hj/replicate-prediction-5y13bdp685rm80csxnt9z04q5w.jpeg","https://replicate.delivery/pbxt/NtYVcCioE19QcU797VRdbGRxHeo9vf5gKt9lPJRCjCqXI9gb/replicate-prediction-g5pbdkt1csrm80csxnxbj4bsxc.jpg"],
"max_images": 1,
"prompt": "Improve the character clothing and weapons of the ordered characters in the first image with design and outfit elements from the attached image. Change the kid into a goblin, and the goblin is wearing a hat. Keep the characters in the same order",
"sequential_image_generation": "disabled",
"size": "2K",
"width": 2048
}
}' \
https://api.replicate.com/v1/models/bytedance/seedream-4/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "rcmejsat2xrme0csxnys1h1ay4",
"model": "bytedance/seedream-4",
"version": "hidden",
"input": {
"aspect_ratio": "4:3",
"height": 2048,
"image_input": [
"https://replicate.delivery/pbxt/NtYVbXdBTBIx7sMNsBlRNf9bsKnpZ3zq3Hyfz6CKE9psN5hj/replicate-prediction-5y13bdp685rm80csxnt9z04q5w.jpeg",
"https://replicate.delivery/pbxt/NtYVcCioE19QcU797VRdbGRxHeo9vf5gKt9lPJRCjCqXI9gb/replicate-prediction-g5pbdkt1csrm80csxnxbj4bsxc.jpg"
],
"max_images": 1,
"prompt": "Improve the character clothing and weapons of the ordered characters in the first image with design and outfit elements from the attached image. Change the kid into a goblin, and the goblin is wearing a hat. Keep the characters in the same order",
"sequential_image_generation": "disabled",
"size": "2K",
"width": 2048
},
"logs": "Generating 2304x1728 image with aspect ratio 4:3 at 2K resolution\nGenerating...\nGenerated in 45.7sec",
"output": [
"https://replicate.delivery/xezq/1pnmdILdOjb1P5iTRBChY7ieRDqX1Z5Ck8NuZC491TsSv1vKA/tmpaw_pajs1.jpg"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-10-16T14:47:19.319Z",
"started_at": "2025-10-16T14:47:19.335634Z",
"completed_at": "2025-10-16T14:48:05.658738Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/rcmejsat2xrme0csxnys1h1ay4/cancel",
"get": "https://api.replicate.com/v1/predictions/rcmejsat2xrme0csxnys1h1ay4",
"stream": "https://stream.replicate.com/v1/files/bcwr-eawftjymu2csnlnuoatuqvrwuuulipw6h4b5j2ackpdorojkqncq",
"web": "https://replicate.com/p/rcmejsat2xrme0csxnys1h1ay4"
},
"metrics": {
"predict_time": 46.323104689,
"total_time": 46.339738
}
}

