Leonardo.AI · Capability

Leonardo.AI Elements

Leonardo.AI Elements. 5 operations. Lead operation: Get a Single Custom Element by ID. Self-contained Naftiko capability covering the Leonardo.AI Elements business surface.

Leonardo.AI Elements 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 GET, DELETE, and POST methods rooted at /v1/elements.

The capability includes 3 read-only operations and 2 state-changing operations. Lead operation: This endpoint gets the specific custom element. Can be deployed as a REST endpoint, MCP tool, or Agent Skill via Naftiko.

Tagged areas include Leonardo.AI and Elements.

Run with Naftiko Leonardo.AIElements

What You Can Do

GET
Get element by id — This endpoint gets the specific custom element.
/v1/elements/{id}
DELETE
Delete element by id — This endpoint will delete a specific custom model.
/v1/elements/{id}
GET
Get custom elements by user id — This endpoint gets the list of custom elements belongs to the user.
/v1/elements/user/{userId}
POST
Create element — This endpoint will train a new custom element.
/v1/elements
GET
List elements — Get a list of public Elements available for use with generations.
/v1/elements

MCP Tools

leonardo-ai-get-element-by-id

This endpoint gets the specific custom element.

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

This endpoint will delete a specific custom model.

idempotent
leonardo-ai-get-custom-elements-by-user-id

This endpoint gets the list of custom elements belongs to the user.

read-only idempotent
leonardo-ai-create-element

This endpoint will train a new custom element.

leonardo-ai-list-elements

Get a list of public Elements available for use with generations.

read-only idempotent

Capability Spec

elements.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Leonardo.AI Elements
  description: 'Leonardo.AI Elements. 5 operations. Lead operation: Get a Single Custom Element by ID. Self-contained Naftiko
    capability covering the Leonardo.AI Elements business surface.'
  tags:
  - Leonardo.AI
  - Elements
  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: elements
    baseUri: https://cloud.leonardo.ai/api/rest/v1
    description: Leonardo.AI Elements business capability. Self-contained, no shared references.
    resources:
    - name: elements-id
      path: /elements/{id}
      operations:
      - name: get-element-by-id
        method: GET
        description: This endpoint gets the specific custom element.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: The ID of the custom element to return.
          required: true
      - name: delete-element-by-id
        method: DELETE
        description: This endpoint will delete a specific custom model.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: The ID of the element to delete.
          required: true
    - name: elements-user-user-id
      path: /elements/user/{userId}
      operations:
      - name: get-custom-elements-by-user-id
        method: GET
        description: This endpoint gets the list of custom elements belongs to the user.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: userId
          in: path
          type: string
          description: The ID of the user to return.
          required: true
    - name: elements
      path: /elements
      operations:
      - name: create-element
        method: POST
        description: This endpoint will train a new custom element.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: list-elements
        method: GET
        description: Get a list of public Elements available for use with generations.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters: []
    authentication:
      type: bearer
      value: '{{env.LEONARDO_AI_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: elements-rest
    port: 8080
    description: REST adapter for Leonardo.AI Elements. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/elements/{id}
      name: elements-id
      description: REST surface for elements-id.
      operations:
      - method: GET
        name: get-element-by-id
        description: This endpoint gets the specific custom element.
        call: elements.get-element-by-id
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: delete-element-by-id
        description: This endpoint will delete a specific custom model.
        call: elements.delete-element-by-id
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/elements/user/{userId}
      name: elements-user-user-id
      description: REST surface for elements-user-user-id.
      operations:
      - method: GET
        name: get-custom-elements-by-user-id
        description: This endpoint gets the list of custom elements belongs to the user.
        call: elements.get-custom-elements-by-user-id
        with:
          userId: rest.userId
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/elements
      name: elements
      description: REST surface for elements.
      operations:
      - method: POST
        name: create-element
        description: This endpoint will train a new custom element.
        call: elements.create-element
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: list-elements
        description: Get a list of public Elements available for use with generations.
        call: elements.list-elements
        with: {}
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: elements-mcp
    port: 9090
    transport: http
    description: MCP adapter for Leonardo.AI Elements. One tool per consumed operation, routed through this capability's consumes
      block.
    tools:
    - name: leonardo-ai-get-element-by-id
      description: This endpoint gets the specific custom element.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: elements.get-element-by-id
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: leonardo-ai-delete-element-by-id
      description: This endpoint will delete a specific custom model.
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: elements.delete-element-by-id
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: leonardo-ai-get-custom-elements-by-user-id
      description: This endpoint gets the list of custom elements belongs to the user.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: elements.get-custom-elements-by-user-id
      with:
        userId: tools.userId
      outputParameters:
      - type: object
        mapping: $.
    - name: leonardo-ai-create-element
      description: This endpoint will train a new custom element.
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: elements.create-element
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: leonardo-ai-list-elements
      description: Get a list of public Elements available for use with generations.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: elements.list-elements
      with: {}
      outputParameters:
      - type: object
        mapping: $.