Image Edit - Seedream v4 - Brand Clothes to Person
Image
Seedream v4
by Henri Huotari · Sep 18, 2025
Image of a person, image of clothes, combined.
This file couldn't be loaded. The link may have expired.
This file couldn't be loaded. The link may have expired.
This file couldn't be loaded. The link may have expired.
This file couldn't be loaded. The link may have expired.
Run it yourself
Set IMMERSIVE_API_KEY to an API key from your account. Create a free account to get one.
curl -X POST 'https://ai.im.inc/api/v1/images/edit' \
-H "Authorization: Bearer $IMMERSIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-v4",
"prompt": "Photo of this man at a beach, wearing the clothes in the other image.",
"provider": "fal",
"num_images": 1,
"image_input": [
"https://pub-dec6d95a35de4f6da5471924c23ba9cf.r2.dev/examples/inputs/44fdf72d-4aac-481b-8eef-b5723528fd55/image_input.0.jpeg",
"https://pub-dec6d95a35de4f6da5471924c23ba9cf.r2.dev/examples/inputs/44fdf72d-4aac-481b-8eef-b5723528fd55/image_input.1.png"
],
"output_format": "png"
}'
# Set JOB_ID to the response's "id", then poll every few seconds until the job has finished:
curl "https://ai.im.inc/api/v1/images/$JOB_ID" \
-H "Authorization: Bearer $IMMERSIVE_API_KEY"
# The finished response has the result at output.generated_image_url.
const headers = { Authorization: `Bearer ${process.env.IMMERSIVE_API_KEY}` };
const response = await fetch("https://ai.im.inc/api/v1/images/edit", {
method: "POST",
headers: { ...headers, "Content-Type": "application/json" },
body: JSON.stringify({
"model": "seedream-v4",
"prompt": "Photo of this man at a beach, wearing the clothes in the other image.",
"provider": "fal",
"num_images": 1,
"image_input": [
"https://pub-dec6d95a35de4f6da5471924c23ba9cf.r2.dev/examples/inputs/44fdf72d-4aac-481b-8eef-b5723528fd55/image_input.0.jpeg",
"https://pub-dec6d95a35de4f6da5471924c23ba9cf.r2.dev/examples/inputs/44fdf72d-4aac-481b-8eef-b5723528fd55/image_input.1.png"
],
"output_format": "png"
}),
});
const job = await response.json();
// Poll every few seconds while the job is still running.
const running = ["pending", "queued", "submitted", "starting", "processing", "running", "streaming", "in_queue", "in_progress"];
let result;
do {
await new Promise((resolve) => setTimeout(resolve, 5000));
result = await (await fetch(`https://ai.im.inc/api/v1/images/${job.id}`, { headers })).json();
} while (running.includes(String(result.status).toLowerCase()));
console.log(result.output.generated_image_url);
import os
import time
import requests
headers = {"Authorization": f"Bearer {os.environ['IMMERSIVE_API_KEY']}"}
job = requests.post(
"https://ai.im.inc/api/v1/images/edit",
headers=headers,
json={
"model": "seedream-v4",
"prompt": "Photo of this man at a beach, wearing the clothes in the other image.",
"provider": "fal",
"num_images": 1,
"image_input": [
"https://pub-dec6d95a35de4f6da5471924c23ba9cf.r2.dev/examples/inputs/44fdf72d-4aac-481b-8eef-b5723528fd55/image_input.0.jpeg",
"https://pub-dec6d95a35de4f6da5471924c23ba9cf.r2.dev/examples/inputs/44fdf72d-4aac-481b-8eef-b5723528fd55/image_input.1.png",
],
"output_format": "png",
},
timeout=300,
).json()
# Poll every few seconds while the job is still running.
running = {"pending", "queued", "submitted", "starting", "processing", "running", "streaming", "in_queue", "in_progress"}
while True:
time.sleep(5)
result = requests.get(f"https://ai.im.inc/api/v1/images/{job['id']}", headers=headers, timeout=60).json()
if str(result.get("status", "")).lower() not in running:
break
print(result["output"]["generated_image_url"])
{
"id": "4ba3ae1e-82ed-4aab-b912-4c0cfe9c8c7a",
"meta": "{\"images\":[{\"url\":\"https:\\/\\/v3b.fal.media\\/files\\/b\\/lion\\/fYofR02MVeg_mGb62ep8O_c0dbeb7da85c41c59ee3ba32924180a8.png\",\"content_type\":\"image\\/png\",\"file_name\":\"c0dbeb7da85c41c59ee3ba32924180a8.png\",\"file_size\":1433586,\"width\":null,\"height\":null}],\"seed\":1748826459}",
"seed": "1748826459",
"error": null,
"output": {
"prompt": "Photo of this man at a beach, wearing the clothes in the other image.",
"generated_image_url": "https://pub-dec6d95a35de4f6da5471924c23ba9cf.r2.dev/examples/outputs/44fdf72d-4aac-481b-8eef-b5723528fd55/output.generated_image_url.png",
"all_generated_image_urls": [
{
"url": "https://pub-dec6d95a35de4f6da5471924c23ba9cf.r2.dev/examples/outputs/44fdf72d-4aac-481b-8eef-b5723528fd55/output.all_generated_image_urls.0.url.png",
"width": null,
"height": null,
"file_name": "c0dbeb7da85c41c59ee3ba32924180a8.png",
"file_size": 1433586,
"content_type": "image/png"
}
]
},
"status": "succeeded",
"num_outputs": 1,
"nsfw_detected": false,
"generator_used": "fal"
}
Your browser blocked the clipboard. Select the text and copy it by hand.
How the job runs
- POST returns the job's id and status right away.
- Poll GET /api/v1/images/{id} every few seconds while the job is running.
- When status is succeeded, download output.generated_image_url. Failed jobs are refunded automatically.
- Endpoint
- POST /api/v1/images/edit
- Model
- seedream-v4
- Output
- Image · PNG