Moderations

Moderations

The moderations endpoint is a tool you can use to check whether content complies with an LLM Providers policies.

Quick Start

curl --location 'http://0.0.0.0:4000/moderations'     --header 'Content-Type: application/json'     --header 'Authorization: Bearer sk-1234'     --data '{"input": "Sample text goes here", "model": "text-moderation-stable"}'
POST/moderations
Authorization
Response

Successful Response

Body
any
Request
const response = await fetch('/moderations', {
    method: 'POST',
    headers: {},
});
const data = await response.json();

Moderations

The moderations endpoint is a tool you can use to check whether content complies with an LLM Providers policies.

Quick Start

curl --location 'http://0.0.0.0:4000/moderations'     --header 'Content-Type: application/json'     --header 'Authorization: Bearer sk-1234'     --data '{"input": "Sample text goes here", "model": "text-moderation-stable"}'
POST/v1/moderations
Authorization
Response

Successful Response

Body
any
Request
const response = await fetch('/v1/moderations', {
    method: 'POST',
    headers: {},
});
const data = await response.json();