POST/v1/tags/evaluate

Evaluate tags on sample text

Score text against up to 32 tags. It is the same check a live request gets, so use it to tune a question and to pick a threshold. The text goes to a decision model that Experiential hosts, and is not stored.

Authentication: Bearer API key in the Authorization header

Request body

  • tagsarray<string>required

    The tag ids to score.

  • inputstringrequired

    The text to check, as it would appear in one message of a request.

Responses

  • 200

    One result per tag, in the order you sent them.

    Response
    • resultsarray<object>required
      results
      • tagstringrequired
      • probabilitynumberrequired

        The probability, from 0 to 1, that the answer to the tag's question is yes.

  • 401

    Missing, unknown or revoked API key.

  • 403

    The key is not a provisioning key, or the resource is read-only (tag_read_only, guardrail_read_only).

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one.

  • 404

    The resource does not exist or belongs to another organization. An organization without access gets this answer on every route.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one.

  • 422

    The body failed validation, or it names something that does not exist or cannot be used (unknown_tag, unknown_model, unknown_identity, model_not_allowed).

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one.

  • 503

    The check could not run. Retry with backoff.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one.

Request

curl -X POST 'https://api.experientiallabs.ai/v1/tags/evaluate' \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "tags": [
    "internalConfidential",
    "personalData"
  ],
  "input": "Draft the board update. Revenue was 4.2M against a 5M plan and we are pausing the Atlas launch."
}'

Response

{
  "results": [
    {
      "tag": "internalConfidential",
      "probability": 0.96
    },
    {
      "tag": "personalData",
      "probability": 0.02
    }
  ]
}

https://api.experientiallabs.ai/v1/tags/evaluate