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

# get endpoint workers

> Retrieves the current list and status of workers for a specific endpoint.
Useful for monitoring, debugging connectivity issues, and understanding resource usage.

CLI Usage: `vastai get endpoint workers <id>`



## OpenAPI

````yaml /api-reference/openapi.yaml post /get_endpoint_workers/
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
servers:
  - url: https://console.vast.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /get_endpoint_workers/:
    post:
      tags:
        - Serverless
      summary: get endpoint workers
      description: >-
        Retrieves the current list and status of workers for a specific
        endpoint.

        Useful for monitoring, debugging connectivity issues, and understanding
        resource usage.


        CLI Usage: `vastai get endpoint workers <id>`
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - id
              properties:
                id:
                  type: integer
                  description: ID of the endpoint to monitor
                  default: 12345
                  example: 12345
                  minimum: 1
      responses:
        '200':
          description: Successfully retrieved endpoints workers.
          content:
            application/json:
              schema:
                oneOf:
                  - title: Success - Workers Retrieved
                    type: object
                    properties:
                      workers:
                        type: array
                        description: List of workers for this endpoint
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              description: Worker instance ID
                              example: 67890
                            status:
                              type: string
                              description: Current worker status
                              example: running
                            url:
                              type: string
                              description: Worker instance URL
                              example: http://192.168.1.10:8000
                            created_at:
                              type: string
                              description: When the worker was created
                              example: '2023-10-01T12:00:00Z'
                  - title: Error Response
                    type: string
                    description: >-
                      Error message when endpoint not found or authentication
                      fails
                    example: >-
                      authenticate_endpoint_apikey: invalid api_key or endpoint
                      vLLM-Qwen3-8B not found
      security:
        - BearerAuth: []
      servers:
        - url: https://run.vast.ai
          description: Production server
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key must be provided in the Authorization header

````