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

# Create Spot Translation

> Re-translate named dialogues of an existing run.

Fix a handful of lines without re-translating the project. Pass the `dialogue_ids` you want redone — they come from the run's transcript — and only those are translated again. `target_language` names which of the run's translations to redo, so the run must already have a transcript in it.

`generation_type` decides what the translator may move: `fix_duration` keeps the new line inside the original timing, which matters when the audio is already cut to picture; `rephrase` lets the wording change length, with `user_duration_percentage` capping how far.

`user_prompt` is a free-text instruction to the translator, for steering register and word choice.

Track progress by polling [`/spot-translation/{task_id}`](get-spot-translation-status) with the `task_id` returned in the response.


## OpenAPI

````yaml post /spot-translation
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://client.camb.ai/apis
security: []
paths:
  /spot-translation:
    post:
      tags:
        - Spot Translation
      summary: Create Spot Translation
      operationId: create_spot_translation_spot_translation_post
      parameters:
        - name: traceparent
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Traceparent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSpotTranslationRequestPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrchestratorPipelineCallResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    CreateSpotTranslationRequestPayload:
      properties:
        run_id:
          type: integer
          exclusiveMinimum: 0
          title: Run Id
          description: The run whose dialogues are being re-translated.
        revision_num:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
            - type: 'null'
          title: Revision Num
          description: Revision to re-translate. Defaults to the run's latest revision.
        dialogue_ids:
          items:
            type: string
          type: array
          minItems: 1
          title: Dialogue Ids
          description: Dialogues to re-translate, from the run's transcript.
        source_language:
          $ref: '#/components/schemas/Languages'
          description: Language the dialogues are in.
        target_language:
          $ref: '#/components/schemas/Languages'
          description: >-
            Language to translate into. The run must already have a transcript
            in it.
        generation_type:
          $ref: '#/components/schemas/GenerationType'
          description: >-
            fix_duration keeps the original timing; rephrase allows the wording
            to move.
          default: fix_duration
        user_duration_percentage:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: 'null'
          title: User Duration Percentage
          description: Permitted change in duration, as a percentage of the original.
        user_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: User Prompt
          description: Free-text instruction for the translator.
      type: object
      required:
        - run_id
        - dialogue_ids
        - source_language
        - target_language
      title: CreateSpotTranslationRequestPayload
    OrchestratorPipelineCallResult:
      properties:
        task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Id
      type: object
      required:
        - task_id
      title: OrchestratorPipelineCallResult
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Languages:
      type: integer
      title: Language ID
      description: >-
        Numeric language ID. Use [`GET
        /source-languages`](/api-reference/endpoint/get-source-languages) for
        valid `source_language` values and [`GET
        /target-languages`](/api-reference/endpoint/get-target-languages) for
        valid output `language` values. For example, `1` is English (US) and
        `54` is Spanish (Spain).
    GenerationType:
      type: string
      enum:
        - fix_duration
        - rephrase
      title: GenerationType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        The `x-api-key` is a custom header required for authenticating requests
        to our API. Include this header in your request with the appropriate API
        key value to securely access our endpoints. You can find your API key(s)
        in the 'API' section of our studio website.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.