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

# List a tool's models

> The models of one tool, paginated by canonical model. Same route and
pricing data as `GET /models`, plus a real generation `example` and the
explicit per-model `input_schema` (JSON Schema). Auth is optional;
`pipeline` models are visible only to callers granted access.




## OpenAPI

````yaml /openapi.yaml get /tools/{tool_key}/models
openapi: 3.1.0
info:
  title: varg API
  version: 2.0.0
  description: |
    Unified REST API for AI media generation at `api.varg.ai/v2`.

    One API key, ~80 models across 8 providers, async jobs, stable output URLs
    on `s3.varg.ai`, files with lineage, and transparent credit billing
    (1 credit = 1 cent = $0.01).

    **The async job pattern:** every generation request returns `202 Accepted`
    with a job object (`status: queued`). Poll `GET /jobs/{id}` until the job
    reaches a terminal status (`completed`, `failed`, or `cancelled`), then read
    `output.outputs[0].url`. Alternatively, set `options.webhook_url` in the
    request to receive an HMAC-signed callback when the job finishes.
servers:
  - url: https://api.varg.ai/v2
security:
  - bearerAuth: []
tags:
  - name: Generation
    description: >-
      Create generation jobs (image, video, speech, music, transcription,
      ffmpeg, render, pipeline)
  - name: Tools
    description: Discover tools, their schemas, and call any tool generically
  - name: Jobs
    description: Poll and manage job lifecycle
  - name: Files
    description: Upload, import, probe, and manage files
  - name: Folders
    description: Group files into folders and file generated output automatically
  - name: Lineage
    description: Resolve which job produced a file
  - name: Presets
    description: Browse and apply reusable parameter values — voices, styles
  - name: Templates
    description: Browse, publish, use and render community templates
  - name: Pricing
    description: Estimate costs and browse the price catalog
  - name: Billing
    description: Balance, usage, and transaction history
  - name: Analytics
    description: >-
      Spend, runs and files over time — summaries, time series, breakdowns,
      activity
  - name: Account
    description: Identity and API key management
paths:
  /tools/{tool_key}/models:
    get:
      tags:
        - Tools
      summary: List a tool's models
      description: |
        The models of one tool, paginated by canonical model. Same route and
        pricing data as `GET /models`, plus a real generation `example` and the
        explicit per-model `input_schema` (JSON Schema). Auth is optional;
        `pipeline` models are visible only to callers granted access.
      operationId: listToolModels
      parameters:
        - name: tool_key
          in: path
          required: true
          schema:
            type: string
            example: image
          description: Tool key (`image`, `video`, `speech`, ...).
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 50
            default: 25
          description: Models per page. Out-of-range values are clamped.
      responses:
        '200':
          description: A page of models
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolModelsResponse'
        '404':
          description: Unknown tool
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unknownTool:
                  value:
                    error:
                      code: tool_not_found
                      message: 'Unknown tool: imag'
      security:
        - {}
        - bearerAuth: []
components:
  schemas:
    ToolModelsResponse:
      type: object
      required:
        - version
        - page
        - limit
        - total
        - data
      properties:
        version:
          type:
            - string
            - 'null'
        page:
          type: integer
        limit:
          type: integer
        total:
          type: integer
          description: Total models for the tool.
        data:
          type: array
          items:
            $ref: '#/components/schemas/ToolModelEntry'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: model_not_found
            message:
              type: string
              example: 'Unknown model: flux-shnell'
            details: {}
    ToolModelEntry:
      allOf:
        - $ref: '#/components/schemas/ModelEntry'
        - type: object
          required:
            - example
            - input_schema
          properties:
            example:
              type:
                - object
                - 'null'
              additionalProperties: true
              description: >-
                A real generation sample (`input` and `output`) from the
                priority route.
            input_schema:
              type:
                - object
                - 'null'
              additionalProperties: true
              description: JSON Schema for the model's request body.
    ModelEntry:
      type: object
      required:
        - model
        - tool
        - display_name
        - description
        - routes
      properties:
        model:
          type: string
          description: Canonical model name; pass as `model` for auto-routing.
          example: kling_v2_6
        tool:
          type: string
          example: video
        display_name:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        routes:
          type: array
          items:
            $ref: '#/components/schemas/ModelRoute'
    ModelRoute:
      type: object
      required:
        - model_key
        - provider
        - modality
        - output_type
        - description
        - priority
        - accepts_files
        - pricing
        - ops
        - schema_url
      properties:
        model_key:
          type: string
          description: Exact route address; pass as `model` to pin this route.
          example: fal:kling_v2_6/text_to_video
        provider:
          type: string
          example: fal
        modality:
          type:
            - array
            - 'null'
          items:
            type: string
          example:
            - text-to-video
        output_type:
          type:
            - string
            - 'null'
          example: video
        description:
          type:
            - string
            - 'null'
        priority:
          type: integer
          description: Auto-routing order; lower is preferred.
        accepts_files:
          type: boolean
          description: Whether the route maps the unified `files` input.
        pricing:
          type: object
          required:
            - pricing_id
            - rule
            - user_price_estimate_cents
            - min_user_price_cents
          properties:
            pricing_id:
              type:
                - string
                - 'null'
            rule:
              type:
                - object
                - 'null'
              additionalProperties: true
              description: Pricing rule (shape varies by `type`).
            user_price_estimate_cents:
              type:
                - number
                - 'null'
              description: Worst-case price in cents.
            min_user_price_cents:
              type:
                - number
                - 'null'
              description: Cheapest case price in cents, null when the rule has no minimum.
        ops:
          type: object
          required:
            - delivery
            - poll_interval_ms
            - estimated_duration_ms
            - max_timeout_ms
          properties:
            delivery:
              type:
                - string
                - 'null'
              example: poll
            poll_interval_ms:
              type:
                - integer
                - 'null'
            estimated_duration_ms:
              type:
                - integer
                - 'null'
            max_timeout_ms:
              type:
                - integer
                - 'null'
        schema_url:
          type: string
          description: >-
            Path (relative to the API origin) of the input schema for this
            route.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        varg API key (`varg_...`). Get one at [app.varg.ai](https://app.varg.ai)
        or run `bunx vargai login`. App sessions may alternatively send a
        Supabase JWT.

````

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