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

# List images

> Returns the images of one type. Each item carries `type`, so you can
give its `id` and `type` together when you launch an instance.

`type=vm` returns every virtual machine image available to your
account, in one page (Windows images are listed, but cannot be
created through the API in this release): `pagination.next` is always `null`, `pagination.size` is
the number of images, and `cursor`, `size` and `mine=true` are refused.
An image is left out when no location your account can use allows its
operating system family.

`type=container` returns a cursor-paginated list. By default it is the
Hive catalogue. With `mine=true` it is the templates you saved
yourself. Templates belong to one user, so a teammate's templates are
never listed.




## OpenAPI

````yaml /public-v1.yaml get /images
openapi: 3.0.3
info:
  title: Hive Compute Public API
  description: |
    The Hive Compute public API lets you manage compute instances
    programmatically, and browse the hardware presets and regions available to
    you.

    This release of the API covers creating, reading and controlling
    instances, the images you can launch, and registering the SSH key your
    instances use. To create an instance, pick a preset from `GET /presets`
    and an image from `GET /images`, register an SSH key once with
    `POST /ssh-keys`, then call `POST /instances`.

    **Base URL:** `https://api.hivecompute.ai/v1`

    ## Authentication

    Every endpoint requires an API key, sent as a Bearer token:

    ```
    Authorization: Bearer <your-api-key>
    ```

    API keys are issued manually at this release. Email
    [support@hivenet.com](mailto:support@hivenet.com) to request one. There is
    no self-service endpoint or console page for creating, listing or rotating
    keys yet; both will arrive in a later release.

    Treat the key as a password. It carries the full permissions of your
    account, does not expire on its own, and can only be replaced by contacting
    support.

    ## Scope

    Requests are scoped to the account the key belongs to. You can only see and
    act on your own instances and SSH keys. Regions and presets are the shared
    public catalogue and look the same to everyone. The images you can launch
    depend on the locations your account can use.

    ## Errors

    Every error shares one envelope:

    ```json
    {
      "error": {
        "code": "NOT_FOUND",
        "message": "Not found.",
        "request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      }
    }
    ```

    Quote `request_id` when contacting support: it identifies the exact request
    in our logs.

    Branch on `code`, never on `message`. Most messages are fixed strings
    chosen per status rather than a description of your particular request:
    `403` and `404` read the same every time, a `409` may say what to change
    (for example that a preset is sold out), and `401` has two fixed
    forms depending on whether the key was absent or rejected. Only
    `VALIDATION_ERROR` carries detail, and even there a malformed path id
    reports only that a UUID was expected, without naming the parameter. The
    underlying detail is internal; `request_id` is how we trace a specific
    failure.

    A request with no key gets `401`, unless its body is not valid JSON, its
    body is too large or its path cannot be decoded, which are rejected first.
    With a key, the format of the request is checked before the key itself: a
    malformed path id, or a parameter or body of the wrong type or out of
    range, gets `400` whether or not the key is valid. That `400` holds nothing
    about any account. Everything else is checked after the key, so an invalid
    key gets `401`.

    ## Rate limiting

    Requests are rate limited per API key, currently 60 requests per minute,
    with a separate budget for each endpoint. Calls to one endpoint do not use
    up another endpoint's budget, and a key counts the same wherever it calls
    from. Exceeding the limit returns `429` with a `Retry-After` header giving
    the number of seconds to wait. Treat the limit as subject to change and back
    off on `429` rather than pacing to a fixed number. The metrics endpoint
    shares one budget across instance IDs. Shared service protection can
    also return `429`. Use the delay in the response.

    ## Pagination

    Paginated endpoints return this envelope. `GET /regions` returns an array:

    ```json
    {
      "data": [],
      "pagination": { "next": "opaque-cursor", "size": 50 }
    }
    ```

    Pass `pagination.next` back as the `cursor` query parameter to fetch the
    following page. When it is `null` you have reached the last page. Cursors
    are opaque; do not construct or parse them.
  version: 1.0.0
  contact:
    name: Hive Compute Support
    email: support@hivenet.com
    url: https://hivenet.com
