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>"
}
]
}
}Initiates a streaming job that processes content data and returns results as they become available. Useful for real-time content evaluation.
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>"
}
]
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The content data to be evaluated. Only one content type should be set per entry.
Show child attributes
A text string to process.
A binary image file to process.
A publicly-accessible URL that points to an image.
The threshold to use for truthyness. If not set a default value will be used.
If set, the job will be evaluated in expedited mode, prioritizing speed over cost.
A successful response.(streaming responses)
Show child attributes
A report on the result of evaluating a policy against a piece of content/input.
Show child attributes
This is the title of the policy as it appears in the policy editor. Do not use this to identify a policy. Use the policy_id instead.
Evaluation outcome. TRUE, FALSE or FAILED.
OUTCOME_UNSPECIFIED, OUTCOME_FALSE, OUTCOME_TRUE, OUTCOME_FAILED Reports on the evaluation of each SECTION or LABEL block in the policy.
Show child attributes
Evaluation outcome. TRUE, FALSE or FAILED.
OUTCOME_UNSPECIFIED, OUTCOME_FALSE, OUTCOME_TRUE, OUTCOME_FAILED Each assertion in each section is evaluated
Show child attributes
Evaluation outcome. TRUE, FALSE or FAILED.
OUTCOME_UNSPECIFIED, OUTCOME_FALSE, OUTCOME_TRUE, OUTCOME_FAILED The text of the assertion.
Outcome of an EXCEPT WHEN or UNLESS block, if present.
Show child attributes
Evaluation outcome. TRUE, FALSE or FAILED.
OUTCOME_UNSPECIFIED, OUTCOME_FALSE, OUTCOME_TRUE, OUTCOME_FAILED Each assertion in the exception is evaluated
Show child attributes
Evaluation outcome. TRUE, FALSE or FAILED.
OUTCOME_UNSPECIFIED, OUTCOME_FALSE, OUTCOME_TRUE, OUTCOME_FAILED The text of the assertion.
Report on the result of a single assertion in a policy.
Show child attributes
Evaluation outcome. TRUE, FALSE or FAILED.
OUTCOME_UNSPECIFIED, OUTCOME_FALSE, OUTCOME_TRUE, OUTCOME_FAILED Report on the result of a single assertion in a policy.
Show child attributes
Evaluation outcome. TRUE, FALSE or FAILED.
OUTCOME_UNSPECIFIED, OUTCOME_FALSE, OUTCOME_TRUE, OUTCOME_FAILED Outcome of an EXCEPT WHEN or UNLESS block, if present.
Show child attributes
Evaluation outcome. TRUE, FALSE or FAILED.
OUTCOME_UNSPECIFIED, OUTCOME_FALSE, OUTCOME_TRUE, OUTCOME_FAILED Each assertion in the exception is evaluated
Show child attributes
Evaluation outcome. TRUE, FALSE or FAILED.
OUTCOME_UNSPECIFIED, OUTCOME_FALSE, OUTCOME_TRUE, OUTCOME_FAILED The text of the assertion.
Report on the result of a single assertion in a policy.
Show child attributes
Evaluation outcome. TRUE, FALSE or FAILED.
OUTCOME_UNSPECIFIED, OUTCOME_FALSE, OUTCOME_TRUE, OUTCOME_FAILED The hashing algorithm used will appear at the front of the hash value in this field (i.e., 'fnv1a128::hash-value')
Report on the result of a single assertion in a policy.
Show child attributes
Labels that matched the content. The keys of the map are the label names, and the values are the scores for each label. This field provides a simple way to identify which labels matched the content without the need to dig into each section report.
Show child attributes
Usage related to this policy evaluation.
Show child attributes
The number of tokens that were sent to the service in the form of content.
The number of tokens that Clavata billed for this evaluation.
The policy complexity multiplier that was used to calculate the final billed tokens.