Skip to content
HALOWERK

Denkwerk

language token tax

Give the same content in 2 to 12 languages. Each sample is language-identified with franc-min (ISO 639-3) unless declared, tokenized with the selected tokenizers and compared with the reference sample (default: the English sample, else the first): ratio, surcharge in percent, tokens per word and characters per token. With a monthly reference volume and price the projected tokens and cost per language are added. Samples whose length deviates strongly from the reference are flagged because.

POST https://denk.halowerk.com/v1/language-token-tax

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
samplesarrayYes
referenceSee schemaNoIndex or language code of the reference sample.
tokenizersarrayNoTokenizers to use.
monthly_reference_tokensnumberNo
price_per_mtok_usdnumberNo
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "samples"
  ],
  "properties": {
    "samples": {
      "type": "array",
      "minItems": 2,
      "maxItems": 12,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50000,
            "description": "UTF-8 text."
          },
          "language": {
            "type": "string",
            "pattern": "^[a-z]{2,3}$",
            "description": "Declared language code (optional)."
          },
          "label": {
            "type": "string",
            "maxLength": 60
          }
        }
      }
    },
    "reference": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 11
        },
        {
          "type": "string",
          "pattern": "^[a-z]{2,3}$"
        }
      ],
      "description": "Index or language code of the reference sample."
    },
    "tokenizers": {
      "type": "array",
      "minItems": 1,
      "maxItems": 12,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "o200k_base",
          "cl100k_base",
          "p50k_base",
          "r50k_base",
          "qwen2.5",
          "deepseek-v3",
          "mistral-tekken",
          "falcon",
          "gpt-neox",
          "yi-1.5",
          "granite-3.3",
          "glm-4.5"
        ],
        "description": "Tokenizer id; see supported_tokenizers in the token-count-multi result."
      },
      "description": "Tokenizers to use.",
      "default": [
        "o200k_base",
        "cl100k_base",
        "qwen2.5",
        "mistral-tekken",
        "deepseek-v3"
      ]
    },
    "monthly_reference_tokens": {
      "type": "number",
      "minimum": 0,
      "maximum": 10000000000000
    },
    "price_per_mtok_usd": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000
    }
  }
}

Open original schema

Published input example

{
  "samples": [
    {
      "text": "The invoice is payable within 14 days without deduction.",
      "label": "EN"
    },
    {
      "text": "Die Rechnung ist innerhalb von 14 Tagen ohne Abzug zu bezahlen.",
      "label": "DE"
    }
  ],
  "tokenizers": [
    "o200k_base",
    "qwen2.5"
  ]
}

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 โ†’