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

# show gpu trends

> Returns time-series data for GPU supply, demand, and pricing. By default queries the last 24 hours and returns a sampled set of roughly 20 data points. Use start/end/step for custom time ranges.

CLI Usage: `vastai metrics gpu-trends [GPU_NAMES] [options]`



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/v0/metrics/gpu/history/
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:
  /api/v0/metrics/gpu/history/:
    get:
      tags:
        - Machines
      summary: show gpu trends
      description: >-
        Returns time-series data for GPU supply, demand, and pricing. By default
        queries the last 24 hours and returns a sampled set of roughly 20 data
        points. Use start/end/step for custom time ranges.


        CLI Usage: `vastai metrics gpu-trends [GPU_NAMES] [options]`
      parameters:
        - name: gpu_name
          in: query
          required: false
          description: >-
            Comma-separated GPU names (e.g. "RTX 4090, H100_SXM") or "all".
            Defaults to RTX 5090, 4090, and 3090.
          schema:
            type: string
            example: RTX 4090
        - name: verified
          in: query
          required: false
          description: Filter by verification status
          schema:
            type: string
            enum:
              - 'yes'
              - 'no'
              - all
            default: 'yes'
        - name: hosting_type
          in: query
          required: false
          description: Filter by hosting type
          schema:
            type: string
            enum:
              - all
              - secure_cloud
              - community
            default: all
        - name: num_gpus
          in: query
          required: false
          description: GPU count bucket or "all"
          schema:
            type: string
            default: all
        - name: start
          in: query
          required: false
          description: Unix timestamp for range start
          schema:
            type: integer
        - name: end
          in: query
          required: false
          description: Unix timestamp for range end
          schema:
            type: integer
        - name: step
          in: query
          required: false
          description: Seconds between data points (e.g. 3600 for hourly)
          schema:
            type: integer
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  gpus:
                    type: object
                    description: Keyed by GPU name
                    additionalProperties:
                      type: object
                      properties:
                        supply_demand:
                          type: object
                          description: Time-series arrays of supply and demand counts
                          properties:
                            timestamps:
                              type: array
                              items:
                                type: integer
                              example:
                                - 1779736460
                                - 1779736632
                            rented_verified:
                              type: array
                              items:
                                type: integer
                              example:
                                - 3789
                                - 3756
                            avail_verified:
                              type: array
                              items:
                                type: integer
                              example:
                                - 165
                                - 200
                            rented_unverified:
                              type: array
                              items:
                                type: integer
                              example:
                                - 385
                                - 390
                            avail_unverified:
                              type: array
                              items:
                                type: integer
                              example:
                                - 107
                                - 100
                            total:
                              type: array
                              items:
                                type: integer
                              example:
                                - 4446
                                - 4446
                        pricing:
                          type: object
                          description: Time-series arrays of pricing percentiles
                          properties:
                            timestamps:
                              type: array
                              items:
                                type: integer
                              example:
                                - 1779736460
                                - 1779736632
                            rented_p10:
                              type: array
                              items:
                                type: number
                              example:
                                - 0.246
                                - 0.246
                            rented_median:
                              type: array
                              items:
                                type: number
                              example:
                                - 0.39
                                - 0.38
                            rented_p90:
                              type: array
                              items:
                                type: number
                              example:
                                - 0.599
                                - 0.55
                            avail_p10:
                              type: array
                              items:
                                type: number
                              example:
                                - 0.254
                                - 0.289
                            avail_median:
                              type: array
                              items:
                                type: number
                              example:
                                - 0.5
                                - 0.5
                            avail_p90:
                              type: array
                              items:
                                type: number
                              example:
                                - 0.973
                                - 0.85
                        stats:
                          type: object
                          description: Static performance metrics for this GPU
                          properties:
                            tflops:
                              type: number
                              example: 82.6
                            dlperf:
                              type: number
                              example: 97.5
                            tflops_per_dollar:
                              type: number
                              example: 127.1
                            dlperf_per_dollar:
                              type: number
                              example: 150
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: API requests too frequent endpoint threshold=3.0
      security:
        - BearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
        msg:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key must be provided in the Authorization header

````