> ## 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.

# Split batch images

> Assigns train/val/test splits for images in the batch while respecting manual assignments. By default, batches are promoted to the dataset stage unless `promote_to_dataset` is set to false.



## OpenAPI

````yaml /api-spec.json put /data/batches/{id}/images/split
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:
  /data/batches/{id}/images/split:
    put:
      tags:
        - Datasets & data
      summary: Split batch images
      description: >-
        Assigns train/val/test splits for images in the batch while respecting
        manual assignments. By default, batches are promoted to the dataset
        stage unless `promote_to_dataset` is set to false.
      parameters:
        - description: Batch ID
          in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/types.ImageSplitRequest'
        description: Split configuration
        required: true
      responses:
        '200':
          description: Split assignment summary
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/types.APIResponse'
                  - properties:
                      data:
                        $ref: '#/components/schemas/types.ImageSplitResult'
                    type: object
        '400':
          description: Invalid request payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.APIResponse'
        '404':
          description: Batch not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.APIResponse'
        '500':
          description: Failed to assign splits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.APIResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    types.ImageSplitRequest:
      properties:
        completed_only:
          description: >-
            Optional: only split images with completed annotations (default
            true)
          type: boolean
        force_reassignment:
          type: boolean
        mark_all_complete:
          description: >-
            Optional: mark all images as completed before processing (default
            false)
          type: boolean
        mode:
          enum:
            - proportions
            - all
            - existing
          type: string
        promote_to_dataset:
          type: boolean
        target:
          description: '"train" | "val" | "test" (when Mode = all)'
          type: string
        test_split:
          type: number
        train_split:
          type: number
        val_split:
          type: number
      required:
        - mode
      type: object
    types.APIResponse:
      properties:
        data: {}
        error:
          $ref: '#/components/schemas/types.APIError'
        meta:
          $ref: '#/components/schemas/types.APIMeta'
        success:
          type: boolean
      type: object
    types.ImageSplitResult:
      properties:
        batch_id:
          type: integer
        class_distribution:
          additionalProperties:
            additionalProperties:
              type: integer
            type: object
          type: object
        class_targets:
          additionalProperties:
            additionalProperties:
              type: integer
            type: object
          type: object
        kept_count:
          type: integer
        locked_count:
          type: integer
        moved_count:
          type: integer
        split_counts:
          additionalProperties:
            type: integer
          type: object
        test_count:
          type: integer
        total:
          type: integer
        train_count:
          type: integer
        val_count:
          type: integer
        warnings:
          items:
            type: string
          type: array
      type: object
    types.APIError:
      properties:
        code:
          type: string
        details:
          type: string
        message:
          type: string
      type: object
    types.APIMeta:
      properties:
        count:
          type: integer
        limit:
          type: integer
        offset:
          type: integer
        total:
          type: integer
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT access token. Paste the token only; the Bearer prefix is added
        automatically.

````