typefile
{
"fix_white_balance": false,
"input_image": "https://replicate.delivery/pbxt/MtNw1hr0C3Ff4v0ixb7ldfySBGUsoszivzdoMNQYyRaECqDV/20250407_2359_Curious%20Expression_remix_01jr97ns5we8ebc2595ryj0xak.png",
"method": "mkl",
"reference_image": "https://replicate.delivery/pbxt/MtNw1Safv0BWXmoNNObPAZdu9vMoaUZBWXlFPtDOpDgcMNFr/0_1.webp",
"strength": 1,
"white_balance_percentile": 95
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_NbU**********************************
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 replicate/color-matcher-internal using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
fix_white_balance: false,
input_image: "https://replicate.delivery/pbxt/MtNw1hr0C3Ff4v0ixb7ldfySBGUsoszivzdoMNQYyRaECqDV/20250407_2359_Curious%20Expression_remix_01jr97ns5we8ebc2595ryj0xak.png",
method: "mkl",
reference_image: "https://replicate.delivery/pbxt/MtNw1Safv0BWXmoNNObPAZdu9vMoaUZBWXlFPtDOpDgcMNFr/0_1.webp",
strength: 1,
white_balance_percentile: 95
};
const output = await replicate.run("replicate/color-matcher-internal", { input });
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", 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_NbU**********************************
This is your API token. Keep it to yourself.
import replicate
Run replicate/color-matcher-internal using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"replicate/color-matcher-internal",
input={
"fix_white_balance": False,
"input_image": "https://replicate.delivery/pbxt/MtNw1hr0C3Ff4v0ixb7ldfySBGUsoszivzdoMNQYyRaECqDV/20250407_2359_Curious%20Expression_remix_01jr97ns5we8ebc2595ryj0xak.png",
"method": "mkl",
"reference_image": "https://replicate.delivery/pbxt/MtNw1Safv0BWXmoNNObPAZdu9vMoaUZBWXlFPtDOpDgcMNFr/0_1.webp",
"strength": 1,
"white_balance_percentile": 95
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.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_NbU**********************************
This is your API token. Keep it to yourself.
Run replicate/color-matcher-internal 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": {
"fix_white_balance": false,
"input_image": "https://replicate.delivery/pbxt/MtNw1hr0C3Ff4v0ixb7ldfySBGUsoszivzdoMNQYyRaECqDV/20250407_2359_Curious%20Expression_remix_01jr97ns5we8ebc2595ryj0xak.png",
"method": "mkl",
"reference_image": "https://replicate.delivery/pbxt/MtNw1Safv0BWXmoNNObPAZdu9vMoaUZBWXlFPtDOpDgcMNFr/0_1.webp",
"strength": 1,
"white_balance_percentile": 95
}
}' \
https://api.replicate.com/v1/models/replicate/color-matcher-internal/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "b1raq6pwhnrm80cpcxz8zsf01r",
"model": "replicate/color-matcher-internal",
"version": "34274607b8c669dd4e7588b0911f7e9968306e0fe6c0b34cb550f97deb4ad4db",
"deployment": "replicate/official-model-color-matcher",
"input": {
"fix_white_balance": false,
"input_image": "https://replicate.delivery/pbxt/MtNw1hr0C3Ff4v0ixb7ldfySBGUsoszivzdoMNQYyRaECqDV/20250407_2359_Curious%20Expression_remix_01jr97ns5we8ebc2595ryj0xak.png",
"method": "mkl",
"reference_image": "https://replicate.delivery/pbxt/MtNw1Safv0BWXmoNNObPAZdu9vMoaUZBWXlFPtDOpDgcMNFr/0_1.webp",
"strength": 1,
"white_balance_percentile": 95
},
"logs": "",
"output": "https://replicate.delivery/xezq/9FYGwweQbVWRCK8Eeg17ZocS7v5fWyCQre8Is2YTorFKmzXSB/output.png",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-04-24T11:11:29.421Z",
"started_at": "2025-04-24T11:11:29.4326Z",
"completed_at": "2025-04-24T11:11:30.87405Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/b1raq6pwhnrm80cpcxz8zsf01r/cancel",
"get": "https://api.replicate.com/v1/predictions/b1raq6pwhnrm80cpcxz8zsf01r",
"stream": "https://stream.replicate.com/v1/files/bcwr-adsfd45xn47hpm7fyhwh2tavtmnfed4ichxrfs4l6usomqlmit5a",
"web": "https://replicate.com/p/b1raq6pwhnrm80cpcxz8zsf01r"
},
"metrics": {
"image_count": 1,
"predict_time": 1.441450903,
"total_time": 1.45305
}
}

