Character count and cost estimation for Azure Translate API

Vikas Sharma 0 Reputation points
2025-12-15T09:38:59.5033333+00:00

I am using the Microsoft translator API. I wanted to know how I can get the accurate character count and cost estimation for each translation.

Azure AI Translator
Azure AI Translator
An Azure service to easily conduct machine translation with a simple REST API call.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Anshika Varshney 4,425 Reputation points Microsoft External Staff Moderator
    2025-12-15T10:05:22.95+00:00

    Hi Vikas Sharma,

    Welcome to Microsoft Q&A and Thank you for reaching out.

    It looks like you want to know how to accurately count characters and estimate costs when using the Microsoft Translator API. Here’s a breakdown of how you can achieve that.

    Character Count

    1. Character Counting Method: Azure Translator counts every code point defined in Unicode as a character, which includes:
      • The text passed in the request.
      • HTML and XML tags.
      • Individual letters, punctuation, spaces, and any white-space characters.
      • Each translation counts as a separate transaction, even if you translate the same text multiple times.
    2. Getting Sentence Lengths:
      • You can obtain character counts for source text and translation using the translate endpoint by setting the includeSentenceLength parameter to True. This will return the character count for each sentence detected.
      • To get sentence lengths without translating, you can use the breaksentence endpoint, which simply provides the character count for the source text.

    Cost Estimation

    • Character-Based Billing: Costs are based on character count, not requests. Each translation request has a cap of 50,000 characters. For example, translating 3,000 characters into three different languages would count as 9,000 characters.
    • Subscription Character Limits:
      • Free Tier (F0): 2 million characters per month.
      • Standard Tier (S1): 40 million characters per hour.
      • There are higher tiers available that allow for more characters, which might be beneficial if you do extensive translations.

    Resources

    I Hope this helps. Do let me know if you have any further queries.


    If this answers your query, please do click Accept Answer and Yes for was this answer helpful.

    Thank you!


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.