typefile
{
"frame": "first",
"output_format": "png",
"prompt": "make it anime",
"safety_tolerance": 2,
"video": "https://replicate.delivery/pbxt/NHXa8wBNdkuezb6D4K930uTE1GxQEdavDzPE85Iz0LEX5S6j/A_ferrari_f40_202506211556_4g8tu.mp4"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Ls2**********************************
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/restyle-video-frame using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
frame: "first",
output_format: "png",
prompt: "make it anime",
safety_tolerance: 2,
video: "https://replicate.delivery/pbxt/NHXa8wBNdkuezb6D4K930uTE1GxQEdavDzPE85Iz0LEX5S6j/A_ferrari_f40_202506211556_4g8tu.mp4"
};
const output = await replicate.run("flux-kontext-apps/restyle-video-frame", { 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_Ls2**********************************
This is your API token. Keep it to yourself.
import replicate
Run flux-kontext-apps/restyle-video-frame using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"flux-kontext-apps/restyle-video-frame",
input={
"frame": "first",
"output_format": "png",
"prompt": "make it anime",
"safety_tolerance": 2,
"video": "https://replicate.delivery/pbxt/NHXa8wBNdkuezb6D4K930uTE1GxQEdavDzPE85Iz0LEX5S6j/A_ferrari_f40_202506211556_4g8tu.mp4"
}
)
# 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_Ls2**********************************
This is your API token. Keep it to yourself.
Run flux-kontext-apps/restyle-video-frame 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": {
"frame": "first",
"output_format": "png",
"prompt": "make it anime",
"safety_tolerance": 2,
"video": "https://replicate.delivery/pbxt/NHXa8wBNdkuezb6D4K930uTE1GxQEdavDzPE85Iz0LEX5S6j/A_ferrari_f40_202506211556_4g8tu.mp4"
}
}' \
https://api.replicate.com/v1/models/flux-kontext-apps/restyle-video-frame/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "4h0e672411rmc0cqrqt9xb29g0",
"model": "flux-kontext-apps/restyle-video-frame",
"version": "hidden",
"input": {
"frame": "first",
"output_format": "png",
"prompt": "make it anime",
"safety_tolerance": 2,
"video": "https://replicate.delivery/pbxt/NHXa8wBNdkuezb6D4K930uTE1GxQEdavDzPE85Iz0LEX5S6j/A_ferrari_f40_202506211556_4g8tu.mp4"
},
"logs": "Using seed: 42713826\nGenerating...\nGenerated image in 11.2sec\nDownloading 1391114 bytes\nDownloaded 1.33MB in 1.36sec",
"output": "https://replicate.delivery/xezq/7e5CfHf76AXHSpMHn7r8SNN65Fw0Nu4Gxrsp9a5HryPsww4pA/tmpia3hkkv5.png",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-07-01T12:26:49.224Z",
"started_at": "2025-07-01T12:26:49.282207Z",
"completed_at": "2025-07-01T12:27:02.360714Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/4h0e672411rmc0cqrqt9xb29g0/cancel",
"get": "https://api.replicate.com/v1/predictions/4h0e672411rmc0cqrqt9xb29g0",
"stream": "https://stream.replicate.com/v1/files/bcwr-qtdyo5ysqpblc5pfq5bm3gkh7u4a43otjl3mhwaaqwso6c6jjdja",
"web": "https://replicate.com/p/4h0e672411rmc0cqrqt9xb29g0"
},
"metrics": {
"predict_time": 13.078506518,
"total_time": 13.136714
}
}