typefile
{
"aspect_ratio": "match_input_image",
"input_image": "https://replicate.delivery/pbxt/NSbhePDEQ1R5XmdnK1z2wDp58bFdZEk2XcbYmSgu6xPCdmyT/pearl.jpg",
"lora_strength": 1,
"output_format": "webp",
"prompt": "Turn this image into the emoji style of Apple iOS system"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_3Dn**********************************
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/NSbhePDEQ1R5XmdnK1z2wDp58bFdZEk2XcbYmSgu6xPCdmyT/pearl.jpg",
lora_strength: 1,
output_format: "webp",
prompt: "Turn this image into the emoji style of Apple iOS system"
};
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_3Dn**********************************
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/NSbhePDEQ1R5XmdnK1z2wDp58bFdZEk2XcbYmSgu6xPCdmyT/pearl.jpg",
"lora_strength": 1,
"output_format": "webp",
"prompt": "Turn this image into the emoji style of Apple iOS system"
}
)
# 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_3Dn**********************************
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/NSbhePDEQ1R5XmdnK1z2wDp58bFdZEk2XcbYmSgu6xPCdmyT/pearl.jpg",
"lora_strength": 1,
"output_format": "webp",
"prompt": "Turn this image into the emoji style of Apple iOS system"
}
}' \
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": "bx8f9qxw7drme0crct19t3nn00",
"model": "flux-kontext-apps/kontext-emoji-maker",
"version": "hidden",
"input": {
"aspect_ratio": "match_input_image",
"input_image": "https://replicate.delivery/pbxt/NSbhePDEQ1R5XmdnK1z2wDp58bFdZEk2XcbYmSgu6xPCdmyT/pearl.jpg",
"lora_strength": 1,
"output_format": "webp",
"prompt": "Turn this image into the emoji style of Apple iOS system"
},
"logs": "",
"output": "https://replicate.delivery/xezq/rLV5iaBPH7ahJ9miPMptjLgKLDVfhvwHnXIfPwiDMVfWCUNqA/output.webp",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-08-01T16:41:40.667Z",
"started_at": "2025-08-01T16:41:41.282015Z",
"completed_at": "2025-08-01T16:41:47.739493Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/bx8f9qxw7drme0crct19t3nn00/cancel",
"children": "https://api.replicate.com/v1/predictions/bx8f9qxw7drme0crct19t3nn00/children",
"get": "https://api.replicate.com/v1/predictions/bx8f9qxw7drme0crct19t3nn00",
"root": "https://api.replicate.com/v1/predictions/bx8f9qxw7drme0crct19t3nn00",
"stream": "https://stream.replicate.com/v1/files/bcwr-ze4ocbxz4yh6o2dbghqv4onygzgphcpnhfqkv3wpivg5f2aath5q",
"web": "https://replicate.com/p/bx8f9qxw7drme0crct19t3nn00"
},
"metrics": {
"predict_time": 6.457477791,
"total_time": 7.072493
}
}
