> ## 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.

# Get tool metadata

> Full metadata for one tool: JSON Schema for its input, output shape,
and a worked example. Pass `?model=<model>` to enrich `provider_options`
with the explicit per-provider schema for that model (instead of the
generic passthrough bag).




## OpenAPI

````yaml /openapi.yaml get /tools/{tool_key}
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: Lineage
    description: Resolve which job produced a file
  - name: Pricing
    description: Estimate costs and browse the price catalog
  - name: Billing
    description: Balance, usage, and transaction history
  - name: Account
    description: Identity and API key management
paths:
  /tools/{tool_key}:
    get:
      tags:
        - Tools
      summary: Get tool metadata
      description: |
        Full metadata for one tool: JSON Schema for its input, output shape,
        and a worked example. Pass `?model=<model>` to enrich `provider_options`
        with the explicit per-provider schema for that model (instead of the
        generic passthrough bag).
      operationId: getTool
      parameters:
        - name: tool_key
          in: path
          required: true
          schema:
            type: string
            enum:
              - image
              - video
              - speech
              - music
              - transcription
              - ffmpeg
              - render
              - pipeline
        - name: model
          in: query
          required: false
          schema:
            type: string
          description: Enrich the schema with per-provider options for this model
          example: flux_schnell
      responses:
        '200':
          description: Tool metadata
          content:
            application/json:
              schema:
                type: object
                properties:
                  tool_key:
                    type: string
                  description:
                    type: string
                  input_schema:
                    type: object
                    description: JSON Schema for the request body
                  output_schema:
                    type: object
                    description: JSON Schema of the job output
                  example:
                    type: object
                    description: A worked input/output example
        '404':
          $ref: '#/components/responses/ModelNotFound'
components:
  responses:
    ModelNotFound:
      description: Unknown model or tool
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            model:
              value:
                error:
                  code: model_not_found
                  message: 'Unknown model: flux-shnell'
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: model_not_found
            message:
              type: string
              example: 'Unknown model: flux-shnell'
            details: {}
  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.

````