Edit Image
Image
5 credits
by Henri Huotari · Oct 22, 2025
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 '{
"prompt": "Turn the car pink and add the IMMERSIVE text logo provided to the license plate",
"provider": "fal",
"image_input": [
"https://s3.huotari.ai/immersive/examples/inputs/e768e93b-24d9-439d-8537-e404c5663ec6/image_input.0.jpeg",
"https://s3.huotari.ai/immersive/examples/inputs/e768e93b-24d9-439d-8537-e404c5663ec6/image_input.1.png"
],
"aspect_ratio": "16:9",
"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 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({
"prompt": "Turn the car pink and add the IMMERSIVE text logo provided to the license plate",
"provider": "fal",
"image_input": [
"https://s3.huotari.ai/immersive/examples/inputs/e768e93b-24d9-439d-8537-e404c5663ec6/image_input.0.jpeg",
"https://s3.huotari.ai/immersive/examples/inputs/e768e93b-24d9-439d-8537-e404c5663ec6/image_input.1.png"
],
"aspect_ratio": "16:9",
"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.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={
"prompt": "Turn the car pink and add the IMMERSIVE text logo provided to the license plate",
"provider": "fal",
"image_input": [
"https://s3.huotari.ai/immersive/examples/inputs/e768e93b-24d9-439d-8537-e404c5663ec6/image_input.0.jpeg",
"https://s3.huotari.ai/immersive/examples/inputs/e768e93b-24d9-439d-8537-e404c5663ec6/image_input.1.png",
],
"aspect_ratio": "16:9",
"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["url"])
{
"id": "bede6224-14af-4bd1-a126-b8df4eb80b63",
"url": "https://s3.huotari.ai/immersive/examples/outputs/e768e93b-24d9-439d-8537-e404c5663ec6/result.png",
"seed": null,
"type": "nano-banana-edit-fal",
"tries": 1,
"prompt": "Turn the car pink and add the text logo provided to the license plate",
"status": "succeeded",
"batch_id": null,
"image_id": "bede6224-14af-4bd1-a126-b8df4eb80b63",
"uploaded": 0,
"created_at": "2025-10-22T21:59:07.000000Z",
"is_aborted": 0,
"updated_at": "2025-10-22T21:59:18.000000Z",
"used_server": "https://queue.fal.run/fal-ai/nano-banana/requests/bede6224-14af-4bd1-a126-b8df4eb80b63/status",
"elapsed_time": null,
"generated_at": "2025-10-22T21:59:18.000000Z",
"is_generated": 1,
"magic_prompt": null,
"provider_used": "fal",
"estimated_cost": 5,
"generation_data": "{\"prompt\": \"Turn the car pink and add the text logo provided to the license plate\", \"image_urls\": [\"https://s3.huotari.ai/images/lambo.jpeg\", \"https://s3.huotari.ai/images/immersive.png\"], \"num_images\": 1, \"aspect_ratio\": \"16:9\", \"output_format\": \"png\"}",
"reaL_elapsed_time": null,
"amount_generated_past_hour": 0,
"amount_generated_past_hour_same_origin": 0
}
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 url. Failed jobs are refunded automatically.
- Endpoint
- POST /api/v1/images/edit
- Cost
- 5 credits · $0.05
- Output
- Image · PNG