> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-host-2752-sla-api-documentation.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# list machine

> Creates or updates ask contracts for a machine to list it for rent on the vast.ai platform.
Allows setting offer pricing, rental types, end dates, discount rates, and SLA parameters.

SLA request-body fields (`sla_r_claim`, `sla_sigma_x`, optional `sla_max_beta`) are supported on this REST endpoint. SLA activates when `sla_r_claim > 0`. Host-sent `sla_r_target` / legacy `sla_reliability` are ignored — clients choose coverage at search/rent time. The published CLI and SDK do not yet expose SLA fields — use the host console (**Set Pricing → SLA**) or REST/`curl` until CLI/SDK support ships.

CLI Usage (non-SLA fields): `vastai list machine <machine_id> [options]`



## OpenAPI

````yaml /api-reference/openapi.yaml put /api/v0/machines/create_asks
openapi: 3.1.0
info:
  title: Vast.ai API
  description: >-
    Vast.ai REST API for managing GPU cloud instances, machine operations, and
    AI/ML workflows.


    ## AI Agent Quick-Start


    Install the CLI skill for your agent (Claude Code, Cursor, Windsurf, etc.):
      npx skills add vast-ai/vast-cli

    CLI reference:
    https://raw.githubusercontent.com/vast-ai/vast-cli/master/vastai/SKILL.md

    SDK reference:
    https://raw.githubusercontent.com/vast-ai/vast-cli/master/vastai_sdk/SKILL.md


    ## Auth

    All endpoints require `Authorization: Bearer $VAST_API_KEY`.

    Get your key at: https://cloud.vast.ai/manage-keys/


    ## Key Quirks

    - `gpu_ram` in CLI = GB; in REST API = MB (CLI auto-converts)

    - SSH keys must be registered BEFORE creating an instance (VM: no recovery;
    Docker: can add post-create)

    - `onstart` field is limited to 4048 characters -- gzip+base64 for longer
    scripts

    - `POST /api/v0/asks/{id}/` (create instance) returns `new_contract` as the
    instance ID, not `id`

    - Poll trap: if `actual_status` becomes `exited`, `unknown`, or `offline` it
    will never reach `running` -- destroy and retry
  version: 1.0.0
  contact:
    name: Vast.ai Support
    url: https://discord.gg/vast
  license:
    name: Vast.ai Terms of Service
    url: https://vast.ai/terms/
servers:
  - url: https://console.vast.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/v0/machines/create_asks:
    put:
      tags:
        - Machines
      summary: list machine
      description: >-
        Creates or updates ask contracts for a machine to list it for rent on
        the vast.ai platform.

        Allows setting offer pricing, rental types, end dates, discount rates,
        and SLA parameters.


        SLA request-body fields (`sla_r_claim`, `sla_sigma_x`, optional
        `sla_max_beta`) are supported on this REST endpoint. SLA activates when
        `sla_r_claim > 0`. Host-sent `sla_r_target` / legacy `sla_reliability`
        are ignored — clients choose coverage at search/rent time. The published
        CLI and SDK do not yet expose SLA fields — use the host console (**Set
        Pricing → SLA**) or REST/`curl` until CLI/SDK support ships.


        CLI Usage (non-SLA fields): `vastai list machine <machine_id> [options]`
      operationId: listMachine
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - machine
              properties:
                machine:
                  type: integer
                  description: ID of the machine to list
                price_gpu:
                  type: number
                  format: float
                  description: Price per GPU per hour
                price_disk:
                  type: number
                  format: float
                  description: Price per GB of disk storage
                price_inetu:
                  type: number
                  format: float
                  description: Price per GB of upload bandwidth
                price_inetd:
                  type: number
                  format: float
                  description: Price per GB of download bandwidth
                price_min_bid:
                  type: number
                  format: float
                  description: Minimum bid price allowed
                min_chunk:
                  type: integer
                  description: Minimum number of GPUs that must be rented together
                  default: 1
                end_date:
                  type: number
                  format: float
                  description: Unix timestamp for when the listing expires
                credit_discount_max:
                  type: number
                  format: float
                  description: Maximum discount rate allowed for prepaid credits
                sla_r_claim:
                  type: number
                  format: float
                  minimum: 0
                  maximum: 0.9999
                  description: >
                    Host reliability claim. Values above 0 enable SLA on the
                    offer.

                    Must be greater than 0 and at most 0.9999 when enabling SLA;
                    exactly 1.0 is rejected.

                    Set to 0 to disable SLA on new rentals.
                sla_sigma_x:
                  type: number
                  format: float
                  description: >
                    Host confidence spread — how wide your belief is around the
                    claim.

                    Must be greater than 0 and at most 3.0. Defaults to 0.5 when
                    enabling SLA.
                sla_max_beta:
                  type: number
                  format: float
                  description: >
                    Optional ask term capping how aggressively long-running
                    contracts may weight recent

                    uptime versus longer history in settlement. Hosts do not set
                    β — the platform derives

                    β from the client's target_reliability at rent. Leave unset
                    for uncapped. When set,

                    must be in (0, 1) and at least the default beta derived at
                    your claim.
                sla_r_target:
                  type: number
                  format: float
                  description: >
                    Ignored on asks. Client coverage target is supplied at
                    search/rent time

                    (`target_reliability`), not set by the host.
                sla_reliability:
                  type: number
                  format: float
                  description: Legacy alias for sla_r_target; ignored on asks.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  you_sent:
                    type: object
                    description: Echo of the request body
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        machine_id:
                          type: integer
                        user_id:
                          type: integer
                        extended:
                          type: integer
                          description: Number of rental contracts extended
                        new_contracts:
                          type: array
                          items:
                            type: integer
                          description: IDs of newly created contracts
                        upd_contracts:
                          type: array
                          items:
                            type: integer
                          description: IDs of updated contracts
                example:
                  success: true
                  you_sent:
                    machine: 12345
                    sla_r_claim: 0.99
                    sla_sigma_x: 0.5
                  results:
                    - machine_id: 12345
                      user_id: 67890
                      extended: 1
                      new_contracts: []
                      upd_contracts:
                        - 1
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - invalid_args
                      - invalid_sla_params
                      - sla_not_approved
                      - sla_daemon_outdated
                    example: invalid_sla_params
                  msg:
                    type: string
                    example: No such machine(s) for your account
        '401':
          description: Unauthorized — missing permission or invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                  msg:
                    type: string
                    example: Your key lacks the machine_write permission group
        '403':
          description: Forbidden — machine locked
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - machine_locked
                    example: machine_locked
                  msg:
                    type: string
                    example: Machine is decommissioned or migration-locked
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key must be provided in the Authorization header

````