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

# Persona Message Translation

> Translates the latest persona message into the target language, using the prior conversation as context.



## OpenAPI

````yaml POST /cs/v1/smart_translations/persona
openapi: 3.1.0
info:
  title: DumGum
  version: '2.0'
servers:
  - url: https://api.dumgum.com
security:
  - bearerAuth: []
paths:
  /cs/v1/smart_translations/persona:
    post:
      tags:
        - smart-translations
      summary: Translate a persona message
      description: >-
        Translates the latest persona message into the target language, using
        the prior conversation as context.
      operationId: smart-translations-translate-persona
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SmartTranslationRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SmartTranslationResponse'
components:
  schemas:
    SmartTranslationRequest:
      type: object
      description: A conversation to translate, with its source and target languages.
      properties:
        source_language:
          type: string
          description: >-
            Source language. See [supported
            languages](/content-creation/supported-languages) guides for full
            language names.
          enum:
            - EN
            - EN_GB
            - FR
            - FR_BE
            - RO
            - NL
            - ES
            - DE
            - DE_CH
            - DE_AT
            - IT
            - ES_LATAM
            - BG
            - HE
            - JA
            - NL_BE
            - EN_AU
            - PT_PT
            - PT_BR
            - SV_SE
            - DA_DK
            - FI_FI
            - PL_PL
            - LT_LT
            - NB_NO
            - NN_NO
            - SL_SI
            - HU
            - HU_HU
            - CS_CZ
            - EL_GR
            - EL_GR_LATIN
            - EL_GR_GREEK
            - HR_HR
            - TR_TR
            - EN_IE
            - AF_ZA
            - ZU_ZA
            - LV_LV
            - SK_SK
            - GA_IE
            - SR_RS
            - ET_EE
            - EN_CA
            - FR_CA
            - RU_RU
            - UA_UA
          example: EN
        target_language:
          type: string
          description: >-
            Target language. See [supported
            languages](/content-creation/supported-languages) guides for full
            language names.
          enum:
            - EN
            - EN_GB
            - FR
            - FR_BE
            - RO
            - NL
            - ES
            - DE
            - DE_CH
            - DE_AT
            - IT
            - ES_LATAM
            - BG
            - HE
            - JA
            - NL_BE
            - EN_AU
            - PT_PT
            - PT_BR
            - SV_SE
            - DA_DK
            - FI_FI
            - PL_PL
            - LT_LT
            - NB_NO
            - NN_NO
            - SL_SI
            - HU
            - HU_HU
            - CS_CZ
            - EL_GR
            - EL_GR_LATIN
            - EL_GR_GREEK
            - HR_HR
            - TR_TR
            - EN_IE
            - AF_ZA
            - ZU_ZA
            - LV_LV
            - SK_SK
            - GA_IE
            - SR_RS
            - ET_EE
            - EN_CA
            - FR_CA
            - RU_RU
            - UA_UA
          example: FR
        messages:
          type: array
          description: >-
            The conversation messages, oldest first. The last message must be
            authored by the side matching the route ('user' for /user, 'persona'
            for /persona).
          items:
            $ref: '#/components/schemas/SmartTranslationMessage'
        tags:
          type: object
          additionalProperties:
            type: string
          description: Optional key/value tags attached to the request.
        user_gender:
          type: string
          description: >-
            Gender of the user (subscriber). Used to apply the correct
            grammatical gender, agreement, and forms of address in the target
            language.
          enum:
            - WOMAN
            - MAN
          example: MAN
        persona_gender:
          type: string
          description: >-
            Gender of the persona (animator). Used to apply the correct
            grammatical gender, agreement, and forms of address in the target
            language.
          enum:
            - WOMAN
            - MAN
          example: WOMAN
      required:
        - messages
        - persona_gender
        - source_language
        - target_language
        - user_gender
    SmartTranslationResponse:
      type: object
      description: The translated text and the cost charged for the translation.
      properties:
        translation:
          type: string
          description: The translated text.
          example: bonjour
        cost:
          type: string
          description: Cost charged for this translation, formatted to 6 decimals.
          examples:
            - '0.001050'
      required:
        - cost
        - translation
    SmartTranslationMessage:
      type: object
      description: A single message in the conversation.
      properties:
        sender:
          type: string
          description: 'Message author: ''user'' or ''persona''.'
          example: user
        text:
          type: string
          description: Message text in its original language.
          example: hello
      required:
        - sender
        - text
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is an access key.


        Example: `Authorization: Bearer sk-proj-XXXXXXXXX`
      scheme: bearer
      bearerFormat: JWT | Access Key

````