MODERATION
https://api.hyprlab.io/v1https://api.hyprlab.io/v1/moderationsModerate Text Input:
curl https://api.hyprlab.io/v1/moderations \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HYPRLAB_API_KEY" \
-d '{
"model": "omni-moderation-latest",
"input": "...text to classify goes here..."
}'import OpenAI from "openai";
const openai = new OpenAI({
apiKey: "<HYPRLAB_API_KEY>",
baseURL: "https://api.hyprlab.io/v1",
});
const moderation = await openai.moderations.create({
model: "omni-moderation-latest",
input: "...text to classify goes here...",
});
console.log(moderation);Moderate Image and Text:
curl https://api.hyprlab.io/v1/moderations \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HYPRLAB_API_KEY" \
-d '{
"model": "omni-moderation-latest",
"input": [
{ "type": "text", "text": "...text to classify goes here..." },
{
"type": "image_url",
"image_url": {
"url": "https://example.com/image.png"
}
}
]
}'import OpenAI from "openai";
const openai = new OpenAI({
apiKey: "<HYPRLAB_API_KEY>",
baseURL: "https://api.hyprlab.io/v1",
});
const moderation = await openai.moderations.create({
model: "omni-moderation-latest",
input: [
{ type: "text", text: "...text to classify goes here..." },
{
type: "image_url",
image_url: {
url: "https://example.com/image.png"
// can also use base64 encoded image URLs
// url: "data:image/jpeg;base64,abcdefg..."
}
}
],
});
console.log(moderation);Moderation Models
Model Name:
Usage:
Max tokens:
Last updated
