Leonardo.AI · Capability

Leonardo.AI Datasets

Leonardo.AI Datasets. 5 operations. Lead operation: Create a Dataset. Self-contained Naftiko capability covering the Leonardo.AI Datasets business surface.

Leonardo.AI Datasets is a Naftiko capability published by Leonardo.AI, one of 14 capabilities the APIs.io network indexes for this provider. It bundles 5 operations across the POST, GET, and DELETE methods rooted at /v1/datasets.

The capability includes 1 read-only operation and 4 state-changing operations. Lead operation: This endpoint creates a new dataset. Can be deployed as a REST endpoint, MCP tool, or Agent Skill via Naftiko.

Tagged areas include Leonardo.AI and Datasets.

Run with Naftiko Leonardo.AIDatasets

What You Can Do

POST
Create dataset — This endpoint creates a new dataset
/v1/datasets
GET
Get dataset by id — This endpoint gets the specific dataset
/v1/datasets/{id}
DELETE
Delete dataset by id — This endpoint deletes the specific dataset
/v1/datasets/{id}
POST
Upload dataset image — This endpoint returns presigned details to upload a dataset image to S3
/v1/datasets/{datasetId}/upload
POST
Upload dataset image from gen — This endpoint will upload a previously generated image to the dataset
/v1/datasets/{datasetId}/upload/gen

MCP Tools

leonardo-ai-create-dataset

This endpoint creates a new dataset

leonardo-ai-get-dataset-by-id

This endpoint gets the specific dataset

read-only idempotent
leonardo-ai-delete-dataset-by-id

This endpoint deletes the specific dataset

idempotent
leonardo-ai-upload-dataset-image

This endpoint returns presigned details to upload a dataset image to S3

leonardo-ai-upload-dataset-image-from-gen

This endpoint will upload a previously generated image to the dataset

Capability Spec

datasets.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Leonardo.AI Datasets
  description: 'Leonardo.AI Datasets. 5 operations. Lead operation: Create a Dataset. Self-contained Naftiko capability covering
    the Leonardo.AI Datasets business surface.'
  tags:
  - Leonardo.AI
  - Datasets
  created: '2026-05-25'
  modified: '2026-05-25'
binds:
- namespace: env
  keys:
    LEONARDO_AI_API_KEY: LEONARDO_AI_API_KEY
capability:
  consumes:
  - type: http
    namespace: datasets
    baseUri: https://cloud.leonardo.ai/api/rest/v1
    description: Leonardo.AI Datasets business capability. Self-contained, no shared references.
    resources:
    - name: datasets
      path: /datasets
      operations:
      - name: create-dataset
        method: POST
        description: This endpoint creates a new dataset
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: datasets-id
      path: /datasets/{id}
      operations:
      - name: get-dataset-by-id
        method: GET
        description: This endpoint gets the specific dataset
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the dataset to return.
          required: true
      - name: delete-dataset-by-id
        method: DELETE
        description: This endpoint deletes the specific dataset
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the dataset to delete.
          required: true
    - name: datasets-dataset-id-upload
      path: /datasets/{datasetId}/upload
      operations:
      - name: upload-dataset-image
        method: POST
        description: This endpoint returns presigned details to upload a dataset image to S3
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: datasetId
          in: path
          type: string
          description: _"datasetId" is required
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: datasets-dataset-id-upload-gen
      path: /datasets/{datasetId}/upload/gen
      operations:
      - name: upload-dataset-image-from-gen
        method: POST
        description: This endpoint will upload a previously generated image to the dataset
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: datasetId
          in: path
          type: string
          description: The ID of the dataset to upload the image to.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      value: '{{env.LEONARDO_AI_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: datasets-rest
    port: 8080
    description: REST adapter for Leonardo.AI Datasets. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/datasets
      name: datasets
      description: REST surface for datasets.
      operations:
      - method: POST
        name: create-dataset
        description: This endpoint creates a new dataset
        call: datasets.create-dataset
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/datasets/{id}
      name: datasets-id
      description: REST surface for datasets-id.
      operations:
      - method: GET
        name: get-dataset-by-id
        description: This endpoint gets the specific dataset
        call: datasets.get-dataset-by-id
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: delete-dataset-by-id
        description: This endpoint deletes the specific dataset
        call: datasets.delete-dataset-by-id
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/datasets/{datasetId}/upload
      name: datasets-dataset-id-upload
      description: REST surface for datasets-dataset-id-upload.
      operations:
      - method: POST
        name: upload-dataset-image
        description: This endpoint returns presigned details to upload a dataset image to S3
        call: datasets.upload-dataset-image
        with:
          datasetId: rest.datasetId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/datasets/{datasetId}/upload/gen
      name: datasets-dataset-id-upload-gen
      description: REST surface for datasets-dataset-id-upload-gen.
      operations:
      - method: POST
        name: upload-dataset-image-from-gen
        description: This endpoint will upload a previously generated image to the dataset
        call: datasets.upload-dataset-image-from-gen
        with:
          datasetId: rest.datasetId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: datasets-mcp
    port: 9090
    transport: http
    description: MCP adapter for Leonardo.AI Datasets. One tool per consumed operation, routed through this capability's consumes
      block.
    tools:
    - name: leonardo-ai-create-dataset
      description: This endpoint creates a new dataset
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: datasets.create-dataset
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: leonardo-ai-get-dataset-by-id
      description: This endpoint gets the specific dataset
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: datasets.get-dataset-by-id
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: leonardo-ai-delete-dataset-by-id
      description: This endpoint deletes the specific dataset
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: datasets.delete-dataset-by-id
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: leonardo-ai-upload-dataset-image
      description: This endpoint returns presigned details to upload a dataset image to S3
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: datasets.upload-dataset-image
      with:
        datasetId: tools.datasetId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: leonardo-ai-upload-dataset-image-from-gen
      description: This endpoint will upload a previously generated image to the dataset
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: datasets.upload-dataset-image-from-gen
      with:
        datasetId: tools.datasetId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.