curl --request POST \
--url https://api.budgetpixel.com/v1/moderations/nsfw \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"images": [
"<string>"
],
"prompt": "<string>",
"video": "<string>"
}
'import requests
url = "https://api.budgetpixel.com/v1/moderations/nsfw"
payload = {
"images": ["<string>"],
"prompt": "<string>",
"video": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({images: ['<string>'], prompt: '<string>', video: '<string>'})
};
fetch('https://api.budgetpixel.com/v1/moderations/nsfw', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.budgetpixel.com/v1/moderations/nsfw",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'images' => [
'<string>'
],
'prompt' => '<string>',
'video' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.budgetpixel.com/v1/moderations/nsfw"
payload := strings.NewReader("{\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"video\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.budgetpixel.com/v1/moderations/nsfw")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"video\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.budgetpixel.com/v1/moderations/nsfw")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"video\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"confidence": 123,
"credits_charged": 123,
"id": "<string>",
"label": "sfw",
"level": 0,
"reason": "<string>"
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}Rate content NSFW level
Rate text, images, and/or one video on BudgetPixel’s 4-level NSFW scale — the same classifier and scale the platform itself moderates with. Synchronous: the response carries the verdict.
Levels:
0(sfw) — safe for work. Non-sexual violence, action, and blood stay here.1(teen) — mildly suggestive (swimwear/underwear in a non-sexual context).2(mature) — partial nudity or overtly sexual posing, no genitals.3(x-rated) — explicit sexual content, visible genitals, or extreme gore.
Inputs (at least one required): prompt (text), images (up to 10, max 10 MB
each), video (one, max 100 MB and 5 minutes — 5 frames are sampled). Media
values accept a public URL, an uploaded-file URL from
POST /v1/uploads, a data URI, or raw
base64. Everything is downscaled before classification; the rating is for the
submission as a whole (highest applicable level), with one overall reason.
Pricing: 2 credits base + 3 per image + 15 for a video. Estimate via
POST /v1/cost with
{"model": "moderation-nsfw", "images": 2, "video": true}. Charged on success
only — a classifier failure costs nothing.
Submitted media is retained privately for ~1 day (for abuse review), then deleted automatically.
curl --request POST \
--url https://api.budgetpixel.com/v1/moderations/nsfw \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"images": [
"<string>"
],
"prompt": "<string>",
"video": "<string>"
}
'import requests
url = "https://api.budgetpixel.com/v1/moderations/nsfw"
payload = {
"images": ["<string>"],
"prompt": "<string>",
"video": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({images: ['<string>'], prompt: '<string>', video: '<string>'})
};
fetch('https://api.budgetpixel.com/v1/moderations/nsfw', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.budgetpixel.com/v1/moderations/nsfw",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'images' => [
'<string>'
],
'prompt' => '<string>',
'video' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.budgetpixel.com/v1/moderations/nsfw"
payload := strings.NewReader("{\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"video\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.budgetpixel.com/v1/moderations/nsfw")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"video\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.budgetpixel.com/v1/moderations/nsfw")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"video\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"confidence": 123,
"credits_charged": 123,
"id": "<string>",
"label": "sfw",
"level": 0,
"reason": "<string>"
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"code": "model_not_available",
"message": "<string>",
"type": "invalid_request_error"
}
}Authorizations
API key as a bearer token: Authorization: Bearer bpx_live_xxx
Body
Response
The rating.
Classifier confidence, 0-1.
Moderation request id (audit reference).
sfw, teen, mature, x-rated Overall NSFW level of the submission.
0, 1, 2, 3 Short overall explanation.