Skip to content
HALOWERK

Textwerk

ticket route

Category scores are cosine similarities of embeddings computed locally with intfloat/multilingual-e5-small (MIT, about 100 languages, "query: " prefix as the model card prescribes for classification, mean pooling, int8 ONNX from the model repository, pinned revision, SHA-256 checked): message vs. "label: description", and, if examples are given, the best-matching example; with examples the score is 0.5 x description + 0.5 x best example. A small margin between the first two categories sets.

POST https://text.halowerk.com/v1/ticket-route

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
messagestringYes
categoriesarrayYes
min_marginnumberNoBelow this gap between rank 1 and 2 the ticket is flagged for review.
top_kintegerNo
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "message",
    "categories"
  ],
  "properties": {
    "message": {
      "type": "string",
      "minLength": 1,
      "maxLength": 8000
    },
    "categories": {
      "type": "array",
      "minItems": 2,
      "maxItems": 50,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "label"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "team": {
            "type": "string",
            "maxLength": 100
          },
          "examples": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1000
            }
          }
        }
      }
    },
    "min_margin": {
      "type": "number",
      "minimum": 0,
      "maximum": 0.2,
      "default": 0.01,
      "description": "Below this gap between rank 1 and 2 the ticket is flagged for review."
    },
    "top_k": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "default": 3
    }
  }
}

Open original schema

Published input example

{
  "message": "Mir wurde der Betrag für März doppelt abgebucht.",
  "categories": [
    {
      "id": "billing",
      "label": "Rechnung und Zahlung",
      "description": "Fragen zu Rechnungen, Abbuchungen, Erstattungen",
      "team": "Buchhaltung"
    },
    {
      "id": "tech",
      "label": "Technischer Support",
      "description": "Login, Fehlermeldungen, App-Probleme",
      "team": "IT"
    }
  ]
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub →