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

# Create live stream

> CreateLiveStream

 Creates a new live stream.



## OpenAPI

````yaml post /streaming/live_streams/v2
openapi: 3.0.3
info:
  title: Studio API - Motto
  version: 0.0.0
servers:
  - url: https://api.mottostreaming.com
    description: Production server
security:
  - BearerAuth: []
tags:
  - name: AccountService
    description: Account management service
  - name: ActionConfigurationService
    description: Action configuration service definition
  - name: ActionSecretService
    description: Action type service definition
  - name: ActionService
    description: Action service definition
  - name: ActionTypeService
    description: Action type service definition
  - name: ActivityService
    description: Activity service definition
  - name: AdService
    description: Ad management service.
  - name: AnnotationService
    description: Annotation service definition
  - name: AnnotationSetService
    description: Annotation service definition
  - name: AnnotationTypeService
    description: Annotation service definition
  - name: AssetService
    description: Asset management service.
  - name: AuthService
    description: Auth service definition
  - name: BannerService
    description: Banner service definition
  - name: BannerV2Service_v2
    description: Banner service definition
  - name: CleengService
    description: CleengService service definition
  - name: ClipService
    description: ClipService is the service that handles Clip operations.
  - name: ConfigurationService
    description: >-
      Configuration management service. These configurations allow modifying the
      behavior of streams, uploads, simulcasts, etc.
  - name: ContentTypeService
    description: ContentType service definition
  - name: CreativeWorkService
    description: CreativeWork service definition
  - name: EntitlementService
    description: Entitlement service definition
  - name: EntityService
    description: Entity service definition
  - name: EventService
    description: Event service definition
  - name: FileService
    description: OTT files management.
  - name: IngestService
    description: Ingest management service.
  - name: IngestService_v2
    description: Ingest management service.
  - name: LiveStreamService
    description: LiveStream management service.
  - name: LiveStreamService_v2
    description: LiveStream management service.
  - name: OfferService
    description: Offer service definition
  - name: OrganizationService
    description: Organization management service.
  - name: PageService
    description: Page service definition
  - name: PlatformService
    description: Platform service definition
  - name: PlaylistService
    description: Playlist management service.
  - name: ProjectService
    description: Project management service.
  - name: SimulcastService
    description: Simulcast management service.
  - name: SlugService
    description: Slug service definition
  - name: SpiideoService
    description: SpiideoService service definition
  - name: StandingService
    description: Standing service definition
  - name: StitcherService
    description: StitcherService is the service that handles stitching operations.
  - name: StripeService
    description: StripeService service definition
  - name: SubscriptionService
    description: Subscription service definition
  - name: SubtitleService
    description: SubtitleService is the service that handles Subtitle operations.
  - name: TransactionService
    description: Transaction service definition
  - name: UploadService
    description: Upload management service.
  - name: UsageService
    description: The UsageService provides methods to retrieve usage data for SKUs.
  - name: UserService
    description: User management service
  - name: VODService
    description: VODService is the service that handles VOD operations.
  - name: VODService_v2
    description: VODService is the service that handles VOD operations.
  - name: VideoProtectionService
    description: VideoProtection management service.
  - name: VideoProtectionService_v2
    description: VideoProtection management service.
  - name: VideoService
    description: Video management service.
