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

# Launch Stream

> Launch a stream using the provided parameters.

## Description

You can launch three types of streams with this endpoint: **SRT**, **RTMP**, and **HLS**. Each type has different requirements:

* **SRT:** Requires an ingest URL, source language, and destination language. Optional parameters include audio tracks, captions, voice cloning, and lip sync.
* **RTMP:** First, create an RTMP channel to get a channel\_id. Then, use this endpoint with an empty ingest\_url and the channel\_id in channel\_uuid. Voice cloning and lip sync are always enabled for RTMP.
* **HLS:** Requires an HLS stream URL as ingest\_url, source language, and destination language. Lip sync and voice cloning are enabled by default for HLS.

See the Quickstart guide for a step-by-step overview of each stream type.

## Authentication

This endpoint requires an API Key.\
Include your API key in the `x-api-key` header:

```http theme={null}
x-api-key: YOUR_API_KEY
```

## Request

* **Method:** POST
* **Endpoint:** `/v1/streams/start`
* **Content-Type:** `application/json`

### Request Body

```json theme={null}
{
  "ingest_url": "string", // Required for SRT and HLS streams. Leave empty for RTMP.
  "vocals_track": "string",
  "background_track": 0,
  "mix": "-9,-6",
  "enable_captions_708": false,
  "enable_captions_608": false,
  "dst_language": ["en"],
  "src_language": "en",
  "start_wowza": false,
  "use_contextual_translation": false,
  "LIPSYNC": true,
  "channel_uuid": "string", // Required for RTMP only. Use the channel_id returned from the Create RTMP Channel endpoint.
  "is_hls_stream": false
}
```

### Request Body Parameters

| Field                        | Type    | Required | Description                                                                                   |
| ---------------------------- | ------- | -------- | --------------------------------------------------------------------------------------------- |
| ingest\_url                  | string  | SRT/HLS  | The URL where the original stream is coming from. Required for SRT/HLS. Leave empty for RTMP. |
| vocals\_track                | string  | No       | Audio track number for vocals (default: 0).                                                   |
| background\_track            | integer | No       | Audio track number for background (default: 0).                                               |
| mix                          | string  | No       | Audio mix settings (default: "-9,-6").                                                        |
| enable\_captions\_708        | boolean | No       | Enable CEA-708 captions.                                                                      |
| enable\_captions\_608        | boolean | No       | Enable CEA-608 captions.                                                                      |
| dst\_language                | array   | Yes      | List of destination languages for translation (e.g., \["en"]).                                |
| src\_language                | string  | Yes      | The source language of the stream (e.g., "en").                                               |
| start\_wowza                 | boolean | No       | Start Wowza server (default: false).                                                          |
| use\_contextual\_translation | boolean | No       | Enable contextual translation (default: false).                                               |
| LIPSYNC                      | boolean | No       | Enable lip sync (default: true).                                                              |
| voice\_cloning               | boolean | No       | Enable voice cloning (default: true for RTMP/HLS).                                            |
| channel\_uuid                | string  | RTMP     | The channel\_id from RTMP channel creation (required for RTMP only).                          |
| is\_hls\_stream              | boolean | No       | Set to true for HLS streams (default: false).                                                 |

## Response

* **Status:** 200 OK
* **Content-Type:** `application/json`

```json theme={null}
"string"
```

## Example Usage (cURL)

```bash theme={null}
curl -X POST "https://streaming.lingopal-dev.com/v1/streams/start" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ingest_url": "your injest url",
    "vocals_track": "0",
    "background_track": 0,
    "mix": "-9,-6",
    "enable_captions_708": false,
    "enable_captions_608": false,
    "dst_language": ["en"],
    "src_language": "en",
    "start_wowza": false,
    "use_contextual_translation": false,
    "LIPSYNC": true,
    "channel_uuid": "your-channel-uuid",
    "is_hls_stream": false
  }'
```


## OpenAPI

````yaml POST /v1/streams/start
openapi: 3.1.0
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  x-ignore-stats:
    get:
      summary: Get Translation Statistics
      description: Get translation statistics for a stream.
      security:
        - ApiKeyAuth: []
      parameters:
        - name: stream_id
          in: path
          description: Stream ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_translations:
                    type: integer
                  edited_translations:
                    type: integer
                  unique_languages:
                    type: array
                    items:
                      type: string
                  edit_percentage:
                    type: number
                  language_stats:
                    type: object
                    additionalProperties: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        loc:
                          type: array
                          items:
                            type: string
                        msg:
                          type: string
                        type:
                          type: string
  x-translations-temp:
    get:
      summary: Get Translations
      description: Get paginated translations for a stream.
      security:
        - ApiKeyAuth: []
      parameters:
        - name: stream_id
          in: path
          description: Stream ID
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: Page number
          required: false
          schema:
            type: integer
            default: 1
        - name: per_page
          in: query
          description: Items per page
          required: false
          schema:
            type: integer
            default: 50
        - name: order
          in: query
          description: 'Sort order: ''asc'' for oldest first, ''desc'' for latest first'
          required: false
          schema:
            type: string
            default: desc
        - name: language_id
          in: query
          description: Filter by language ID
          required: false
          schema:
            type: string
        - name: edited
          in: query
          description: Filter by edit status
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  translations:
                    type: array
                    items:
                      type: object
                      properties:
                        stream_id:
                          type: string
                        language_id:
                          type: string
                        segment_id:
                          type: integer
                        timestamp:
                          type: string
                        end_time:
                          type: string
                        original_content:
                          type: string
                        speaker:
                          type: string
                        id:
                          type: integer
                        content:
                          type: string
                        edited:
                          type: boolean
                        created_at:
                          type: string
                        updated_at:
                          type: string
                  total:
                    type: integer
                  page:
                    type: integer
                  per_page:
                    type: integer
                  has_next:
                    type: boolean
                  has_prev:
                    type: boolean
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        loc:
                          type: array
                          items:
                            type: string
                        msg:
                          type: string
                        type:
                          type: string
  version: 1.0.0
servers:
  - url: https://streaming.lingopal.ai
  - url: https://streaming.lingopal-dev.com
security:
  - ApiKeyAuth: []
paths:
  /v1/streams/start:
    post:
      summary: Launch Stream
      description: Launch a stream using the provided parameters.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ingest_url:
                  type: string
                  default: ''
                vocals_track:
                  type: string
                  default: '0'
                background_track:
                  type: integer
                  default: 0
                mix:
                  type: string
                  default: '-9,-6'
                enable_captions_708:
                  type: boolean
                  default: false
                enable_captions_608:
                  type: boolean
                  default: false
                dst_language:
                  type: array
                  items:
                    type: string
                  default:
                    - en
                src_language:
                  type: string
                  default: en
                start_wowza:
                  type: boolean
                  default: false
                use_contextual_translation:
                  type: boolean
                  default: false
                LIPSYNC:
                  type: boolean
                  default: true
                channel_uuid:
                  type: string
                  default: your-channel-uuid
                is_hls_stream:
                  type: boolean
                  default: false
              required:
                - ingest_url
                - dst_language
                - src_language
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: string
        '422':
          description: Validation Error
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````