QualityGate

Validate agent output

Validates agent output against one or more check types. Credit costs: directive_compliance=1, schema_validation=1, code_syntax=1, length=1, tone=8, factual_claims=8. Total = sum of requested checks. Returns HTTP 422 when verdict is 'fail'.

post/api/qualitygate/validate

Request

  • Base URL: https://plith.ai
  • URL: https://plith.ai/api/qualitygate/validate
  • Auth: none required

Request body

outputstring required

The agent output text to validate.

schemaobject

JSON Schema object. Required for schema_validation check.

languagestring

Source language. Required for code_syntax check. Supported: json, python, javascript, typescript.

check_typesstring[]

Which checks to run. Auto-inferred from provided parameters if omitted.

overrideboolean

Force verdict to 'pass' regardless of score. Requires override_reason.

override_reasonstring

Required when override is true.

Response

Validation passed or warned

validation_idstring uuid nullable
scorenumber
verdict'pass' | 'warn'
checks_runstring[]
cross_productobject
request_idstring
credits_usedinteger
credits_remaininginteger
fallback_behaviorstring

Example response

{
  "fallback_behavior": "proceed_without_validation"
}

Changes

No recorded changes to this operation across all 1 revision of this API.