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

# Upload recording segment (fmp4)



## OpenAPI

````yaml /api-spec.json post /device/recordings/{stream_path}/segments
openapi: 3.0.0
info:
  contact:
    name: Acusight API Support
  description: >-
    Acusight platform API - custom endpoints + Portainer proxy routes for edge
    AI deployments
  title: Acusight API
  version: 1.0.0
servers:
  - url: https://acusight.io/api
    description: AcuSight Cloud (hosted)
security: []
tags:
  - name: Devices & provisioning
    description: Register, provision, and manage edge devices and their agents.
  - name: Virtual devices
    description: Create and drive simulated devices for testing and demos.
  - name: Alerts & telemetry
    description: Model alerts, alert rules, and product telemetry.
  - name: Organization
    description: Organization-level settings.
  - name: Datasets & data
    description: Projects, batches, datasets, images, annotations, and drift.
  - name: Models & training
    description: Model registry, training jobs, exports, and inference.
  - name: Pipeline data
    description: Detection time-series and aggregated pipeline analytics.
paths:
  /device/recordings/{stream_path}/segments:
    post:
      tags:
        - Devices & provisioning
      summary: Upload recording segment (fmp4)
      parameters:
        - description: Device API key (adk_<hex>)
          in: header
          name: X-Device-Key
          required: true
          schema:
            type: string
        - description: Stream path (mediamtx path name)
          in: path
          name: stream_path
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                segment:
                  description: fmp4 segment bytes
                  type: string
                  format: binary
                metadata:
                  description: 'JSON: filename, stream_id, segment_number, ntp_ns, sha256'
                  type: string
              required:
                - segment
                - metadata
        required: true
      responses:
        '200':
          description: Duplicate (same sha256)
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
        '201':
          description: Stored
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
        '401':
          description: invalid_device_key
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
        '409':
          description: sha256_conflict
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
        '413':
          description: segment_too_large
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
        '422':
          description: sha256_mismatch
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
        '503':
          description: storage_unavailable
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT access token. Paste the token only; the Bearer prefix is added
        automatically.

````