An Azure service to easily conduct machine translation with a simple REST API call.
Azure Translator counts Unicode code points as characters for text translation billing and usage accounting.
For submitted source text:
- Unicode code points: counted.
- UTF-16 code units: not the stated billing/counting unit.
- Unicode grapheme clusters: not the stated billing/counting unit.
Count behavior:
- Supplementary-plane characters / surrogate pairs: counted by Unicode code points, with one documented exception in counting behavior: Unicode surrogate pairs count as two characters.
- Combining-mark sequences vs. precomposed characters: counting is based on Unicode code points, so sequences such as
e+ combining acute are counted by the number of code points in the sequence, while precomposedéis counted as its single code point. - Unicode normalization: no normalization step or normalization form is documented for character counting. No supported statement confirms that input is normalized before counting.
- Whitespace: counted. This includes spaces, tabs, markup, and any white-space character.
- Markup inside the submitted
Textfield: counted. HTML, XML tags, and other markup within the request body text field are included in the count. JSON notation used to build the request, such as the key nameText, is not counted.
The same counting method applies across text translation usage accounting:
- Azure Translator states that translations using general NMT models are billed according to the number of characters in the source text.
- The Translator metrics definition for CharactersTranslated is the total number of characters in incoming text request.
- The FAQ defines character counting as Unicode code points and describes exactly what is included.
For the F0 monthly allowance versus paid text translation tiers:
- The provided documentation states the counting methodology for Azure Translator character usage generally and states that NMT translations are billed by source-text characters.
- The provided context does not explicitly state, in one sentence, that the F0 2,000,000-character monthly allowance, paid tiers, and the
X-metered-usageheader all use the exact same counting implementation. - The supported authoritative basis for a hard pre-call quota control is therefore: count submitted source text as Azure defines it in the FAQ—Unicode code points, including whitespace and markup in the text field, with surrogate pairs counted as two characters—and treat each translation as a separate translation.
Also relevant for pre-call enforcement:
- A repeated translation is counted again, even if the content is unchanged or the source and target language are the same.
- If a single request translates to multiple target languages, each translation counts separately.
-
DetectandBreakSentencecalls are not counted in character consumption.
References: