# Video Translate

## Translate a remote video

`client.VideoTranslate.Generate(ctx, body) (*VideoTranslateGenerateResponse, error)`

**post** `/v1/video-translate/generate`

Validates a remote video and starts an asynchronous translation request.

Optional `config.source_srt` / `config.target_srts` supply subtitles and
`config.speaker_voices` assigns voices to speakers (see `VideoTranslateConfig`).
When `webhook_url` is supplied, the service sends one JSON `POST` after the
request reaches `completed` or `failed`. The event type is
`video_translate.completed` or `video_translate.failed`; the request body uses
`{id, type, created_at, data}` and `data` mirrors the public request response
without `webhook_url`. Successful events include freshly signed video, audio and
SRT URLs. Receivers should deduplicate on `X-Chamelaion-Delivery`. Transport
failures, HTTP 429 and HTTP 5xx are retried up to three times with the same
delivery ID; redirects and other non-2xx responses are not accepted.
Validation happens in two phases:

1. **Synchronous (HTTP 400, no request is created):** request shape, config types,
   SRT size, UTF-8 encoding and syntax (optional BOM stripped, CRLF/CR normalized
   to LF), cue limit, language consistency, `target_srts` keys must be listed in
   `target_languages`, speaker ID syntax, and voice availability (every
   `speaker_voices` value must be a `voice_id` returned by
   `GET /v1/video-translate/voices`).
1. **After the video is processed, before translation starts:** SRT timing against
   the video duration (+1.2 s tolerance), source/target cue count and speaker
   compatibility, the detected source language against `source_srt.language`, and
   `speaker_voices` keys against the speakers in the source subtitles (or, without
   any SRT, the speakers already stored for the media). Failures mark the request
   `failed` with a descriptive `error_message`; no translation is started.

Limits: JSON body 8 MiB; each SRT 1 MiB; all SRTs 5 MiB; 5000 cues per SRT;
32 `speaker_voices` entries; config keys other than `source_srt`, `target_srts`
and `speaker_voices` 64 KiB in total; normalized config 6 MiB (measured without
HTML escaping). Duplicate JSON keys anywhere in the body and NUL characters in
config are rejected.

### Parameters

