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

# Image segmentation



## OpenAPI

````yaml /api-reference/openapi.json post /v1/images/segmentation
openapi: 3.1.0
info:
  title: SynapsAI Inference API
  version: 1.0.0
servers:
  - url: https://api.synapsai.cloud
    description: Production server
security: []
paths:
  /v1/images/segmentation:
    post:
      summary: Image segmentation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageSegmentationRequest'
      responses:
        '200':
          description: Segmentation masks and metadata
          content:
            application/json:
              schema:
                type: object
                properties:
                  masks:
                    type: array
                    items:
                      type: string
                  scores:
                    type: array
                    items:
                      type: number
components:
  schemas:
    ImageSegmentationRequest:
      allOf:
        - type: object
          description: Request parameters for image segmentation pipelines.
          properties:
            inputs:
              oneOf:
                - type: string
                - type: array
                  items: {}
                - type: string
                  format: binary
              description: Image or list of images to segment. Required.
            subtask:
              type: string
              default: panoptic
              description: >-
                Segmentation subtask type (e.g., 'panoptic', 'instance',
                'semantic').
            threshold:
              type: number
              default: 0.9
              description: Confidence threshold to include predicted segments.
            mask_threshold:
              type: number
              default: 0.5
              description: Pixel-level mask threshold for binarizing predicted masks.
            overlap_mask_area_threshold:
              type: number
              default: 0.5
              description: Threshold controlling how overlapping masks are handled.
            timeout:
              type: number
              nullable: true
              description: Maximum time for fetching remote images or processing.
          required:
            - inputs

````