Viam Vision Service API

Run object detection, image classification, and 3D segmentation against a configured camera component. Supports GetDetectionsFromCamera, GetClassificationsFromCamera, GetObjectPointClouds, and CaptureAllFromCamera.

Viam Vision Service API is one of 14 APIs that Viam publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 2 machine-runnable capabilities that can be deployed as REST, MCP, or Agent Skill surfaces via Naftiko.

Tagged areas include Robotics, Vision, Computer Vision, and Services. The published artifact set on APIs.io includes API documentation, an OpenAPI specification, and 2 Naftiko capability specs.

OpenAPI Specification

viam-vision-service-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Viam Vision Service API
  description: |
    REST/JSON transcoding of the Viam VisionService gRPC API. Run object detection,
    image classification, and 3D segmentation against a configured camera component.

    Canonical contract: https://github.com/viamrobotics/api/blob/main/proto/viam/service/vision/v1/vision.proto
  version: '2026.05'
  contact:
    name: Viam Support
    url: https://www.viam.com/contact
servers:
  - url: https://{machine_address}
    description: Per-machine viam-server endpoint.
    variables:
      machine_address:
        default: machine.local.viam.cloud:443
security:
  - ApiKeyAuth: []
tags:
  - name: Vision
    description: Detections, classifications, and 3D segmentation.
paths:
  /viam.service.vision.v1.VisionService/GetDetectionsFromCamera:
    post:
      summary: Viam Get Detections From Camera
      description: Run object detection against a configured camera component.
      operationId: getDetectionsFromCamera
      tags: [Vision]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [name, camera_name]
              properties:
                name: { type: string }
                camera_name: { type: string }
                extra: { type: object }
      responses:
        '200':
          description: Successful response.
  /viam.service.vision.v1.VisionService/GetDetections:
    post:
      summary: Viam Get Detections
      description: Run object detection against a provided image.
      operationId: getDetections
      tags: [Vision]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [name, image, width, height, mime_type]
              properties:
                name: { type: string }
                image: { type: string, format: byte }
                width: { type: integer }
                height: { type: integer }
                mime_type: { type: string }
      responses:
        '200':
          description: Successful response.
  /viam.service.vision.v1.VisionService/GetClassificationsFromCamera:
    post:
      summary: Viam Get Classifications From Camera
      description: Run image classification against a configured camera component.
      operationId: getClassificationsFromCamera
      tags: [Vision]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [name, camera_name, n]
              properties:
                name: { type: string }
                camera_name: { type: string }
                n: { type: integer }
      responses:
        '200':
          description: Successful response.
  /viam.service.vision.v1.VisionService/GetClassifications:
    post:
      summary: Viam Get Classifications
      description: Run image classification against a provided image.
      operationId: getClassifications
      tags: [Vision]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [name, image, width, height, mime_type, n]
              properties:
                name: { type: string }
                image: { type: string, format: byte }
                width: { type: integer }
                height: { type: integer }
                mime_type: { type: string }
                n: { type: integer }
      responses:
        '200':
          description: Successful response.
  /viam.service.vision.v1.VisionService/GetObjectPointClouds:
    post:
      summary: Viam Get Object Point Clouds
      description: Segment 3D point clouds from a camera component into discrete objects.
      operationId: getObjectPointClouds
      tags: [Vision]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [name, camera_name, mime_type]
              properties:
                name: { type: string }
                camera_name: { type: string }
                mime_type: { type: string }
      responses:
        '200':
          description: Successful response.
  /viam.service.vision.v1.VisionService/CaptureAllFromCamera:
    post:
      summary: Viam Capture All From Camera
      description: Return image, detections, classifications, and point clouds in a single call.
      operationId: captureAllFromCamera
      tags: [Vision]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [name, camera_name]
              properties:
                name: { type: string }
                camera_name: { type: string }
                return_image: { type: boolean }
                return_classifications: { type: boolean }
                return_detections: { type: boolean }
                return_object_point_clouds: { type: boolean }
      responses:
        '200':
          description: Successful response.
  /viam.service.vision.v1.VisionService/GetProperties:
    post:
      summary: Viam Get Properties
      description: Retrieve properties of the vision service.
      operationId: getProperties
      tags: [Vision]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [name]
              properties:
                name: { type: string }
      responses:
        '200':
          description: Successful response.
  /viam.service.vision.v1.VisionService/DoCommand:
    post:
      summary: Viam Do Command
      description: Model-specific custom commands.
      operationId: doCommand
      tags: [Vision]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [name, command]
              properties:
                name: { type: string }
                command: { type: object }
      responses:
        '200':
          description: Successful response.
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: key
      description: Viam API key or location secret.