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

# Submit job

> Submit a post-processing job to the batch processor

## POST /batch-processor

<Badge color="blue">Paid plans only</Badge>

This endpoint is used to submit jobs to the batch processor.

A job request includes three components: a preset (`preset`), an input configuration (`inParams`), an output configuration (`outParams`).

The `preset` defines the type of job to run. This is a required attribute and available presets are: `transcript`, `summarize`.

The `inParams` defines where the inputs for the job are coming from. An existing `recordingId` or a URL to a video/audio file are the two possible configurations.

The `outParams` defines how the outputs for the job are configured like the filename of the output.

Depending on the preset type, an optional `transformParams` object may contain configuration that describes the transformation applied to the data. Currently only the `transcript` preset supports these transform configuration options.

### Request Template (`json`)

```json theme={null}
{
  "preset": "$PRESET",
  "inParams": {...},
  "outParams": {...}
}
```

### Top-level configuration

| Attribute Name | Type | Description | Default | Example | Required? |
| - | - | - | - | - | - |
| `preset` | `string` | The type of job to run | `null` | \[transcript, summarize] | Yes |
| `inParams` | `object` | The input configuration | `null` | `{...}` | Yes |
| `outParams` | `object` | The output configuration | `null` | `{...}` | Yes |
| `transformParams` | `object` | The output configuration | `null` | `{...}` | No |

### Input configuration (`inParams`)

| Attribute Name | Type | Description | Default | Example | Required? |
| - | - | - | - | - | - |
| `sourceType` | `string` | The type of the input media: \[uri, recordingId] | `null` | One of \[uri, recordingId] | Yes |
| `uri` | `string` | The actual URL when using "uri" as sourceType | `null` | "[https://direct-url-to/file.mp4](https://direct-url-to/file.mp4)" | When using `uri` as `sourceType` |
| `recordingId` | `string` | The recording ID when using `recordingId` as sourceType | `null` | "uuiasdfe-8ba2-4ee6-bd15-003a92c18245" | When using `recordingId` as `sourceType` |
| `language` | `string` | The BCP-47 language-tag of spoken the audio for the transcription | `en` | "fr" | No |

*Note:* `language` in `inParams` is only supported for the `transcript` preset. Additional options are available for transcriptions, see below.

### Transform configuration (`transformParams`)

| Attribute Name | Type | Description | Default | Example | Required? |
| - | - | - | - | - | - |
| `transcript` | `object` | Configuration specific to transcription | `null` | `{...}` | No |

### Transcription configuration (`transformParams.transcript`)

The following parameters can be passed in the `transformParams.transcript` object.
None of the parameters are required. See the documentation for each parameter for more information on their default values.

Note that you can include more parameters using the `extra` object.

If you pass a value for `language` both using `inParams` and this configuration object, the value provided here will be used.

| Name | Type | Description |
| - | - | - |
| `language` | `string` | See Deepgram's documentation for [`language`](https://developers.deepgram.com/docs/language) |
| `model` | `string` | See Deepgram's documentation for [`model`](https://developers.deepgram.com/docs/model) |
| `tier` | `string` | This field is deprecated, use `model` instead |
| `profanity_filter` | `boolean` | See Deepgram's documentation for [`profanity_filter`](https://developers.deepgram.com/docs/profanity-filter) |
| `punctuate` | `boolean` | See Deepgram's documentation for [`punctuate`](https://developers.deepgram.com/docs/punctuation) |
| `endpointing` | `number` or `boolean` | See Deepgram's documentation for [`endpointing`](https://developers.deepgram.com/docs/endpointing) |
| `redact` | `boolean` or `array` | See Deepgram's documentation for [`redact`](https://developers.deepgram.com/docs/redaction) |
| `extra` | `object` | Specify additional parameters. See Deepgram's documentation for [available streaming options](https://developers.deepgram.com/docs/features-overview) |

### Language Support

The exact list of supported languages may depend on the `model` parameter in transcription configuration (see above).

In the default configuration, the supported languages using the `language` parameter are:

| Language | BCP-47 tag |
| - | - |
| Danish | da |
| Dutch | nl |
| English | en |
| English Australia | en-AU |
| English UK | en-GB |
| English India | en-IN |
| English NewZealand | en-NZ |
| English USA | en-US |
| French | fr |
| French Canada | fr-CA |
| German (DE) | de |
| Hindi | hi |
| Hindi Roman | hi-Latn |
| Indonesian | id |
| Italian | it |
| Japanese | ja |
| Korean | ko |
| Norwegian | no |
| Polish | pl |
| Portuguese | pt |
| Portuguese Brazil | pt-BR |
| Portuguese Portugal | pt-PT |
| Russian | ru |
| Spanish | es |
| Spanish Latin America | es-419 |
| Swedish | sv |
| Turkish | tr |
| Ukrainian | uk |

### Output configuration (`outParams`)

| Attribute Name | Type | Description | Default | Example | Required? |
| - | - | - | - | - | - |
| `s3config.s3KeyTemplate` | `string` | The filename of the output | `null` | "my-summary" | Yes |
| `s3config.useReplacement` | `boolean` | Whether to use template replacement in s3KeyTemplate | `null` | true | No |

