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

# Translate text



## OpenAPI

````yaml /api-reference/ai-cms/openapi-TAGTEST.json post /ai/translate
openapi: 3.1.0
info:
  title: Blog API
  version: 1.0.0
servers:
  - url: https://api.octaviatech.app/cms
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Tags
    description: Tag management endpoints
paths:
  /ai/translate:
    post:
      tags:
        - AI Automation
      summary: Translate text
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - text
                - targetLanguage
              properties:
                text:
                  type: string
                targetLanguage:
                  type: string
                  description: IETF code (e.g., en, es, fa…)
                  example: en
            examples:
              Basic:
                value:
                  text: text to translate
                  targetLanguage: en
      responses:
        '200':
          description: OK (translated)
          content:
            application/json:
              example:
                success: true
                statusCode: 200
                message: OK
                data:
                  content: Translated content…
                  tokens:
                    used: 140
                    remaining: 9860
                    limit: 10000
              schema:
                allOf:
                  - $ref: '#/components/schemas/Envelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/AiTranslateResult'
        '406':
          description: Validation failed
        '500':
          description: Failed to translate text
components:
  schemas:
    Envelope:
      type: object
      properties:
        success:
          type: boolean
        statusCode:
          type: integer
        message:
          type: string
        data:
          type:
            - object
            - 'null'
      required:
        - success
        - statusCode
        - message
        - data
    AiTranslateResult:
      type: object
      properties:
        content:
          type: string
        tokens:
          $ref: '#/components/schemas/Tokens'
    Tokens:
      type: object
      required:
        - used
        - remaining
        - limit
      properties:
        used:
          type: integer
        remaining:
          type: integer
        limit:
          type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````