Lightly Samples API

Manage samples and their signed read / write URLs within a dataset.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lightly-ai-samples-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lightly-ai-samples-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: LightlyOne Platform Datasets Samples API
  description: REST API for the LightlyOne data-curation and active-learning platform for computer vision. The API manages datasets, samples, embeddings, cloud datasources, selection / active-learning runs (the LightlyOne Worker), tags, and asynchronous jobs. Paths and verbs mirror the OpenAPI-generated client shipped inside the open-source `lightly` Python package (lightly.openapi_generated.swagger_client). The open-source self-supervised learning SDK is a separate, pip-installable library and is not part of this HTTP surface.
  termsOfService: https://www.lightly.ai/terms-of-service
  contact:
    name: Lightly Support
    email: support@lightly.ai
    url: https://www.lightly.ai
  license:
    name: Proprietary
    url: https://www.lightly.ai/terms-of-service
  version: '1.0'
servers:
- url: https://api.lightly.ai
  description: LightlyOne platform production API
security:
- ApiKeyAuth: []
- BearerAuth: []
tags:
- name: Samples
  description: Manage samples and their signed read / write URLs within a dataset.
paths:
  /v1/datasets/{datasetId}/samples:
    get:
      operationId: getSamplesByDatasetId
      tags:
      - Samples
      summary: List samples in a dataset.
      parameters:
      - $ref: '#/components/parameters/DatasetId'
      responses:
        '200':
          description: A list of samples.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SampleData'
    post:
      operationId: createSampleByDatasetId
      tags:
      - Samples
      summary: Create a sample in a dataset.
      parameters:
      - $ref: '#/components/parameters/DatasetId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SampleCreateRequest'
      responses:
        '201':
          description: The created sample id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateEntityResponse'
  /v1/datasets/{datasetId}/samples/{sampleId}:
    get:
      operationId: getSampleById
      tags:
      - Samples
      summary: Get a sample by id.
      parameters:
      - $ref: '#/components/parameters/DatasetId'
      - $ref: '#/components/parameters/SampleId'
      responses:
        '200':
          description: The sample.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SampleData'
    put:
      operationId: updateSampleById
      tags:
      - Samples
      summary: Update a sample by id.
      parameters:
      - $ref: '#/components/parameters/DatasetId'
      - $ref: '#/components/parameters/SampleId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SampleUpdateRequest'
      responses:
        '200':
          description: Updated.
  /v1/datasets/{datasetId}/samples/{sampleId}/readurl:
    get:
      operationId: getSampleImageReadUrlById
      tags:
      - Samples
      summary: Get a signed read URL for a sample image.
      parameters:
      - $ref: '#/components/parameters/DatasetId'
      - $ref: '#/components/parameters/SampleId'
      - name: type
        in: query
        required: true
        schema:
          type: string
          enum:
          - full
          - thumbnail
      responses:
        '200':
          description: A signed read URL.
          content:
            application/json:
              schema:
                type: string
  /v1/datasets/{datasetId}/samples/{sampleId}/writeurl:
    get:
      operationId: getSampleImageWriteUrlById
      tags:
      - Samples
      summary: Get a signed write URL for a sample image.
      parameters:
      - $ref: '#/components/parameters/DatasetId'
      - $ref: '#/components/parameters/SampleId'
      - name: isThumbnail
        in: query
        required: true
        schema:
          type: boolean
      responses:
        '200':
          description: A signed write URL.
          content:
            application/json:
              schema:
                type: string
components:
  schemas:
    SampleCreateRequest:
      type: object
      properties:
        fileName:
          type: string
        thumbName:
          type: string
        type:
          type: string
          enum:
          - IMAGE
          - VIDEO
          - CROP
        metaData:
          type: object
          additionalProperties: true
      required:
      - fileName
    SampleUpdateRequest:
      type: object
      properties:
        metaData:
          type: object
          additionalProperties: true
        customMetaData:
          type: object
          additionalProperties: true
    CreateEntityResponse:
      type: object
      properties:
        id:
          type: string
      required:
      - id
    SampleData:
      type: object
      properties:
        id:
          type: string
        datasetId:
          type: string
        fileName:
          type: string
        type:
          type: string
          enum:
          - IMAGE
          - VIDEO
          - CROP
        thumbName:
          type: string
        exif:
          type: object
          additionalProperties: true
        metaData:
          type: object
          additionalProperties: true
        customMetaData:
          type: object
          additionalProperties: true
        createdAt:
          type: integer
          format: int64
      required:
      - id
      - fileName
  parameters:
    SampleId:
      name: sampleId
      in: path
      required: true
      schema:
        type: string
    DatasetId:
      name: datasetId
      in: path
      required: true
      schema:
        type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: token
      description: LightlyOne API token passed as the `token` query parameter. Find your token in the preferences menu of the LightlyOne Platform.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Public JWT bearer token passed in the `Authorization: Bearer <token>` header for browser / public-token authenticated calls.'