Moments Lab Media Hub API

The MediaHub API from Moments Lab — 2 operation(s) for mediahub.

GitHub OpenAPI

Operations 2

POST /ingest-request Send media ingest request #
GET /ingest-request/{job_request_id} Get job status #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/moments-lab:moments-lab-mediahub-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

moments-lab-mediahub-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Moments Lab Media Hub API
  version: '1.0'
  contact: {}
  x-logo:
    url: https://assets.momentslab.com/apiv3-swagger-ui/logo_ML.png
    backgroundColor: '#FFFFFF'
    altText: MomentsLab logo
  description: 'Operations tagged MediaHub across 2 of this provider''s published API definitions: moments-lab-openapi.json, moments-lab-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: /
- url: https://api.momentslab.io
security:
- Api-token: []
- openId: []
tags:
- name: MediaHub
paths:
  /ingest-request:
    post:
      description: 'This endpoint allows Moments Lab to retrieve media from the location provided to ingest it in media hub and launch an analysis composed by the analyzers you set.

        The goal is to make it clear where to get your media asset and what analysis to run.

        In your request, you''ll include a few key details. The request will be in JSON format.'
      operationId: MediaHubController_ingestMedia
      parameters:
      - name: X-Nb-Workspace
        in: header
        schema: {}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MediaHubRequest'
      responses:
        '201':
          description: The request was successful. You’ll get a response in JSON format.
          links:
            GetAnalysisStatus:
              operationId: GetJobStatus
              parameters:
                analysis_request_id: $response.body#/analysis_request_id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestRequestReceivedResponse'
        '400':
          description: 'Something was wrong with the information you provided in the request. <br/> messageKey: A code or key describing the error.<br/> message: A more detailed explanation of what went wrong.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientRequestError'
        '409':
          description: 'A resource with the provided identifier already exists. <br/>  message: A more detailed explanation of what went wrong.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
        '500':
          description: '500: An internal server error occurred. If this happens, you should reach out to Moments Lab support for assistance.<br/>Message: The response will include a message that describes the issue.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerSideError'
      summary: Send media ingest request
      tags:
      - MediaHub
    servers:
    - url: /
  /ingest-request/{job_request_id}:
    get:
      description: 'This endpoint allows you to retrieve the status of job request sent previously.

        Be sure to have your required job_request_id.

        This will ensure you will be able to track progress on your job.'
      operationId: GetJobStatus
      parameters:
      - name: job_request_id
        required: true
        in: path
        schema:
          type: string
      - name: X-Nb-Workspace
        in: header
        schema: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestRequestJobResponse'
        '400':
          description: 'Something was wrong with the information you provided in the request. <br/> messageKey: A code or key describing the error.<br/> message: A more detailed explanation of what went wrong.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientRequestError'
        '404':
          description: Resource does not exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '500':
          description: '500: An internal server error occurred. If this happens, you should reach out to Moments Lab support for assistance.<br/>Message: The response will include a message that describes the issue.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerSideError'
      summary: Get job status
      tags:
      - MediaHub
    servers:
    - url: /
