Skip to main content
POST
/
v1
/
jobs
/
stream
Stream job results in real-time
curl --request POST \
  --url https://gateway.app.clavata.ai:8443/v1/jobs/stream \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contentData": [
    {
      "text": "<string>",
      "image": "aSDinaTvuI8gbWludGxpZnk=",
      "imageUrl": "<string>",
      "metadata": {}
    }
  ],
  "policyId": "<string>",
  "threshold": 123,
  "expedited": true,
  "options": {
    "options": {}
  }
}
'
{
  "result": {
    "jobUuid": "<string>",
    "contentHash": "<string>",
    "policyEvaluationReport": {
      "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
      }
    }
  },
  "error": {
    "code": 123,
    "message": "<string>",
    "details": [
      {
        "@type": "<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

The content data to be evaluated. Only one content type should be set per entry.

policyId
string
required
threshold
number<double>

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

expedited
boolean

If set, the job will be evaluated in expedited mode, prioritizing speed over cost.

options
object

Options for evaluation behavior.

Response

A successful response.(streaming responses)

result
object
error
object