typefile
{
"safety_tolerance": 2,
"video": "https://replicate.delivery/pbxt/MeYrKketDRwUdUPYlHEsA0UlcD4eOlFegxJwvJzFuhL1en1O/falcon2.mp4"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Nkb**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run lucataco/nsfw_video_detection using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/nsfw_video_detection:ef94e6bbf329eebc092601a647996431056a58f479d0f4129ea6e8171374d158",
{
input: {
safety_tolerance: 2,
video: "https://replicate.delivery/pbxt/MeYrKketDRwUdUPYlHEsA0UlcD4eOlFegxJwvJzFuhL1en1O/falcon2.mp4"
}
}
);
console.log(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_Nkb**********************************
This is your API token. Keep it to yourself.
import replicate
Run lucataco/nsfw_video_detection using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/nsfw_video_detection:ef94e6bbf329eebc092601a647996431056a58f479d0f4129ea6e8171374d158",
input={
"safety_tolerance": 2,
"video": "https://replicate.delivery/pbxt/MeYrKketDRwUdUPYlHEsA0UlcD4eOlFegxJwvJzFuhL1en1O/falcon2.mp4"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Nkb**********************************
This is your API token. Keep it to yourself.
Run lucataco/nsfw_video_detection 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": "lucataco/nsfw_video_detection:ef94e6bbf329eebc092601a647996431056a58f479d0f4129ea6e8171374d158",
"input": {
"safety_tolerance": 2,
"video": "https://replicate.delivery/pbxt/MeYrKketDRwUdUPYlHEsA0UlcD4eOlFegxJwvJzFuhL1en1O/falcon2.mp4"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
normal
{
"id": "hb07340spsrgc0cnj1ptqr186m",
"model": "lucataco/nsfw_video_detection",
"version": "ef94e6bbf329eebc092601a647996431056a58f479d0f4129ea6e8171374d158",
"input": {
"safety_tolerance": 2,
"video": "https://replicate.delivery/pbxt/MeYrKketDRwUdUPYlHEsA0UlcD4eOlFegxJwvJzFuhL1en1O/falcon2.mp4"
},
"logs": "",
"output": "normal",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-03-13T16:53:43.99Z",
"started_at": "2025-03-13T16:53:44.004852Z",
"completed_at": "2025-03-13T16:53:44.65514Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/hb07340spsrgc0cnj1ptqr186m/cancel",
"get": "https://api.replicate.com/v1/predictions/hb07340spsrgc0cnj1ptqr186m",
"web": "https://replicate.com/p/hb07340spsrgc0cnj1ptqr186m"
},
"metrics": {
"predict_time": 0.650287161,
"total_time": 0.66514
}
}