Skip to main content
POST
/
moderations
Create moderation
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    model: '<string>',
    input: '<string>',
    meta: false,
    debug: {
      enabled: true,
      return_upstream_request: true,
      return_upstream_response: true,
      trace: true,
      trace_level: 'summary'
    },
    provider: {
      order: ['<string>'],
      only: ['<string>'],
      ignore: ['<string>'],
      include_alpha: true
    }
  })
};

fetch('https://api.phaseo.app/v1/moderations', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "id": "<string>",
  "model": "<string>",
  "results": [
    {
      "flagged": true,
      "categories": {
        "hate": true,
        "hate/threatening": true,
        "harassment": true,
        "harassment/threatening": true,
        "self-harm": true,
        "self-harm/intent": true,
        "self-harm/instructions": true,
        "sexual": true,
        "sexual/minors": true,
        "violence": true,
        "violence/graphic": true
      },
      "category_scores": {
        "hate": 123,
        "hate/threatening": 123,
        "harassment": 123,
        "harassment/threatening": 123,
        "self-harm": 123,
        "self-harm/intent": 123,
        "self-harm/instructions": 123,
        "sexual": 123,
        "sexual/minors": 123,
        "violence": 123,
        "violence/graphic": 123
      }
    }
  ]
}
This endpoint evaluates text input against provider moderation policies and returns gateway-normalised safety scores. See the OpenAPI spec for full request/response schemas.

Authorizations

Authorization
string
header
required

Bearer token authentication

Body

application/json
model
string
required
input
required
meta
boolean
default:false
debug
object

Gateway debug controls. These flags are never forwarded upstream.

provider
object

Provider routing preferences for gateway selection.

Response

200 - application/json

Moderation response

id
string
model
string
results
object[]
Last modified on February 11, 2026