Skip to main content
POST
/
v1
/
labels
/
evaluate
Evaluate labels
curl --request POST \
  --url https://gateway.app.clavata.ai:8443/v1/labels/evaluate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contentData": {
    "text": "<string>",
    "image": "aSDinaTvuI8gbWludGxpZnk=",
    "imageUrl": "<string>",
    "metadata": {}
  },
  "threshold": 123,
  "labelVersionIds": [
    "<string>"
  ],
  "labelEvalOptions": {
    "bypassCache": true,
    "expedited": true,
    "bundleSize": 123,
    "threshold": 123,
    "stack": "<string>"
  },
  "globalContext": "<string>"
}
'
{
  "contentHash": "<string>",
  "results": [
    {
      "labelId": "<string>",
      "labelVersionId": "<string>",
      "jobUuid": "<string>",
      "evaluation": {
        "score": 123,
        "outcome": "OUTCOME_UNSPECIFIED",
        "threshold": 123,
        "report": {
          "policyId": "<string>",
          "policyKey": "<string>",
          "policyVersionId": "<string>",
          "result": "OUTCOME_UNSPECIFIED",
          "sectionEvaluationReports": [
            {
              "name": "<string>",
              "result": "OUTCOME_UNSPECIFIED",
              "message": "<string>",
              "assertionEvaluationReports": [
                {
                  "result": "OUTCOME_UNSPECIFIED",
                  "message": "<string>",
                  "score": 123
                }
              ],
              "exceptionEvaluationReport": {
                "result": "OUTCOME_UNSPECIFIED",
                "assertionEvaluationReports": [
                  {
                    "result": "OUTCOME_UNSPECIFIED",
                    "message": "<string>",
                    "score": 123
                  }
                ],
                "reviewResult": {
                  "outcome": "OUTCOME_UNSPECIFIED",
                  "score": 123
                }
              },
              "reviewResult": {
                "outcome": "OUTCOME_UNSPECIFIED",
                "score": 123
              }
            }
          ],
          "exceptionEvaluationReport": {
            "result": "OUTCOME_UNSPECIFIED",
            "assertionEvaluationReports": [
              {
                "result": "OUTCOME_UNSPECIFIED",
                "message": "<string>",
                "score": 123
              }
            ],
            "reviewResult": {
              "outcome": "OUTCOME_UNSPECIFIED",
              "score": 123
            }
          },
          "contentHash": "<string>",
          "contentMetadata": {},
          "reviewResult": {
            "outcome": "OUTCOME_UNSPECIFIED",
            "score": 123
          },
          "threshold": 123,
          "labelMatches": {},
          "tokenUsage": {
            "inputTokens": 123,
            "billedTokens": 123,
            "multiplier": 123
          },
          "labelId": "<string>",
          "labelVersionId": "<string>"
        }
      },
      "error": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json
contentData
Content Data · object
required

A single piece of content to be processed by the Clavata.ai API.

threshold
number<double>

The threshold to use for truthiness. If not set a default value will be used.

labelVersionIds
string[]

IDs of the published label versions to evaluate against. Maximum 10 per request.

labelEvalOptions
object

LabelEvalOptions are options that can be set per-label to control evaluation behavior. Field numbers/types intentionally mirror PolicyEvalOptions for parity.

globalContext
string

Optional global context override for this evaluation call.

Response

A successful response.

contentHash
string

The hash of the content that was evaluated.

results
object[]

Ordered results, one per requested label_version_ids entry.