POST
/
api
/
v1
/
judge
/
safety

Parameters

  • conversation: A list of dictionaries representing the conversation in OpenAI format. Each dictionary should have the keys role and content.

  • response: The model’s response in OpenAI format. This is the text that will be judged for safety.

  • judge_id: The unique identifier for the judge. Learn more about obtaining a judge ID.

  • space_id: The unique identifier for your space. Learn more about obtaining a space ID.

Response

The API returns a JSON object with the following fields:

  • judgement: Indicates the safety judgement of the model’s output. Possible values are:

    • 1: Safe/Compliant
    • 0: Unsafe/Refusal
  • extra: Contains the raw output from the judge for further inspection.

  • category (Optional): Depending on the judge, this field may contain the category that was flagged for the response.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
conv_prefix
object[]
required
response
object
required
judge_id
string
required
space_id
string
required

Response

200
application/json
Successful Response
judgement
integer
required
extra
object | null
category
string | null