typefile
{
"image": "https://replicate.delivery/pbxt/NPdqtddTuoQDk78VEw9YwecOz4oDkl5Vh6X85vKD6pUsz5Y6/image.png"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_AyZ**********************************
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 fofr/flying-meta-cars using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
image: "https://replicate.delivery/pbxt/NPdqtddTuoQDk78VEw9YwecOz4oDkl5Vh6X85vKD6pUsz5Y6/image.png"
};
const output = await replicate.run("fofr/flying-meta-cars", { 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_AyZ**********************************
This is your API token. Keep it to yourself.
import replicate
Run fofr/flying-meta-cars using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"fofr/flying-meta-cars",
input={
"image": "https://replicate.delivery/pbxt/NPdqtddTuoQDk78VEw9YwecOz4oDkl5Vh6X85vKD6pUsz5Y6/image.png"
}
)
# 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_AyZ**********************************
This is your API token. Keep it to yourself.
Run fofr/flying-meta-cars 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": {
"image": "https://replicate.delivery/pbxt/NPdqtddTuoQDk78VEw9YwecOz4oDkl5Vh6X85vKD6pUsz5Y6/image.png"
}
}' \
https://api.replicate.com/v1/models/fofr/flying-meta-cars/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "smvhgc8cp9rme0cr7dyr4g2zqg",
"model": "fofr/flying-meta-cars",
"version": "hidden",
"input": {
"image": "https://replicate.delivery/pbxt/NPdqtddTuoQDk78VEw9YwecOz4oDkl5Vh6X85vKD6pUsz5Y6/image.png"
},
"logs": "",
"output": "https://replicate.delivery/xezq/LaQTApVm2ZaoM9m5b3ANhaN4NaXjHjedyZrNcBVOuwdK68hKA/tmp0r19onh2.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-07-24T08:11:47.762Z",
"started_at": "2025-07-24T08:11:48.428874Z",
"completed_at": "2025-07-24T08:13:08.475979Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/smvhgc8cp9rme0cr7dyr4g2zqg/cancel",
"children": "https://api.replicate.com/v1/predictions/smvhgc8cp9rme0cr7dyr4g2zqg/children",
"get": "https://api.replicate.com/v1/predictions/smvhgc8cp9rme0cr7dyr4g2zqg",
"root": "https://api.replicate.com/v1/predictions/smvhgc8cp9rme0cr7dyr4g2zqg",
"stream": "https://stream.replicate.com/v1/files/bcwr-tay5nklntxklba3fk5fuxnms7kffdprlycpidkurkhu5vjoy7dna",
"web": "https://replicate.com/p/smvhgc8cp9rme0cr7dyr4g2zqg"
},
"metrics": {
"predict_time": 80.047105456,
"total_time": 80.713979
}
}