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

# Start Recording Episode

> Asynchronously start recording an episode in the background.
Output format is chosen when stopping the recording.



## OpenAPI

````yaml post /recording/start
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /recording/start:
    post:
      tags:
        - recording
      summary: Start Recording Episode
      description: |-
        Asynchronously start recording an episode in the background.
        Output format is chosen when stopping the recording.
      operationId: start_recording_episode_recording_start_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecordingStartRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    RecordingStartRequest:
      description: Request to start the recording of an episode.
      properties:
        add_metadata:
          anyOf:
            - additionalProperties:
                items: {}
                type: array
              type: object
            - type: 'null'
          description: >-
            Passing a dictionnary will store the value in each row of the
            recorded dataset. The key is the name of the column, and the value
            is a list. If set to None, no additional metadata is saved.
          examples:
            - bbox_position:
                - 0.5
                - 1
                - 0
                - 0.5
          title: Add Metadata
        branch_path:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Path to the branch to push the dataset to, in addition to the main
            branch. If set to None, only push to the main branch. Defaults to
            None.
          title: Branch Path
        cameras_ids_to_record:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          description: >-
            List of camera ids to record. If set to None, records all available
            cameras.
          examples:
            - - 0
              - 1
          title: Cameras Ids To Record
        dataset_name:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Name of the dataset to save the episode in.If None, defaults to the
            value set in Admin Configuration.
          examples:
            - example_dataset
          title: Dataset Name
        enable_rerun_visualization:
          default: false
          description: Enable rerun
          title: Enable Rerun Visualization
          type: boolean
        episode_format:
          anyOf:
            - enum:
                - json
                - lerobot_v2
                - lerobot_v2.1
              type: string
            - type: 'null'
          description: >-
            Format to save the episode.

            `json` is compatible with OpenVLA and stores videos as a series of
            npy.

            `lerobot_v2` is compatible with [lerobot
            training.](https://docs.phospho.ai/learn/ai-models).If None,
            defaults to the value set in Admin Configuration.
          examples:
            - lerobot_v2.1
          title: Episode Format
        freq:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            Records steps of the robot at this frequency.If None, defaults to
            the value set in Admin Configuration.
          examples:
            - 30
          title: Freq
        instruction:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            A text describing the recorded task. If set to None, defaults to the
            value set in Admin Configuration.
          examples:
            - Pick up the orange brick and put it in the black box.
          title: Instruction
        leader_arm_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Serial numbers of the leader arms used during the recording
          examples:
            - - /dev/ttyUSB0
          title: Leader Arm Ids
        robot_serials_to_ignore:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            List of robot serial ids to ignore. If set to None, records all
            available robots.
          examples:
            - - /dev/ttyUSB0
          title: Robot Serials To Ignore
        save_cartesian:
          default: false
          description: >-
            Record cartesian positions of the robots as well, this will make
            your dataset incompatible with lerobot and it only works for robots
            with simulators. Defaults to False.
          title: Save Cartesian
          type: boolean
        target_video_size:
          anyOf:
            - maxItems: 2
              minItems: 2
              prefixItems:
                - type: integer
                - type: integer
              type: array
            - type: 'null'
          description: >-
            Target video size for the recording, all videos in the dataset
            should have the same size. If set to None, defaults to the value set
            in Admin Configuration.
          examples:
            - - 320
              - 240
          title: Target Video Size
        video_codec:
          anyOf:
            - enum:
                - avc1
                - hev1
                - mp4v
                - hvc1
                - avc3
                - av01
                - vp09
                - av1
              type: string
            - type: 'null'
          description: >-
            Codec to use for the video saving.If None, defaults to the value set
            in Admin Configuration.
          examples:
            - avc1
          title: Video Codec
      title: RecordingStartRequest
      type: object
    StatusResponse:
      additionalProperties: true
      description: Default response. May contain other fields.
      properties:
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        status:
          default: ok
          enum:
            - ok
            - error
          title: Status
          type: string
      title: StatusResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````