- `body VideoTranslateGenerateParams`

  - `Inputs param.Field[[]VideoTranslateGenerateParamsInput]`

    - `Type VideoTranslateGenerateParamsInputsType`

      - `const VideoTranslateGenerateParamsInputsTypeVideo VideoTranslateGenerateParamsInputsType = "video"`

    - `URL string`

  - `TargetLanguages param.Field[[]string]`

  - `Config param.Field[VideoTranslateGenerateParamsConfig]`

    Request config. `tts_model`, `source_srt`, `target_srts` and `speaker_voices` are
    validated and consumed by the translation; every other key is stored as sent (at most 64 KiB in
    total, no NUL characters) and returned in responses. Duplicate keys at any depth are
    rejected. Numbers are stored exactly, but responses decode them as IEEE-754
    doubles, so integers beyond 2^53 may lose precision when read back.
    Without SRTs and voices, translation behaves exactly as before (transcription and
    speaker detection are automatic).

    - `SourceSrt VideoTranslateGenerateParamsConfigSourceSrt`

      One SRT document. Each cue is an index (1, 2, ...), a timing line
      `HH:MM:SS,mmm --> HH:MM:SS,mmm`, and text formatted `Speaker N: text`.
      UTF-8 only (an optional BOM is stripped; CRLF/CR line endings are normalized to LF).
      At most 1 MiB and 5000 cues per document and 5 MiB across all documents.

      - `Content string`

      - `FileName string`

        Display name without path separators or control characters. Defaults to `source-<language>.srt` (`source-source.srt` when the source language is not yet known) or `target-<language>.srt`.

      - `Language string`

        For `source_srt`, must equal `source_language` when that is given, and the detected language otherwise; taken from it when omitted. For `target_srts`, must equal the key when given.

    - `SpeakerVoices map[string, string]`

      Voice per speaker. Keys are base-10, non-negative integer speaker IDs as used in
      the SRT cues (`"1"` for `Speaker 1: ...`); names such as `"speaker-1"`, signs,
      whitespace or hexadecimal are rejected, and keys that collide after normalization
      (`"01"` and `"1"`) are rejected. Keys are returned in canonical form. Values are
      external voice IDs (`voice_id` from `GET /v1/video-translate/voices`); unknown or
      deleted voices are rejected. Every key must be a speaker of the source subtitles;
      without any SRT, keys are checked against the speakers already detected for the
      video, and the request fails if none are known yet.

    - `TargetSrts map[string, VideoTranslateGenerateParamsConfigTargetSrts]`

      Target-language subtitles keyed by language code (trimmed, case-insensitive; keys
      must be unique after normalization and listed in `target_languages`). Target
      languages without an entry are translated automatically. Each target must have the
      same cue count and speakers as the effective source subtitles (the supplied
      `source_srt`, or the segments stored for the processed video).

      - `Content string`

      - `FileName string`

        Display name without path separators or control characters. Defaults to `source-<language>.srt` (`source-source.srt` when the source language is not yet known) or `target-<language>.srt`.

      - `Language string`

        For `source_srt`, must equal `source_language` when that is given, and the detected language otherwise; taken from it when omitted. For `target_srts`, must equal the key when given.

    - `TtsModel VideoTranslateGenerateParamsConfigTtsModel`

      Deprecated compatibility field. Prefer top-level `model`. `eleven_v4` equals
      `expressive`; `eleven_multilingual_v2` equals `classic`. If both fields are sent
      they must agree.

      - `const VideoTranslateGenerateParamsConfigTtsModelElevenV4 VideoTranslateGenerateParamsConfigTtsModel = "eleven_v4"`

      - `const VideoTranslateGenerateParamsConfigTtsModelElevenMultilingualV2 VideoTranslateGenerateParamsConfigTtsModel = "eleven_multilingual_v2"`

  - `DisableBackgroundAudio param.Field[bool]`

    Defaults to false when omitted; set to true to disable background audio.

  - `DisableLipSync param.Field[bool]`

    Defaults to false when omitted; set to true to disable lip sync.

  - `Formality param.Field[bool]`

  - `Model param.Field[VideoTranslateGenerateParamsModel]`

    Product speech model. `expressive` maps to Eleven v4 and is the default; `classic` maps to Eleven Multilingual v2.

    - `const VideoTranslateGenerateParamsModelExpressive VideoTranslateGenerateParamsModel = "expressive"`

    - `const VideoTranslateGenerateParamsModelClassic VideoTranslateGenerateParamsModel = "classic"`

  - `ReferenceID param.Field[string]`

  - `SourceLanguage param.Field[string]`

    Optional supported source language code; detected when omitted.

  - `WebhookURL param.Field[string]`

    Optional HTTPS callback URL for terminal status. It must have a public host,
    contain no credentials or fragment, and redirects are not followed. The POST
    has `Content-Type: application/json`, `X-Chamelaion-Event` and
    `X-Chamelaion-Delivery` headers.

### Returns

