Perspective Compatibility Analyse
Accept a Google Perspective-style analyse request and return a Google-style response, while translating onto Respectify's scoring pipeline.
This endpoint is intended for easier migration from raw Perspective HTTP integrations. It preserves Google's wire shape as closely as currently supported, but it is not a claim of full behavioural parity.
Supported today: canonical Perspective attributes, preserved alias names, scoreThreshold, spanAnnotations, HTML text entries, and explicit languages when supplied.
Current limitations: only PROBABILITY score types are supported. In practice, that means 0 to 1 scores where higher values mean more of the requested attribute. Other score types are rejected. Respectify does not claim language detection when languages is omitted; compatibility responses fall back to the default English-oriented moderation context instead. doNotStore is accepted; in practice, analyse traffic is currently treated as though doNotStore were always true, because it is not retained for training. sessionId and communityId are accepted as request metadata for traceability, but they do not change scoring behaviour. dropUnsupportedAttributes is accepted, and current compat handling is already permissive in common flows.
| Header Parameters |
|---|
X-User-Email email — REQUIREDAccount email address, for authentication |
X-API-Key string — REQUIREDAPI key owned by the user (email), for authentication |
| Request Body — REQUIRED | ||||
|---|---|---|---|---|
comment — REQUIREDPerspective-style comment input. String entries and | ||||
requestedAttributes objectGoogle-style requested attribute map, for example | ||||
context object
| ||||
spanAnnotations booleanWhen true, include Google-style | ||||
languages string[]Optional list of requested languages. Preserved in the response when supplied. | ||||
clientToken stringOpaque caller token echoed back in the response. | ||||
doNotStore booleanAccepted for compatibility. Respectify does not currently use analyse traffic for training, so this flag does not change today's scoring path. | ||||
sessionId stringAccepted for compatibility as request metadata for traceability. Does not affect scoring behaviour. | ||||
communityId stringAccepted for compatibility as request metadata for traceability. Does not affect scoring behaviour. | ||||
dropUnsupportedAttributes booleanAccepted for compatibility. Current compat handling is already permissive and ignores unsupported attributes in common flows. |
| Responses | |||||
|---|---|---|---|---|---|
200Google-style compatibility response
| |||||
400Google-style compatibility error, including unsupported non-PROBABILITY score types. |