# Save the transcript of a video or audio file (text, optional timed segments)

`PUT /assets/{id}/transcript` · Rivier · files

Save the transcript of a video or audio file (text, optional timed segments); say when a model wrote it.

- Scope: files:write
- Mcp: rivier_assets_transcript
- Graphql: Mutation.filesAssetTranscript
- Sdk: files.asset.transcript
- Cli: files asset transcript
- Events: files.asset.updated

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "lang": {
      "type": "string",
      "minLength": 2,
      "maxLength": 12
    },
    "text": {
      "type": "string",
      "maxLength": 500000
    },
    "ai": {
      "type": "boolean"
    },
    "segments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "start": {
            "type": "number",
            "minimum": 0
          },
          "end": {
            "type": "number",
            "minimum": 0
          },
          "text": {
            "type": "string",
            "maxLength": 2000
          }
        },
        "required": [
          "start",
          "end",
          "text"
        ],
        "additionalProperties": false
      },
      "maxItems": 20000
    }
  },
  "required": [
    "lang",
    "text"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X PUT 'https://api.rivier.ai/assets/{id}/transcript' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "lang": "string",
  "text": "string"
}'
```