- `type VideoTranslateGenerateResponse struct{…}`

  - `RequestID string`

  - `Status VideoTranslateGenerateResponseStatus`

    - `const VideoTranslateGenerateResponseStatusSuccess VideoTranslateGenerateResponseStatus = "success"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/chamelaion/chamelaion-go/v2"
  "github.com/chamelaion/chamelaion-go/v2/option"
)

func main() {
  client := githubcomchamelaionchamelaiongo.NewClient(
    option.WithBearerToken("My Bearer Token"),
  )
  response, err := client.VideoTranslate.Generate(context.TODO(), githubcomchamelaionchamelaiongo.VideoTranslateGenerateParams{
    Inputs: githubcomchamelaionchamelaiongo.F([]githubcomchamelaionchamelaiongo.VideoTranslateGenerateParamsInput{githubcomchamelaionchamelaiongo.VideoTranslateGenerateParamsInput{
      Type: githubcomchamelaionchamelaiongo.F(githubcomchamelaionchamelaiongo.VideoTranslateGenerateParamsInputsTypeVideo),
      URL: githubcomchamelaionchamelaiongo.F("https://storage.googleapis.com/chamelaion-test-media/video.mp4"),
    }}),
    TargetLanguages: githubcomchamelaionchamelaiongo.F([]string{"de", "fr"}),
    Config: githubcomchamelaionchamelaiongo.F(githubcomchamelaionchamelaiongo.VideoTranslateGenerateParamsConfig{
      SourceSrt: githubcomchamelaionchamelaiongo.F(githubcomchamelaionchamelaiongo.VideoTranslateGenerateParamsConfigSourceSrt{
        FileName: githubcomchamelaionchamelaiongo.F("interview.srt"),
        Content: githubcomchamelaionchamelaiongo.F("1\n00:00:00,000 --> 00:00:02,500\nSpeaker 0: Welcome back.\n\n2\n00:00:02,600 --> 00:00:05,000\nSpeaker 1: Thanks for having me.\n"),
      }),
      TargetSrts: githubcomchamelaionchamelaiongo.F(map[string]githubcomchamelaionchamelaiongo.VideoTranslateGenerateParamsConfigTargetSrts{
      "de": githubcomchamelaionchamelaiongo.VideoTranslateGenerateParamsConfigTargetSrts{
        Content: githubcomchamelaionchamelaiongo.F("1\n00:00:00,000 --> 00:00:02,500\nSpeaker 0: Willkommen zurück.\n\n2\n00:00:02,600 --> 00:00:05,000\nSpeaker 1: Danke für die Einladung.\n"),
      },
      }),
      SpeakerVoices: githubcomchamelaionchamelaiongo.F(map[string]string{
      "0": "21m00Tcm4TlvDq8ikWAM",
      "1": "AZnzlk1XvdvUeBnXmlld",
      }),
    }),
    Model: githubcomchamelaionchamelaiongo.F(githubcomchamelaionchamelaiongo.VideoTranslateGenerateParamsModelExpressive),
    ReferenceID: githubcomchamelaionchamelaiongo.F("customer-job-42"),
    SourceLanguage: githubcomchamelaionchamelaiongo.F("en"),
    WebhookURL: githubcomchamelaionchamelaiongo.F("https://hooks.example.com/chamelaion/video-translate"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.RequestID)
}
```

#### Response

```json
{
  "status": "success",
  "request_id": "4c98dd00-a982-47d9-a8d6-e1f0b35a8944"
}
```

## Translate an uploaded video

`client.VideoTranslate.GenerateWithMedia(ctx, body) (*VideoTranslateGenerateWithMediaResponse, error)`

**post** `/v1/video-translate/generate-with-media`

Stages one bounded video upload and starts an asynchronous translation request.
Accepts the same settings as `POST /v1/video-translate/generate` as form fields.
Subtitles may be sent inline in the `config` field or as native file parts
`source_srt` and `target_srt.<language>` (for example `target_srt.de`); sending the
same subtitle both ways is rejected. Parts may arrive in any order; validation that
needs every field runs after the whole body is read but before a request is created,
and the staged video is discarded on every failure. Both transports produce the same
normalized, persisted config.

Limits: video 2 GiB; whole body 2 GiB + 9 MiB; part names 64 bytes; `config` field
6 MiB; other text fields 64 KiB; at most 11 SRT parts (one source plus one per
allowed target language); each SRT part 1 MiB (rejected, never truncated); all SRTs
5 MiB. `target_srt.<language>` must name a supported language; invalid names are
rejected before the part is read.

### Parameters