paths:
  /streaming/live_streams/v2:
    post:
      tags:
        - LiveStreamService_v2
      description: |-
        CreateLiveStream

         Creates a new live stream.
      operationId: LiveStreamService_v2_CreateLiveStream
      parameters:
        - name: proxy_ingest
          in: query
          description: >-
            If true, the live stream's ingest URL will be proxied through an
            alternative ingest server.
          schema:
            type: boolean
        - name: secondary_output
          in: query
          description: >-
            If true, the live stream will have a secondary output (and separate
            transcoding pipeline).
             This comes at an additional cost.
          schema:
            type: boolean
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/motto.streaming.live_stream.v2.LiveStream'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/motto.streaming.live_stream.v2.CreateLiveStreamResponse
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/google.rpc.Status'
components:
  schemas:
    motto.streaming.live_stream.v2.LiveStream:
      required:
        - project_id
        - name
        - region
      type: object
      properties:
        id:
          readOnly: true
          type: string
        project_id:
          type: string
        name:
          type: string
          description: >-
            The name of the video. This is a canonical name that is independent
            of locales, and is primarily meant for internal
             purposes (e.g. a name for tracking in analytics). For end-user facing purposes, use `localized_title`.
        region:
          enum:
            - REGION_UNSPECIFIED
            - REGION_AF
            - REGION_AS
            - REGION_EU
            - REGION_NA
            - REGION_OC
            - REGION_SA
          type: string
          format: enum
        localized_title:
          type: object
          additionalProperties:
            type: string
          description: >-
            A map of localized titles for this stream, for end users to see. The
            key is the language code (ISO 639 - set 1), e.g. "en", "de", "fr",
            etc.
             If you want to localize the text for different regions of the same language, you can add the country code (ISO 3166-1 alpha-2), e.g. "en-US", "en-GB", etc.

             If this is not provided, fallback to `name`.
        ingest_id:
          type: string
        video_id:
          readOnly: true
          type: string
        simulcasts:
          type: array
          items:
            $ref: '#/components/schemas/motto.streaming.simulcast.v1.Simulcast'
        accept_input:
          type: boolean
          description: |-
            Accept input from the input source.
             If set to false, the live stream will not accept input from the input source
             regardless of the input source's state (e.g., the input source is live).
             If set to true, the live stream will accept input from the input source
             if the input source is live.
             By default, it is set to `true`.
        priority:
          type: string
          description: >-
            Priority of the live stream. This is used to sort the live streams
            and to discover the next live stream to run when
             multiple streams are connected to a shared ingest.
        external_rtmp_ingest_url:
          readOnly: true
          type: string
          description: >-
            When this livestream was created with an external platform (e.g.
            Cloudflare as a fallback solution), this RTMP ingest URL
             can be used to stream to this live stream.
             When this is provided, this should be used instead of the the streaming details associated with the `ingest_id` field(s).
        external_srt_ingest_url:
          readOnly: true
          type: string
          description: >-
            When this livestream was created with an external platform (e.g.
            Cloudflare as a fallback solution), this SRT ingest URL
             can be used to stream to this live stream.
             When this is provided, this should be used instead of the the streaming details associated with the `ingest_id` field(s).
    motto.streaming.live_stream.v2.CreateLiveStreamResponse:
      type: object
      properties:
        live_stream:
          $ref: '#/components/schemas/motto.streaming.live_stream.v2.LiveStream'
    google.rpc.Status:
      type: object
      properties:
        code:
          type: integer
          description: >-
            The status code, which should be an enum value of
            [google.rpc.Code][google.rpc.Code].
          format: int32
        message:
          type: string
          description: >-
            A developer-facing error message, which should be in English. Any
            user-facing error message should be localized and sent in the
            [google.rpc.Status.details][google.rpc.Status.details] field, or
            localized by the client.
        details:
          type: array
          items:
            $ref: '#/components/schemas/google.protobuf.Any'
          description: >-
            A list of messages that carry the error details.  There is a common
            set of message types for APIs to use.
      description: >-
        The `Status` type defines a logical error model that is suitable for
        different programming environments, including REST APIs and RPC APIs. It
        is used by [gRPC](https://github.com/grpc). Each `Status` message
        contains three pieces of data: error code, error message, and error
        details. You can find out more about this error model and how to work
        with it in the [API Design
        Guide](https://cloud.google.com/apis/design/errors).
    motto.streaming.simulcast.v1.Simulcast:
      type: object
      properties:
        id:
          readOnly: true
          type: string
          description: Id of the simulcast
        name:
          type: string
          description: Name of the simulcast
        status:
          readOnly: true
          enum:
            - SIMULCAST_STATUS_UNSPECIFIED
            - SIMULCAST_STATUS_IDLE
            - SIMULCAST_STATUS_STARTING
            - SIMULCAST_STATUS_ACTIVE
            - SIMULCAST_STATUS_STOPPED
            - SIMULCAST_STATUS_FAILED
          type: string
          format: enum
        rtmp_target:
          $ref: '#/components/schemas/motto.streaming.simulcast.v1.RTMPTarget'
          description: >-
            Important: at most one of `rtmp_target`, `srt_target` may be set per
            request.
        srt_target:
          $ref: '#/components/schemas/motto.streaming.simulcast.v1.SRTTarget'
          description: >-
            Important: at most one of `rtmp_target`, `srt_target` may be set per
            request.
        is_external:
          readOnly: true
          type: boolean
          description: >-
            If true, this indicates the simulcast is configured to operate in a
            third-party environment like Cloudflare.
             This means that some features may not be available.
    google.protobuf.Any:
      type: object
      properties:
        '@type':
          type: string
          description: The type of the serialized message.
      additionalProperties: true
      description: >-
        Contains an arbitrary serialized message along with a @type that
        describes the type of the serialized message.
    motto.streaming.simulcast.v1.RTMPTarget:
      required:
        - url
      type: object
      properties:
        url:
          type: string
          description: RTMP target. The stream_key may be included in the url.
        stream_key:
          type: string
          description: >-
            RTMP stream key. This may be left empty if the stream_key is in the
            url.
    motto.streaming.simulcast.v1.SRTTarget:
      required:
        - url
      type: object
      properties:
        url:
          type: string
          description: >-
            SRT target. This should be the full SRT url to simulcast to,
            including any parameters that may be included (e.g. `streamid`,
            `passphrase` and `latency`).
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````