> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nitrotranslate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Calculate

> Estimate translation cost per target language.



## OpenAPI

````yaml POST /v1/calculate
openapi: 3.1.0
info:
  title: NitroTranslate API
  description: Human Translation API
  version: 0.1.1
servers:
  - url: https://api.nitrotranslate.com
    description: NitroTranslate
security:
  - BasicAuth: []
  - BearerAuth: []
  - PaymentAuth: []
paths:
  /v1/calculate:
    post:
      summary: Calculate
      description: Estimate translation cost per target language.
      operationId: TranslationService_Calculate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/nitrotranslate.v1.CalculateRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/nitrotranslate.v1.Calculation'
                title: calculations
components:
  schemas:
    nitrotranslate.v1.CalculateRequest:
      type: object
      properties:
        source_language:
          type: string
          title: source_language
          enum:
            - af
            - ar
            - az
            - be
            - bg
            - bn
            - ca
            - cs
            - da
            - de
            - el
            - en
            - es-ES
            - es-MX
            - et
            - fa
            - fi
            - fr
            - fr-CA
            - he
            - hi
            - hr
            - hu
            - hy-AM
            - id
            - is
            - it
            - ja
            - ka
            - kk
            - ko
            - ky
            - lt
            - lv
            - ml-IN
            - ms
            - my
            - nl
            - 'no'
            - pl
            - pt-BR
            - pt-PT
            - ro
            - ru
            - sk
            - sl
            - sr
            - sr-CS
            - sv-SE
            - ta
            - tg
            - th
            - tl
            - tr
            - te
            - uk
            - ur-PK
            - uz
            - vi
            - zh-CN
            - zh-TW
        target_languages:
          type: array
          items:
            type: string
            enum:
              - af
              - ar
              - az
              - be
              - bg
              - bn
              - ca
              - cs
              - da
              - de
              - el
              - en
              - es-ES
              - es-MX
              - et
              - fa
              - fi
              - fr
              - fr-CA
              - he
              - hi
              - hr
              - hu
              - hy-AM
              - id
              - is
              - it
              - ja
              - ka
              - kk
              - ko
              - ky
              - lt
              - lv
              - ml-IN
              - ms
              - my
              - nl
              - 'no'
              - pl
              - pt-BR
              - pt-PT
              - ro
              - ru
              - sk
              - sl
              - sr
              - sr-CS
              - sv-SE
              - ta
              - tg
              - th
              - tl
              - tr
              - te
              - uk
              - ur-PK
              - uz
              - vi
              - zh-CN
              - zh-TW
          title: target_languages
          minItems: 1
        resource:
          $ref: '#/components/schemas/nitrotranslate.v1.Resource'
          title: resource
      title: CalculateRequest
      required:
        - source_language
        - resource
      additionalProperties: false
    nitrotranslate.v1.Calculation:
      type: object
      properties:
        source_language:
          type: string
          title: source_language
        target_language:
          type: string
          title: target_language
        volume:
          type: integer
          title: volume
          format: int32
          description: Billable character volume.
        price:
          type: number
          title: price
          format: double
          description: Estimated price in US dollars.
      title: Calculation
      additionalProperties: false
      description: Per-language-pair cost estimate produced by Calculate.
    nitrotranslate.v1.Resource:
      type: object
      properties:
        type:
          type: string
          title: type
          enum:
            - text/plain
            - text/html
            - text/x-objcstrings
            - application/json
          description: Resource MIME type; one of the supported content types.
        data:
          type: string
          title: data
          description: The resource payload.
        metadata:
          type:
            - string
            - 'null'
          title: metadata
          description: Optional caller-defined metadata echoed back on the order.
      title: Resource
      required:
        - type
        - data
      additionalProperties: false
      description: >-
        The content to be translated. `data` is interpreted according to its
        MIME
         `type` (e.g. text/plain, text/html, application/json).
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: opaque
    PaymentAuth:
      type: http
      description: >-
        MPP payment authorization, sent as `Authorization: Payment
        <credential>`.
      scheme: payment

````