- `body VideoTranslateGenerateWithMediaParams`

  - `TargetLanguages param.Field[VideoTranslateGenerateWithMediaParamsTargetLanguagesUnion]`

    JSON array (for example `["de","fr"]`) or comma-separated value (`de,fr`).

    - `UnionString`

    - `type VideoTranslateGenerateWithMediaParamsTargetLanguagesArray []string`

  - `Video param.Field[Reader]`

  - `Config param.Field[string]`

    JSON-encoded `VideoTranslateConfig` object (at most 6 MiB). SRTs may be inline here or sent as the file parts below, but not both. Resource references such as `csv_resources` contain metadata only; do not send CSV bytes or base64.

  - `DisableBackgroundAudio param.Field[bool]`

    Defaults to false when omitted; set to true to disable background audio.

  - `DisableLipSync param.Field[bool]`

    Defaults to false when omitted; set to true to disable lip sync.

  - `Formality param.Field[bool]`

  - `Model param.Field[VideoTranslateGenerateWithMediaParamsModel]`

    Product speech model. `expressive` maps to Eleven v4 and is the default; `classic` maps to Eleven Multilingual v2.

    - `const VideoTranslateGenerateWithMediaParamsModelExpressive VideoTranslateGenerateWithMediaParamsModel = "expressive"`

    - `const VideoTranslateGenerateWithMediaParamsModelClassic VideoTranslateGenerateWithMediaParamsModel = "classic"`

  - `ReferenceID param.Field[string]`

  - `SourceLanguage param.Field[string]`

  - `SourceSrt param.Field[Reader]`

    Source-language SRT file part (filename must end in `.srt`; Content-Type empty, application/x-subrip, application/srt, text/srt, text/plain or application/octet-stream). Max 1 MiB.

  - `WebhookURL param.Field[string]`

    Same terminal callback contract as `VideoTranslateGenerateRequest.webhook_url`.

### Returns

- `type VideoTranslateGenerateWithMediaResponse struct{…}`

  - `RequestID string`

  - `Status VideoTranslateGenerateWithMediaResponseStatus`

    - `const VideoTranslateGenerateWithMediaResponseStatusSuccess VideoTranslateGenerateWithMediaResponseStatus = "success"`

### Example

```go
package main

import (
  "bytes"
  "context"
  "fmt"
  "io"

  "github.com/chamelaion/chamelaion-go/v2"
  "github.com/chamelaion/chamelaion-go/v2/option"
  "github.com/chamelaion/chamelaion-go/v2/shared"
)

func main() {
  client := githubcomchamelaionchamelaiongo.NewClient(
    option.WithBearerToken("My Bearer Token"),
  )
  response, err := client.VideoTranslate.GenerateWithMedia(context.TODO(), githubcomchamelaionchamelaiongo.VideoTranslateGenerateWithMediaParams{
    TargetLanguages: githubcomchamelaionchamelaiongo.F[githubcomchamelaionchamelaiongo.VideoTranslateGenerateWithMediaParamsTargetLanguagesUnion](shared.UnionString("string")),
    Video: githubcomchamelaionchamelaiongo.F(io.Reader(bytes.NewBuffer([]byte("Example data")))),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.RequestID)
}
```

#### Response

```json
{
  "status": "success",
  "request_id": "4c98dd00-a982-47d9-a8d6-e1f0b35a8944"
}
```

# Requests

## Get a video translation request

`client.VideoTranslate.Requests.Get(ctx, id) (*VideoTranslateRequestGetResponse, error)`

**get** `/v1/video-translate/requests/{id}`

Returns an account-owned request by UUID or exact reference ID (requests of other accounts return 404). Completed artifact URLs are freshly signed on every read; SRT content is never returned.

### Parameters

- `id string`

### Returns