components:
  schemas:
    AnalysisParameters:
      type: object
      properties:
        transcript_language:
          example: en
          description: Language in which the transcript will be generated, use <a href="https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes">ISO 639-1 Code format</a>, no value will result in auto-detection of the language.<br/>Notice that specifying a language will fasten the analysis
          type: string
          enum:
          - af
          - am
          - ar
          - as
          - az
          - ba
          - be
          - bg
          - bn
          - bo
          - br
          - bs
          - ca
          - cs
          - cy
          - da
          - de
          - el
          - en
          - es
          - et
          - eu
          - fa
          - fi
          - fo
          - fr
          - gl
          - gu
          - ha
          - haw
          - he
          - hi
          - hr
          - ht
          - hu
          - hy
          - id
          - is
          - it
          - ja
          - jw
          - ka
          - kk
          - km
          - kn
          - ko
          - la
          - lb
          - ln
          - lo
          - lt
          - lv
          - mg
          - mi
          - mk
          - ml
          - mn
          - mr
          - ms
          - mt
          - my
          - ne
          - nl
          - nn
          - 'no'
          - oc
          - pa
          - pl
          - ps
          - pt
          - ro
          - ru
          - sa
          - sd
          - si
          - sk
          - sl
          - sn
          - so
          - sq
          - sr
          - su
          - sv
          - sw
          - ta
          - te
          - tg
          - th
          - tk
          - tl
          - tr
          - tt
          - uk
          - ur
          - uz
          - vi
          - yi
          - yo
          - zh
          - yue
        audio_channel_mapping:
          example:
          - track: 0
            channels:
            - 0
            - 1
          - track: 1
            channels:
            - 0
          description: Audio channel mapping configuration for analysis when audio contains multiple tracks and channels. Each object specifies a track number and the channels to use from that track. Track and channel numbers are zero-based. The example below selects the first 2 channels of the first audio track (track 0), plus the first channel of the second audio track (track 1). Left empty to default value which is a downmix of all tracks and channels.
          type: array
          items:
            $ref: '#/components/schemas/AudioChannelMapping'
        tasks:
          type: array
          items:
            type: string
            enum:
            - mxt
          description: Tasks will be applied on the live feeds
      required:
      - tasks
    ServerSideError:
      type: object
      properties:
        message:
          type: string
          description: The response will include a message that describes the issue.
      required:
      - message
    ConflictError:
      type: object
      properties:
        message:
          type: string
          description: A more detailed explanation of what went wrong.
        message_key:
          type: string
        data:
          type: object
      required:
      - message
      - message_key
      - data
    IngestRequestReceivedResponse:
      type: object
      properties:
        job_request_id:
          type: string
          description: Id of the ingest request to be used to retrieve job status.
        event_uid:
          type: string
          description: UID of event potentially created for this media to be used for others media ingest before first analysis is run.
      required:
      - job_request_id
      - event_uid
    UrlSource:
      type: object
      properties:
        type:
          type: string
          enum:
          - URL
          example: URL
        url:
          type: string
          description: Original media's location where the media can be retrieved from
      required:
      - type
      - url
    NotFoundError:
      type: object
      properties:
        message_key:
          type: string
        message:
          type: string
      required:
      - message_key
      - message
    IngestEventParameters:
      type: object
      properties:
        event_uid:
          description: The event to apply on the media. If event_uid is set, the next properties will be ignored.
          type: string
        event_parameters:
          description: Parameters to create event the media will be attached to
          $ref: '#/components/schemas/IngestCreationEventParameters'
    MetadataParametersRequest:
      type: object
      properties:
        field_uid:
          type: string
          description: Unique identifier of the metadata field
        value:
          type: string
          description: Value of the metadata
      required:
      - field_uid
      - value
    IngestCreationEventParameters:
      type: object
      properties:
        title:
          type: string
          description: The title of the event
        program_uid:
          description: The program to apply on the media
          type: string
        organisation_uids:
          description: Organisation to link to the event, if not provided organisation will be the one linked to the api token
          type: array
          items:
            type: string
        metadata:
          description: Custom metadata to apply on the event
          type: array
          items:
            $ref: '#/components/schemas/MetadataParametersRequest'
      required:
      - title
    IngestRequestJobResponse:
      type: object
      properties:
        analysis_request_id:
          type: string
          description: Id of the analysis request used to retrieve analysis status. Use job_request_id instead.
          deprecated: true
        job_request_id:
          type: string
          description: Id of the ingest request used to retrieve job.
        status:
          type: string
          enum:
          - UPLOAD_IN_PROGRESS
          - UPLOAD_COMPLETED
          - JOB_IN_PROGRESS
          - JOB_DONE
          - JOB_FAILED
          description: 'Status of the analysis:<br/> <ul><li>UPLOAD_IN_PROGRESS: The job request is received and MXT API is retrieving media file the source specified</li><li>UPLOAD_COMPLETED: The media file has been successfully retrieved</li><li>JOB_IN_PROGRESS: The file has been retrieved and media is ingesting</li><li>JOB_DONE: The media has been ingested and all tasks are completed. You can now get the results thanks to the media_id or external-id</li><li>JOB_FAILED: Something went wrong during the process. Check the error message for details.</li></ul>'
        errorMessage:
          description: Error message in case of failure
          type: string
        media_id:
          description: Once the status will be in status JOB_DONE, the id of the media will be returned. This id may be used in media routes
          type: string
        external_id:
          description: External id provided at request time
          type: string
      required:
      - analysis_request_id
      - job_request_id
      - status
    MediaHubRequest:
      type: object
      properties:
        type:
          type: string
          enum:
          - video
          - image
          - audio
          example: video
          description: The kind of media you’re about to analyze must be either "Video", "Image", or "Audio".
        external_id:
          description: 'An internal unique identifier from your system to help you link the original media file with the analyzed version. '
          type: string
        filename:
          type: string
          description: Name of the media file once analyzed
        title:
          type: string
          description: The title that will be displayed in the optional user interface for these media files.
        source:
          oneOf:
          - $ref: '#/components/schemas/UrlSource'
          - $ref: '#/components/schemas/S3Source'
          - $ref: '#/components/schemas/GcsSource'
          description: This is a mandatory field to give us information about where to find the original media file.
          type: object
          discriminator:
            propertyName: type
            mapping:
              URL: '#/components/schemas/UrlSource'
              S3: '#/components/schemas/S3Source'
              GCS: '#/components/schemas/GcsSource'
        analysis_parameters:
          description: Parameters to setup the analysis tasks you want to apply on the media
          $ref: '#/components/schemas/AnalysisParameters'
        event:
          description: Parameters to setup the event linked to the media
          $ref: '#/components/schemas/IngestEventParameters'
        organisation_uids:
          description: Organisation to link to the media, if not provided organisation will be the one linked to the api token
          type: array
          items:
            type: string
        metadata:
          description: Custom metadata to apply on the media
          type: array
          items:
            $ref: '#/components/schemas/MetadataParametersRequest'
        media_date:
          description: The date the media was recorded or broadcast. ISO 8601 format (e.g. 2024-03-15T14:30:00Z).
          type: string
        customer_storage_path:
          description: Path in your own storage where this media can be found, for your own reference.
          type: string
      required:
      - type
      - filename
      - title
      - source
      - analysis_parameters
    S3Source:
      type: object
      properties:
        type:
          type: string
          enum:
          - S3
          example: S3
        bucket:
          type: string
          description: S3 bucket name
        key:
          type: string
          description: S3 key
        region:
          type: string
          description: S3 region
        external_byos_role_arn:
          deprecated: true
          description: 'Deprecated: use byos_credential_uid instead with a AWS_ROLE credential type'
          type: string
        byos_credential_uid:
          description: Uid of the BYOS credential used to access the bucket
          type: string
      required:
      - type
      - bucket
      - key
      - region
    AudioChannelMapping:
      type: object
      properties:
        track:
          type: number
          description: Zero-based index of the audio track — the first audio track is track 0, the second is track 1, and so on.
        channels:
          type: array
          items:
            type: number
          description: Zero-based indexes of the channels to use within the track (e.g. [0, 1] for the first two channels of that track).
      required:
      - track
      - channels
    GcsSource:
      type: object
      properties:
        type:
          type: string
          enum:
          - GCS
          example: GCS
        bucket:
          type: string
          description: Google Cloud Storage bucket name
        key:
          type: string
          description: Object key (path) within the bucket
        byos_credential_uid:
          type: string
          description: Uid of the BYOS credential used to access the bucket
      required:
      - type
      - bucket
      - key
      - byos_credential_uid
    ClientRequestError:
      type: object
      properties:
        message_key:
          type: string
          description: A code or key describing the error.
        message:
          type: string
          description: ' A more detailed explanation of what went wrong.'
      required:
      - message_key
      - message
  securitySchemes:
    Api-token:
      type: http
      scheme: bearer
    openId:
      type: openIdConnect
      openIdConnectUrl: https://newsbridge.eu.auth0.com/.well-known/openid-configuration
x-refined-from:
- moments-lab-openapi.json
- moments-lab-openapi.yml