v2

latestOpenAPI 3.0.0Commercial2026-07-2649110209.4 KB
Moderation

Screen a prompt

Evaluate a text prompt against content policies before generation. This endpoint is experimental and may change.

post/v1/moderation/prompt

Request body

promptstring required

The text prompt to evaluate against content policies.

external_idstring

An optional identifier to associate this request with.

Response

Prompt screening result

idstring required

Unique identifier for the moderation result.

objectstring required

Object type.

promptstring required

The prompt that was screened.

external_idstring

The external identifier provided in the request.

decision'allow' | 'deny' | 'flag' required

The moderation decision.

Example response

{
  "object": "moderation_result"
}