- `type VideoTranslateRequestGetResponse struct{…}`

  - `ID string`

  - `Config VideoTranslateRequestGetResponseConfig`

    The request config as returned by the API. SRT content is replaced by metadata, `speaker_voices` keys are canonical speaker IDs, and other keys are returned unchanged.

    - `SourceSrt VideoTranslateRequestGetResponseConfigSourceSrt`

      Public description of a supplied SRT. The subtitle content is never returned.

      - `Supplied VideoTranslateRequestGetResponseConfigSourceSrtSupplied`

        - `const VideoTranslateRequestGetResponseConfigSourceSrtSuppliedTrue VideoTranslateRequestGetResponseConfigSourceSrtSupplied = true`

      - `FileName string`

      - `Language string`

    - `SpeakerVoices map[string, string]`

    - `TargetSrts map[string, VideoTranslateRequestGetResponseConfigTargetSrt]`

      - `Supplied VideoTranslateRequestGetResponseConfigTargetSrtsSupplied`

        - `const VideoTranslateRequestGetResponseConfigTargetSrtsSuppliedTrue VideoTranslateRequestGetResponseConfigTargetSrtsSupplied = true`

      - `FileName string`

      - `Language string`

    - `TtsModel VideoTranslateRequestGetResponseConfigTtsModel`

      The explicitly selected text-to-speech model. Omitted when the request used the default.

      - `const VideoTranslateRequestGetResponseConfigTtsModelElevenV4 VideoTranslateRequestGetResponseConfigTtsModel = "eleven_v4"`

      - `const VideoTranslateRequestGetResponseConfigTtsModelElevenMultilingualV2 VideoTranslateRequestGetResponseConfigTtsModel = "eleven_multilingual_v2"`

  - `CreatedAt Time`

  - `DisableBackgroundAudio bool`

    Whether background audio was disabled for this request.

  - `DisableLipSync bool`

    Whether lip sync was disabled for this request.

  - `Formality bool`

  - `Model VideoTranslateRequestGetResponseModel`

    Product speech model selected for the request.

    - `const VideoTranslateRequestGetResponseModelExpressive VideoTranslateRequestGetResponseModel = "expressive"`

    - `const VideoTranslateRequestGetResponseModelClassic VideoTranslateRequestGetResponseModel = "classic"`

  - `Status VideoTranslateRequestGetResponseStatus`

    - `const VideoTranslateRequestGetResponseStatusQueued VideoTranslateRequestGetResponseStatus = "queued"`

    - `const VideoTranslateRequestGetResponseStatusUploading VideoTranslateRequestGetResponseStatus = "uploading"`

    - `const VideoTranslateRequestGetResponseStatusProcessing VideoTranslateRequestGetResponseStatus = "processing"`

    - `const VideoTranslateRequestGetResponseStatusCompleted VideoTranslateRequestGetResponseStatus = "completed"`

    - `const VideoTranslateRequestGetResponseStatusFailed VideoTranslateRequestGetResponseStatus = "failed"`

  - `TargetLanguages []string`

  - `ErrorMessage string`

    Present only when failed. A safe, bounded description, for example SRT or speaker validation errors found after the video was processed.

  - `FinishedAt Time`

  - `Outputs map[string, VideoTranslateRequestGetResponseOutput]`

    Present only when completed, keyed by requested target language. URLs are signed on every read.

    - `Audio string`

    - `Srt string`

    - `Video string`

  - `ReferenceID string`

  - `SourceLanguage string`

    Explicit source language, or the detected one once processing starts.

  - `StartedAt Time`

  - `WebhookURL string`

    The configured terminal callback URL, when supplied.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/chamelaion/chamelaion-go/v2"
  "github.com/chamelaion/chamelaion-go/v2/option"
)

