{
"n_interpolations": 9,
"text1": "High quality front portrait photo of a tiger.",
"text2": "High quality front portrait photo of a dog."
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_d54**********************************
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 arielreplicate/paella_fast_image_interpolation using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"arielreplicate/paella_fast_image_interpolation:82f5ceda76ca5a754184549a5c5f3401ac339d1e1c3535098dad38f4d037723a",
{
input: {
n_interpolations: 9,
text1: "High quality front portrait photo of a tiger.",
text2: "High quality front portrait photo of a dog."
}
}
);
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
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_d54**********************************
This is your API token. Keep it to yourself.
import replicate
Run arielreplicate/paella_fast_image_interpolation using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"arielreplicate/paella_fast_image_interpolation:82f5ceda76ca5a754184549a5c5f3401ac339d1e1c3535098dad38f4d037723a",
input={
"n_interpolations": 9,
"text1": "High quality front portrait photo of a tiger.",
"text2": "High quality front portrait photo of a dog."
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].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_d54**********************************
This is your API token. Keep it to yourself.
Run arielreplicate/paella_fast_image_interpolation 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 $'{
"version": "arielreplicate/paella_fast_image_interpolation:82f5ceda76ca5a754184549a5c5f3401ac339d1e1c3535098dad38f4d037723a",
"input": {
"n_interpolations": 9,
"text1": "High quality front portrait photo of a tiger.",
"text2": "High quality front portrait photo of a dog."
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "zne6gnrn5vfbdpe6tn2hihwvai",
"model": "arielreplicate/paella_fast_image_interpolation",
"version": "82f5ceda76ca5a754184549a5c5f3401ac339d1e1c3535098dad38f4d037723a",
"input": {
"n_interpolations": 9,
"text1": "High quality front portrait photo of a tiger.",
"text2": "High quality front portrait photo of a dog."
},
"logs": "",
"output": [
"https://replicate.delivery/pbxt/I07ae7T506QNGS7fS2L4ZizuLEbVr6fbQN4qMNZhfa5fvICBC/OutputImage-0.png",
"https://replicate.delivery/pbxt/wmpXizaW5XrDHFCofOjqVMfJOGi8Q9MLM1gKgPm03mCfLiQgA/OutputImage-1.png",
"https://replicate.delivery/pbxt/JCgCbSbUvp51AZiUBaEPa49e1nTTEAlZKIc6NQqDJPkfFRIQA/OutputImage-2.png",
"https://replicate.delivery/pbxt/01NZme2wVDVcMKQ5DqkDwpG6w5RWQX8fr05mgqvZeof9XEhAB/OutputImage-3.png",
"https://replicate.delivery/pbxt/jrPtJpB5Mx6NKJpfz76WkAwbycNh4wdX58pu5nVLWe2AGRIQA/OutputImage-4.png",
"https://replicate.delivery/pbxt/Zyt35WpLdo7LHhwZ9H8X0Xbiu4Vuc5wYtXrHrzftb9FAjIEIA/OutputImage-5.png",
"https://replicate.delivery/pbxt/NiclHa8HEZ6JPZN37TXMIg6QilUohdb1tkXfo6P6EpZAjIEIA/OutputImage-6.png",
"https://replicate.delivery/pbxt/J8eNgtsjxdXMdaai3bfb04YLMT8jktxa0JnHwvyifiEBMiQgA/OutputImage-7.png",
"https://replicate.delivery/pbxt/it5zBfuKZzWPKSQWPYKfjIHaBsm7TEfuvu6EfwjytpfFwICBC/OutputImage-8.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2022-12-09T16:13:45.099642Z",
"started_at": "2022-12-09T16:16:43.262771Z",
"completed_at": "2022-12-09T16:17:04.887479Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/zne6gnrn5vfbdpe6tn2hihwvai/cancel",
"get": "https://api.replicate.com/v1/predictions/zne6gnrn5vfbdpe6tn2hihwvai"
},
"metrics": {
"predict_time": 21.624708,
"total_time": 199.787837
}
}







