{
"collage_width": 1200,
"image": "https://replicate.delivery/pbxt/NbkymhPOpoT5iQ7AoCYVuAH5EdIdwnt9bz6FmuvobgGYkDoV/water-damaged-photo-retouching.jpg",
"include_original": true,
"openai_api_key": ""
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_c92**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run tomclive/photo-restore-comparison using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
collage_width: 1200,
image: "https://replicate.delivery/pbxt/NbkymhPOpoT5iQ7AoCYVuAH5EdIdwnt9bz6FmuvobgGYkDoV/water-damaged-photo-retouching.jpg",
include_original: true,
openai_api_key: ""
};
const output = await replicate.run("tomclive/photo-restore-comparison", { input });
console.log(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_c92**********************************
This is your API token. Keep it to yourself.
import replicate
Run tomclive/photo-restore-comparison using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"tomclive/photo-restore-comparison",
input={
"collage_width": 1200,
"image": "https://replicate.delivery/pbxt/NbkymhPOpoT5iQ7AoCYVuAH5EdIdwnt9bz6FmuvobgGYkDoV/water-damaged-photo-retouching.jpg",
"include_original": True,
"openai_api_key": ""
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_c92**********************************
This is your API token. Keep it to yourself.
Run tomclive/photo-restore-comparison 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": {
"collage_width": 1200,
"image": "https://replicate.delivery/pbxt/NbkymhPOpoT5iQ7AoCYVuAH5EdIdwnt9bz6FmuvobgGYkDoV/water-damaged-photo-retouching.jpg",
"include_original": true,
"openai_api_key": ""
}
}' \
https://api.replicate.com/v1/models/tomclive/photo-restore-comparison/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Object output with 5 properties
{
"id": "t3x36j603nrme0crxd0rpppjzr",
"model": "tomclive/photo-restore-comparison",
"version": "hidden",
"input": {
"collage_width": 1200,
"image": "https://replicate.delivery/pbxt/NbkymhPOpoT5iQ7AoCYVuAH5EdIdwnt9bz6FmuvobgGYkDoV/water-damaged-photo-retouching.jpg",
"include_original": true,
"openai_api_key": ""
},
"logs": "Starting photo restoration with multiple models...\nOpenAI API key not provided, skipping GPT Image 1\nCollecting results from all models...\n✓ Nano Banana completed\n✓ FLUX Restore completed\nSkipping OpenAI GPT Image 1 (no API key)\n✓ Qwen Image Edit completed\n✓ SeedEdit 3.0 completed\nCreating comparison collage...\nLoading Google Nano Banana from /tmp/cog-runner-tmp-1269284306/4f3a47e414f9ff99/tmp7k2iw5mu.png\n✓ Successfully loaded Google Nano Banana\nLoading FLUX Restore from /tmp/cog-runner-tmp-1269284306/12dd4ad05b80dba9/tmpq4_zxj3_.png\n✓ Successfully loaded FLUX Restore\nSkipping OpenAI GPT Image 1 - no result available\nLoading Qwen Image Edit from /tmp/cog-runner-tmp-1269284306/177587cda7e6118e/out-0.png\n✓ Successfully loaded Qwen Image Edit\nLoading SeedEdit 3.0 from /tmp/cog-runner-tmp-1269284306/9751fea0370698fa/tmp9e7zzj0d.jpg\n✓ Successfully loaded SeedEdit 3.0\nCreating collage with 5 images",
"output": {
"comparison_collage": "https://replicate.delivery/xezq/LBRDPffQt8jIfp3fhg5fWEyrJ2Se03eLVkTXwbRw1aJe7vJPVA/restoration_comparison.png",
"flux_restore_result": "https://replicate.delivery/xezq/nlAfHQCJxo0EC6l1QnRUWpVNB95E34y97o3dslGywMx93knKA/tmpq4_zxj3_.png",
"nano_banana_result": "https://replicate.delivery/xezq/gdtoGNfH9cxdICtW4qXhXHy8e3eqe3266ExAc2ddwpRtfN5pC/tmp7k2iw5mu.png",
"openai_gpt_image_result": null,
"qwen_edit_result": "https://replicate.delivery/xezq/pGqpxav0ijY6CVegO29hlvH7iPJAEHet884t79cWIVk7vJPVA/out-0.png",
"seededit_result": "https://replicate.delivery/xezq/wM6fPE4oT6RoaKrcFb9LUOwSrLcSmcNfdR3YJDhXNpT7vJPVA/tmp9e7zzj0d.jpg"
},
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-08-27T11:20:11.549Z",
"started_at": "2025-08-27T11:20:12.002646Z",
"completed_at": "2025-08-27T11:20:27.731904Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/t3x36j603nrme0crxd0rpppjzr/cancel",
"children": "https://api.replicate.com/v1/predictions/t3x36j603nrme0crxd0rpppjzr/children",
"get": "https://api.replicate.com/v1/predictions/t3x36j603nrme0crxd0rpppjzr",
"root": "https://api.replicate.com/v1/predictions/t3x36j603nrme0crxd0rpppjzr",
"web": "https://replicate.com/p/t3x36j603nrme0crxd0rpppjzr"
},
"metrics": {
"predict_time": 15.729258582,
"total_time": 16.182904
}
}