func main() {
  client := githubcomchamelaionchamelaiongo.NewClient(
    option.WithBearerToken("My Bearer Token"),
  )
  request, err := client.VideoTranslate.Requests.Get(context.TODO(), "x")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", request.ID)
}
```

#### Response

```json
{
  "id": "4c98dd00-a982-47d9-a8d6-e1f0b35a8944",
  "reference_id": "customer-job-42",
  "source_language": "en",
  "target_languages": [
    "de",
    "fr"
  ],
  "disable_background_audio": false,
  "disable_lip_sync": false,
  "formality": false,
  "config": {
    "source_srt": {
      "file_name": "interview.srt",
      "language": "en",
      "supplied": true
    },
    "target_srts": {
      "de": {
        "file_name": "target-de.srt",
        "language": "de",
        "supplied": true
      }
    },
    "speaker_voices": {
      "0": "21m00Tcm4TlvDq8ikWAM",
      "1": "AZnzlk1XvdvUeBnXmlld"
    }
  },
  "status": "completed",
  "created_at": "2026-10-07T12:00:00Z",
  "started_at": "2026-10-07T12:00:01Z",
  "finished_at": "2026-10-07T12:04:00Z",
  "outputs": {
    "de": {
      "video": "https://storage.example/signed/de.mp4",
      "audio": "https://storage.example/signed/de.wav",
      "srt": "https://storage.example/signed/de.srt"
    },
    "fr": {
      "video": "https://storage.example/signed/fr.mp4",
      "audio": "https://storage.example/signed/fr.wav",
      "srt": "https://storage.example/signed/fr.srt"
    }
  }
}
```

## List video translation requests

`client.VideoTranslate.Requests.List(ctx, query) (*VideoTranslateRequestListResponse, error)`

**get** `/v1/video-translate/requests`

Returns the authenticated account's requests, newest first (`created_at` descending, then `id` descending), always paginated. `pagination.total` counts every request matching the filters. Responses use the same shape as `GET /v1/video-translate/requests/{id}`.

### Parameters

- `query VideoTranslateRequestListParams`

  - `CreatedFrom param.Field[Time]`

    Inclusive lower bound on `created_at` (RFC 3339). Must not be after `created_to`.

  - `CreatedTo param.Field[Time]`

    Inclusive upper bound on `created_at` (RFC 3339).

  - `Limit param.Field[int64]`

    Page size. Non-integers and values below 1 are rejected with 400; values above 100 are clamped to 100.

  - `Offset param.Field[int64]`

    Number of items to skip. Non-integers and negative values are rejected with 400.

  - `ReferenceID param.Field[string]`

    Filter requests by exact `reference_id`.

  - `SourceLanguage param.Field[string]`

    Filter by the explicit or detected source language (supported language code).

  - `Status param.Field[VideoTranslateRequestListParamsStatus]`

    Filter by request status.

    - `const VideoTranslateRequestListParamsStatusQueued VideoTranslateRequestListParamsStatus = "queued"`

    - `const VideoTranslateRequestListParamsStatusUploading VideoTranslateRequestListParamsStatus = "uploading"`

    - `const VideoTranslateRequestListParamsStatusProcessing VideoTranslateRequestListParamsStatus = "processing"`

    - `const VideoTranslateRequestListParamsStatusCompleted VideoTranslateRequestListParamsStatus = "completed"`

    - `const VideoTranslateRequestListParamsStatusFailed VideoTranslateRequestListParamsStatus = "failed"`

  - `TargetLanguage param.Field[string]`

    Return requests whose `target_languages` contain this supported language code.

### Returns

- `type VideoTranslateRequestListResponse struct{…}`

  - `Data []VideoTranslateRequestListResponseData`

    - `ID string`

    - `Config VideoTranslateRequestListResponseDataConfig`

      The request config as returned by the API. SRT content is replaced by metadata, `speaker_voices` keys are canonical speaker IDs, and other keys are returned unchanged.

      - `SourceSrt VideoTranslateRequestListResponseDataConfigSourceSrt`

        Public description of a supplied SRT. The subtitle content is never returned.

        - `Supplied VideoTranslateRequestListResponseDataConfigSourceSrtSupplied`

          - `const VideoTranslateRequestListResponseDataConfigSourceSrtSuppliedTrue VideoTranslateRequestListResponseDataConfigSourceSrtSupplied = true`

        - `FileName string`

        - `Language string`

      - `SpeakerVoices map[string, string]`

      - `TargetSrts map[string, VideoTranslateRequestListResponseDataConfigTargetSrt]`

        - `Supplied VideoTranslateRequestListResponseDataConfigTargetSrtsSupplied`

          - `const VideoTranslateRequestListResponseDataConfigTargetSrtsSuppliedTrue VideoTranslateRequestListResponseDataConfigTargetSrtsSupplied = true`

        - `FileName string`

        - `Language string`

      - `TtsModel VideoTranslateRequestListResponseDataConfigTtsModel`

        The explicitly selected text-to-speech model. Omitted when the request used the default.

        - `const VideoTranslateRequestListResponseDataConfigTtsModelElevenV4 VideoTranslateRequestListResponseDataConfigTtsModel = "eleven_v4"`

        - `const VideoTranslateRequestListResponseDataConfigTtsModelElevenMultilingualV2 VideoTranslateRequestListResponseDataConfigTtsModel = "eleven_multilingual_v2"`

    - `CreatedAt Time`

    - `DisableBackgroundAudio bool`

      Whether background audio was disabled for this request.

    - `DisableLipSync bool`

      Whether lip sync was disabled for this request.

    - `Formality bool`

    - `Model VideoTranslateRequestListResponseDataModel`

      Product speech model selected for the request.

      - `const VideoTranslateRequestListResponseDataModelExpressive VideoTranslateRequestListResponseDataModel = "expressive"`

      - `const VideoTranslateRequestListResponseDataModelClassic VideoTranslateRequestListResponseDataModel = "classic"`

    - `Status VideoTranslateRequestListResponseDataStatus`

      - `const VideoTranslateRequestListResponseDataStatusQueued VideoTranslateRequestListResponseDataStatus = "queued"`

      - `const VideoTranslateRequestListResponseDataStatusUploading VideoTranslateRequestListResponseDataStatus = "uploading"`

      - `const VideoTranslateRequestListResponseDataStatusProcessing VideoTranslateRequestListResponseDataStatus = "processing"`

      - `const VideoTranslateRequestListResponseDataStatusCompleted VideoTranslateRequestListResponseDataStatus = "completed"`

      - `const VideoTranslateRequestListResponseDataStatusFailed VideoTranslateRequestListResponseDataStatus = "failed"`

    - `TargetLanguages []string`

    - `ErrorMessage string`

      Present only when failed. A safe, bounded description, for example SRT or speaker validation errors found after the video was processed.

    - `FinishedAt Time`

    - `Outputs map[string, VideoTranslateRequestListResponseDataOutput]`

      Present only when completed, keyed by requested target language. URLs are signed on every read.

      - `Audio string`

      - `Srt string`

      - `Video string`

    - `ReferenceID string`

    - `SourceLanguage string`

      Explicit source language, or the detected one once processing starts.

    - `StartedAt Time`

    - `WebhookURL string`

      The configured terminal callback URL, when supplied.

  - `Pagination VideoTranslateRequestListResponsePagination`

    - `Limit int64`

      Applied page size.

    - `Offset int64`

      Applied result offset.

    - `Total int64`

      Total number of matching records.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/chamelaion/chamelaion-go/v2"
  "github.com/chamelaion/chamelaion-go/v2/option"
)

func main() {
  client := githubcomchamelaionchamelaiongo.NewClient(
    option.WithBearerToken("My Bearer Token"),
  )
  requests, err := client.VideoTranslate.Requests.List(context.TODO(), githubcomchamelaionchamelaiongo.VideoTranslateRequestListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", requests.Data)
}
```

