typetext
{
"aspect_ratio": "4:3",
"height": 2048,
"image_input": [
"https://replicate.delivery/pbxt/NtYd4C0eGBFv55mhydMEZAcb5Srtp8Lcc8RHuGPIyqCa7ZZQ/replicate-prediction-7asfcbke4srme0csxndanxmt40%20%281%29.webp"
],
"max_images": 1,
"prompt": "Move the time 5 seconds into the future, showing a gentle and slight movement of the waves and water",
"sequential_image_generation": "disabled",
"size": "2K",
"width": 2048
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_dVM**********************************
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/NtYd4C0eGBFv55mhydMEZAcb5Srtp8Lcc8RHuGPIyqCa7ZZQ/replicate-prediction-7asfcbke4srme0csxndanxmt40%20%281%29.webp"],
max_images: 1,
prompt: "Move the time 5 seconds into the future, showing a gentle and slight movement of the waves and water",
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_dVM**********************************
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/NtYd4C0eGBFv55mhydMEZAcb5Srtp8Lcc8RHuGPIyqCa7ZZQ/replicate-prediction-7asfcbke4srme0csxndanxmt40%20%281%29.webp"],
"max_images": 1,
"prompt": "Move the time 5 seconds into the future, showing a gentle and slight movement of the waves and water",
"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_dVM**********************************
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/NtYd4C0eGBFv55mhydMEZAcb5Srtp8Lcc8RHuGPIyqCa7ZZQ/replicate-prediction-7asfcbke4srme0csxndanxmt40%20%281%29.webp"],
"max_images": 1,
"prompt": "Move the time 5 seconds into the future, showing a gentle and slight movement of the waves and water",
"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": "zvt5hxm5pnrma0csxp28v7x978",
"model": "bytedance/seedream-4",
"version": "hidden",
"input": {
"aspect_ratio": "4:3",
"height": 2048,
"image_input": [
"https://replicate.delivery/pbxt/NtYd4C0eGBFv55mhydMEZAcb5Srtp8Lcc8RHuGPIyqCa7ZZQ/replicate-prediction-7asfcbke4srme0csxndanxmt40%20%281%29.webp"
],
"max_images": 1,
"prompt": "Move the time 5 seconds into the future, showing a gentle and slight movement of the waves and water",
"sequential_image_generation": "disabled",
"size": "2K",
"width": 2048
},
"logs": "Generating 2304x1728 image with aspect ratio 4:3 at 2K resolution\nGenerating...\nGenerated in 20.9sec",
"output": [
"https://replicate.delivery/xezq/opsyuHBce5W9Fqp075g5F3XYr0qF8eWPf4e7VXZKDw6IWuerC/tmp4yymk4qh.jpg"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-10-16T14:55:09.237Z",
"started_at": "2025-10-16T14:55:09.245266Z",
"completed_at": "2025-10-16T14:55:30.724367Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/zvt5hxm5pnrma0csxp28v7x978/cancel",
"get": "https://api.replicate.com/v1/predictions/zvt5hxm5pnrma0csxp28v7x978",
"stream": "https://stream.replicate.com/v1/files/bcwr-g63bvwspqvx72pyfjbjanuwgmeg4jpkgggs7it2tprmhkojz4k6q",
"web": "https://replicate.com/p/zvt5hxm5pnrma0csxp28v7x978"
},
"metrics": {
"predict_time": 21.479100882,
"total_time": 21.487367
}
}