### s3KeyReplacement

The default output path for `transcript` and `summary` jobs are `domain_name/jobId/transcript/s3Config.s3KeyTemplate` and `domain_name/jobId/summary/s3Config.s3KeyTemplate` respectively.

`s3KeyReplacement` with `useReplacement` can be used to customize the S3 path of the generated output. Template replacements are made up of a replacement string with prefixes, suffixes, or both. The currently supported replacements are:

* `epoch_time` — the epoch time in seconds (optional)
* `domain_name` — your Daily domain (optional)
* `job_id` — the job ID assigned to the job (optional)

Restrictions:

* Maximum template size is 1024 characters
* Each replacement parameter should be placed within curly brackets (e.g., `{domain_name}`)
* Only alphanumeric characters (0-9, A-Z, a-z) and `.`, `/`, `-`, `*` are valid within the template

Example with domain `"myDomain"` and template `myprefix-{domain_name}-{epoch_time}`:

```
myprefix-myDomain-1675842936274.vtt
myprefix-myDomain-1675842936274.json
myprefix-myDomain-1675842936274.txt
```

### Transcript example requests

<Tabs>
  <Tab title="Transcript with media file">
    ```curl theme={null}
    curl -H "Content-Type: application/json" \
         -H "Authorization: Bearer $TOKEN" \
         -XPOST -d \
         '{
           "preset": "transcript",
           "inParams": {
             "sourceType": "uri",
             "uri": "https://direct-url-to/file.mp4"
           },
           "outParams": {
             "s3Config": {
               "s3KeyTemplate": "transcript"
             }
           }
         }'
         https://api.daily.co/v1/batch-processor
    ```
  </Tab>

  <Tab title="Transcript with recording id">
    ```curl theme={null}
    curl -H "Content-Type: application/json" \
         -H "Authorization: Bearer $TOKEN" \
         -XPOST -d \
         '{
           "preset": "transcript",
           "inParams": {
             "sourceType": "recordingId",
             "recordingId": "uuiasdfe-8ba2-4ee6-bd15-003a92c18245"
           },
           "outParams": {
             "s3Config": {
               "s3KeyTemplate": "transcript"
             }
           }
         }'
         https://api.daily.co/v1/batch-processor
    ```
  </Tab>

  <Tab title="Special Words in Transcript">
    ```curl theme={null}
    curl -H "Content-Type: application/json" \
         -H "Authorization: Bearer $TOKEN" \
         -XPOST -d \
         '{
          "preset": "transcript",
          "inParams": {
            "sourceType": "uri",
            "uri": "https://direct-url-to/file.mp4"
          },
          "transformParams": {
            "transcript": {
              "params": {
                "keywords": ["Mustang:5", "New York:5", "Snuffleupagus:10"]
              }
            }
          },
          "outParams": {
            "s3Config": {
              "s3KeyTemplate": "my-test-transcription"
            }
          }
        }'
         https://api.daily.co/v1/batch-processor
    ```
  </Tab>
</Tabs>

### Summary example requests

<Tabs>
  <Tab title="Summary with media file">
    ```curl theme={null}
    curl -H "Content-Type: application/json" \
         -H "Authorization: Bearer $TOKEN" \
         -XPOST -d \
         '{
           "preset": "summarize",
           "inParams": {
             "sourceType": "uri",
             "uri": "https://direct-url-to/file.mp4"
           },
           "outParams": {
             "s3Config": {
               "s3KeyTemplate": "summary"
             }
           }
         }'
         https://api.daily.co/v1/batch-processor
    ```
  </Tab>

  <Tab title="Summary with recording id">
    ```curl theme={null}
    curl -H "Content-Type: application/json" \
         -H "Authorization: Bearer $TOKEN" \
         -XPOST -d \
         '{
           "preset": "summarize",
           "inParams": {
             "sourceType": "recordingId",
             "recordingId": "uuiasdfe-8ba2-4ee6-bd15-003a92c18245"
           },
           "outParams": {
             "s3Config": {
               "s3KeyTemplate": "summary"
             }
           }
         }'
         https://api.daily.co/v1/batch-processor
    ```
  </Tab>

  <Tab title="Summary with transcript">
    ```curl theme={null}
    curl -H "Content-Type: application/json" \
         -H "Authorization: Bearer $TOKEN" \
         -XPOST -d \
         '{
           "preset": "summarize",
           "inParams": {
             "sourceType": "transcriptUri",
             "uri": "https://direct-url-to/file.txt"
           },
           "outParams": {
             "s3Config": {
               "s3KeyTemplate": "summary"
             }
           }
         }'
         https://api.daily.co/v1/batch-processor
    ```
  </Tab>
</Tabs>

### Example responses

<Tabs>
  <Tab title="200 OK">
    ```json theme={null}
    {
      "id": "02c2508e-8835-4f3e-bcf2-e319d00f0eec"
    }
    ```
  </Tab>

  <Tab title="400 Bad request">
    ```json theme={null}
    {
      "error": "invalid-request-error",
      "info": "\"inParams.sourceType\" must be one of [recordingId, uri] [Received sourceType=badtype]"
    }
    ```
  </Tab>
</Tabs>


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