## 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
  }
}
```