servers:
  - url: https://api.hivecompute.ai/v1
    description: Production
  - url: https://staging-api.hivecompute.ai/v1
    description: Staging
security:
  - bearerAuth: []
tags:
  - name: Instances
    description: >
      Compute instances are the core resource of the platform. Each instance

      runs a CPU or GPU workload on a hardware preset in a region, and moves

      through this lifecycle:


      `CREATED → DEPLOYED → STARTING → RUNNING → STOPPING → STOPPED →
      TERMINATING → TERMINATED`


      A stopped instance can be started again and keeps its storage. A

      terminated instance is gone permanently and cannot be recovered.
  - name: Catalogue
    description: |
      The regions and hardware presets available to launch instances on. This
      is shared public reference data, identical for every caller.
  - name: Images
    description: |
      The images an instance boots. A `vm` image is an operating system for a
      virtual machine. A `container` image is a template for a container
      instance: the Hive catalogue, or templates you saved yourself.
  - name: SSH keys
    description: |
      The public key you use to log in to your instances. Your account can
      hold more than one key. New instances get the key you registered last,
      whether through this API or in the console's Settings, and the console
      launches with that same key.
paths:
  /images:
    get:
      tags:
        - Images
      summary: List images
      description: >
        Returns the images of one type. Each item carries `type`, so you can

        give its `id` and `type` together when you launch an instance.


        `type=vm` returns every virtual machine image available to your

        account, in one page (Windows images are listed, but cannot be

        created through the API in this release): `pagination.next` is always
        `null`, `pagination.size` is

        the number of images, and `cursor`, `size` and `mine=true` are refused.

        An image is left out when no location your account can use allows its

        operating system family.


        `type=container` returns a cursor-paginated list. By default it is the

        Hive catalogue. With `mine=true` it is the templates you saved

        yourself. Templates belong to one user, so a teammate's templates are

        never listed.
      operationId: listImages
      parameters:
        - name: type
          in: query
          required: true
          description: The kind of image to list. Case-insensitive.
          schema:
            type: string
            enum:
              - vm
              - container
        - $ref: '#/components/parameters/Cursor'
        - $ref: '#/components/parameters/Size'
        - name: mine
          in: query
          required: false
          description: |
            For `type=container` only. `true` lists the templates you saved
            instead of the Hive catalogue.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: A page of images.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      oneOf:
                        - $ref: '#/components/schemas/VmImage'
                        - $ref: '#/components/schemas/ContainerImage'
                      discriminator:
                        propertyName: type
                        mapping:
                          vm: '#/components/schemas/VmImage'
                          container: '#/components/schemas/ContainerImage'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/AccountForbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    Cursor:
      name: cursor
      in: query
      required: false
      description: |
        Opaque cursor from a previous response's `pagination.next`. Omit to
        start at the first page.
      schema:
        type: string
    Size:
      name: size
      in: query
      required: false
      description: Number of items per page.
      schema:
        type: integer
        minimum: 1
        maximum: 200
        default: 50
  schemas:
    VmImage:
      type: object
      properties:
        type:
          type: string
          enum:
            - vm
        id:
          type: string
          description: Unique identifier, used when launching an instance.
          example: ubuntu24.04
        name:
          type: string
          example: Ubuntu 24.04 LTS
        os_family:
          type: string
          enum:
            - LINUX
            - WINDOWS
            - UNSPECIFIED
          description: |
            The guest operating system family.

            More values can come in a later release. Read `UNSPECIFIED`, and
            any value not in this list, as "unknown".
        gpu_supported:
          type: boolean
          description: Whether the image can boot on a GPU preset.
        login_user:
          type: string
          description: |
            The account a Linux image creates for you to log in with. Empty
            when it is not known, and always empty for Windows, whose account
            is named at launch in the console.
          example: ubuntu
        min_disk_gb:
          type: integer
          description: >-
            Minimum preset storage in GB. A reported zero does not establish how
            much storage the workload needs.
        min_memory_gb:
          type: integer
          description: >-
            Minimum preset memory in GB. A reported zero does not establish how
            much memory the workload needs.
        secure_boot:
          type: boolean
          description: >-
            Whether instances boot with UEFI Secure Boot. Always `false` for
            Linux.
        tpm:
          type: boolean
          description: Whether instances get a virtual TPM. Always `false` for Linux.
    ContainerImage:
      type: object
      properties:
        type:
          type: string
          enum:
            - container
        id:
          type: string
          description: Unique identifier, used when launching an instance.
        name:
          type: string
          example: Jupyter
        software_list:
          type: array
          items:
            type: string
          example:
            - python
            - jupyter
        registry:
          type: string
          example: docker.io
        image:
          type: string
          example: jupyter/base-notebook:latest
        workload_type:
          type: string
          enum:
            - CPU
            - GPU
            - UNSPECIFIED
          description: |
            The hardware the template is for.

            More values can come in a later release. Read `UNSPECIFIED`, and
            any value not in this list, as "unknown".
        env:
          type: array
          description: |
            The variables the template sets. The value of a secret variable is
            replaced by a placeholder, never returned.
          items:
            type: object
            properties:
              key:
                type: string
              value:
                type: string
              is_secret:
                type: boolean
        requires_init:
          type: boolean
        command:
          type: string
          description: The command the container runs. Empty means the image's own.
        created_at:
          type: string
          format: date-time
          nullable: true
    Pagination:
      type: object
      description: Cursor pagination metadata.
      properties:
        next:
          type: string
          nullable: true
          description: |
            Cursor for the following page, or `null` on the last page.
          example: >-
            eyJ0IjoiMjAyNi0wNy0yOVQxMDowMDowMFoiLCJpIjoiNDkyMzBkZWQtYWI5OS00ZDAyLWI1NmMtZDUwNzBjY2U2MzgzIn0=
        size:
          type: integer
          description: Page size used for this response.
          example: 50
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - UNAUTHORIZED
                - FORBIDDEN
                - NOT_FOUND
                - VALIDATION_ERROR
                - CONFLICT
                - TOO_MANY_REQUESTS
                - SERVICE_UNAVAILABLE
                - INTERNAL_ERROR
              description: Stable, machine-readable error code.
            message:
              type: string
              description: Human-readable explanation. Do not match on this text.
            request_id:
              type: string
              description: Identifies this request in our logs. Quote it to support.
  responses:
    ValidationError:
      description: The request was malformed or a parameter was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: VALIDATION_ERROR
              message: >-
                [{"property":"size","constraints":["size must not be greater
                than 200"]}]
              request_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    Unauthorized:
      description: The API key is missing, malformed or not valid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNAUTHORIZED
              message: Missing API token
              request_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    AccountForbidden:
      description: >-
        Your account cannot use the API now, for example because it is
        suspended.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: FORBIDDEN
              message: You do not have access to this resource.
              request_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    RateLimited:
      description: |
        Too many requests. Wait the number of seconds given in `Retry-After`
        before retrying.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: TOO_MANY_REQUESTS
              message: Too Many Requests
              request_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    InternalError:
      description: |
        Something went wrong on our side. Retry, then contact support with the
        `request_id`.

        The `message` is deliberately generic and carries no detail about the
        cause. Quote the `request_id`, which identifies the underlying error in
        our logs.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INTERNAL_ERROR
              message: An internal error occurred.
              request_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        An API key issued by Hive Compute support. See **Authentication**
        above for how to request one.

````

## Related topics

- [List images](https://docs.hivenet.com/public-api/endpoints/list-images.md)
- [Use pagination and filters](https://docs.hivenet.com/public-api/use-pagination-and-filters.md)
- [Create instance](https://docs.hivenet.com/public-api/endpoints/create-instance.md)
- [Get started with the Compute API](https://docs.hivenet.com/public-api/get-started-with-the-compute-api.md)
- [Create an instance](https://docs.hivenet.com/api-reference/instances/create-an-instance.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.