#### Response

```json
{
  "data": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "config": {
        "source_srt": {
          "supplied": true,
          "file_name": "file_name",
          "language": "language"
        },
        "speaker_voices": {
          "foo": "string"
        },
        "target_srts": {
          "foo": {
            "supplied": true,
            "file_name": "file_name",
            "language": "language"
          }
        },
        "tts_model": "eleven_v4"
      },
      "created_at": "2019-12-27T18:11:19.117Z",
      "disable_background_audio": true,
      "disable_lip_sync": true,
      "formality": true,
      "model": "expressive",
      "status": "queued",
      "target_languages": [
        "string"
      ],
      "error_message": "error_message",
      "finished_at": "2019-12-27T18:11:19.117Z",
      "outputs": {
        "foo": {
          "audio": "https://example.com",
          "srt": "https://example.com",
          "video": "https://example.com"
        }
      },
      "reference_id": "reference_id",
      "source_language": "source_language",
      "started_at": "2019-12-27T18:11:19.117Z",
      "webhook_url": "https://example.com"
    }
  ],
  "pagination": {
    "limit": 1,
    "offset": 0,
    "total": 0
  }
}
```

# Voices

## List voices for speaker assignment

`client.VideoTranslate.Voices.List(ctx, query) (*VideoTranslateVoiceListResponse, error)`

