typefile
{
"aspect_ratio": "match_input_image",
"input_image": "https://replicate.delivery/pbxt/NSzPSvLDcnss8TwP6qi2lpeDfgYu7277iJbQNOZKkWCEb2Ya/image.png",
"lora_strength": 0.5,
"output_format": "webp",
"prompt": "Turn this image into the emoji style of Apple iOS system, keep the blurred background"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_SDr**********************************
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 flux-kontext-apps/kontext-emoji-maker using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
aspect_ratio: "match_input_image",
input_image: "https://replicate.delivery/pbxt/NSzPSvLDcnss8TwP6qi2lpeDfgYu7277iJbQNOZKkWCEb2Ya/image.png",
lora_strength: 0.5,
output_format: "webp",
prompt: "Turn this image into the emoji style of Apple iOS system, keep the blurred background"
};
const output = await replicate.run("flux-kontext-apps/kontext-emoji-maker", { 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_SDr**********************************
This is your API token. Keep it to yourself.
import replicate
Run flux-kontext-apps/kontext-emoji-maker using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"flux-kontext-apps/kontext-emoji-maker",
input={
"aspect_ratio": "match_input_image",
"input_image": "https://replicate.delivery/pbxt/NSzPSvLDcnss8TwP6qi2lpeDfgYu7277iJbQNOZKkWCEb2Ya/image.png",
"lora_strength": 0.5,
"output_format": "webp",
"prompt": "Turn this image into the emoji style of Apple iOS system, keep the blurred background"
}
)
# 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_SDr**********************************
This is your API token. Keep it to yourself.
Run flux-kontext-apps/kontext-emoji-maker 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": "match_input_image",
"input_image": "https://replicate.delivery/pbxt/NSzPSvLDcnss8TwP6qi2lpeDfgYu7277iJbQNOZKkWCEb2Ya/image.png",
"lora_strength": 0.5,
"output_format": "webp",
"prompt": "Turn this image into the emoji style of Apple iOS system, keep the blurred background"
}
}' \
https://api.replicate.com/v1/models/flux-kontext-apps/kontext-emoji-maker/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "gtr7kjbxs1rme0crdg9rv3m64m",
"model": "flux-kontext-apps/kontext-emoji-maker",
"version": "hidden",
"input": {
"aspect_ratio": "match_input_image",
"input_image": "https://replicate.delivery/pbxt/NSzPSvLDcnss8TwP6qi2lpeDfgYu7277iJbQNOZKkWCEb2Ya/image.png",
"lora_strength": 0.5,
"output_format": "webp",
"prompt": "Turn this image into the emoji style of Apple iOS system, keep the blurred background"
},
"logs": "",
"output": "https://replicate.delivery/xezq/KYbokJwkG5bmBNQjs06McrJgziMq0GMa11EfXeKSraUL0AHVA/output.webp",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-08-02T18:37:53.48Z",
"started_at": "2025-08-02T18:37:54.027045Z",
"completed_at": "2025-08-02T18:38:03.109311Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/gtr7kjbxs1rme0crdg9rv3m64m/cancel",
"children": "https://api.replicate.com/v1/predictions/gtr7kjbxs1rme0crdg9rv3m64m/children",
"get": "https://api.replicate.com/v1/predictions/gtr7kjbxs1rme0crdg9rv3m64m",
"root": "https://api.replicate.com/v1/predictions/gtr7kjbxs1rme0crdg9rv3m64m",
"stream": "https://stream.replicate.com/v1/files/bcwr-lsd2ugrwp44mxqk5rx7mbbyubmeow3ncnejjs7jz56dmmpb2mafq",
"web": "https://replicate.com/p/gtr7kjbxs1rme0crdg9rv3m64m"
},
"metrics": {
"predict_time": 9.082266131,
"total_time": 9.629311
}
}