**get** `/v1/video-translate/voices`

Lists the voices that can be used as values in `config.speaker_voices`.
`voice_id` is the external voice ID to submit. `name` and `is_favorite` reflect the
authenticated account's personalization; `default_name` is the catalog name.
Ordered by favorites first, then `name` (case-insensitive), then `voice_id`.

### Parameters

- `query VideoTranslateVoiceListParams`

  - `Application param.Field[string]`

    Case-insensitive exact match on the voice's application (use case), for example `narration` (max 100 characters).

  - `Favorite param.Field[bool]`

    Only favorites (`true`) or only non-favorites (`false`).

  - `Gender param.Field[VideoTranslateVoiceListParamsGender]`

    Case-insensitive gender filter.

    - `const VideoTranslateVoiceListParamsGenderMale VideoTranslateVoiceListParamsGender = "Male"`

    - `const VideoTranslateVoiceListParamsGenderFemale VideoTranslateVoiceListParamsGender = "Female"`

    - `const VideoTranslateVoiceListParamsGenderOther VideoTranslateVoiceListParamsGender = "Other"`

  - `Language param.Field[string]`

    Case-insensitive exact match on the voice's primary language or any of its verified languages (max 100 characters).

  - `Limit param.Field[int64]`

    Page size. Non-integers and values below 1 are rejected with 400; values above 100 are clamped to 100.

  - `Offset param.Field[int64]`

    Number of items to skip. Non-integers and negative values are rejected with 400.

  - `Search param.Field[string]`

    Case-insensitive substring of the voice's effective (account-personalized) name.

### Returns

- `type VideoTranslateVoiceListResponse struct{…}`

  - `Pagination VideoTranslateVoiceListResponsePagination`

    - `Limit int64`

      Applied page size.

    - `Offset int64`

      Applied result offset.

    - `Total int64`

      Total number of matching records.

  - `Voices []VideoTranslateVoiceListResponseVoice`

    - `Application string`

      Intended use case, for example `narration`.

    - `DefaultName string`

    - `Description string`

    - `Gender VideoTranslateVoiceListResponseVoicesGender`

      - `const VideoTranslateVoiceListResponseVoicesGenderMale VideoTranslateVoiceListResponseVoicesGender = "Male"`

      - `const VideoTranslateVoiceListResponseVoicesGenderFemale VideoTranslateVoiceListResponseVoicesGender = "Female"`

      - `const VideoTranslateVoiceListResponseVoicesGenderOther VideoTranslateVoiceListResponseVoicesGender = "Other"`

    - `IsFavorite bool`

      Whether the authenticated account marked this voice as a favorite.

    - `Language string`

      Primary language label.

    - `Name string`

      Effective name (the account's custom name when set, otherwise `default_name`).

    - `VoiceID string`

      External voice ID. Use this value in `config.speaker_voices`.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/chamelaion/chamelaion-go/v2"
  "github.com/chamelaion/chamelaion-go/v2/option"
)

func main() {
  client := githubcomchamelaionchamelaiongo.NewClient(
    option.WithBearerToken("My Bearer Token"),
  )
  voices, err := client.VideoTranslate.Voices.List(context.TODO(), githubcomchamelaionchamelaiongo.VideoTranslateVoiceListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", voices.Pagination)
}
```

#### Response

```json
{
  "voices": [
    {
      "voice_id": "21m00Tcm4TlvDq8ikWAM",
      "name": "Rachel (narration)",
      "default_name": "Rachel",
      "description": "Calm, young adult female voice.",
      "language": "en",
      "application": "narration",
      "gender": "Female",
      "is_favorite": true
    }
  ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 1
  }
}
```
