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

# Recommend presets for an intent

> Ranks presets against a free-text description of what you want, using
keyword overlap over name, description and metadata. Presets with no
match are excluded. `confidence` is comparable only within one response.
Auth is optional.




## OpenAPI

````yaml /openapi.yaml post /presets/recommend
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:
  /presets/recommend:
    post:
      tags:
        - Presets
      summary: Recommend presets for an intent
      description: |
        Ranks presets against a free-text description of what you want, using
        keyword overlap over name, description and metadata. Presets with no
        match are excluded. `confidence` is comparable only within one response.
        Auth is optional.
      operationId: recommendPresets
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PresetRecommendRequest'
            example:
              intent: deep male voice for narration
              type: voice
              limit: 5
      responses:
        '200':
          description: Ranked recommendations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PresetRecommendResponse'
              examples:
                voice:
                  value:
                    count: 1
                    data:
                      - id: preset_5f4dcc3b5aa7
                        kind: provider_value
                        type: voice
                        namespace: elevenlabs
                        name: Brian
                        description: Deep, professional male voice
                        preview_url: https://s3.varg.ai/presets/voice/brian.mp3
                        metadata:
                          gender: male
                          tone:
                            - deep
                        confidence: 0.83
                        why:
                          - name
                          - tone=deep
                          - gender=male
        '400':
          description: Body is not a JSON object or `intent` is missing or blank
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - {}
        - bearerAuth: []
components:
  schemas:
    PresetRecommendRequest:
      type: object
      required:
        - intent
      properties:
        intent:
          type: string
          minLength: 1
          description: Free-text description of what you want.
          example: calm female british voice
        type:
          type: string
          description: Narrow to one parameter type.
        namespace:
          type: string
          description: Narrow to one id system.
        tool:
          type: string
          description: Only presets deliverable into this tool.
        limit:
          type: integer
          default: 10
          maximum: 50
          description: >-
            Max results. Larger values are clamped to 50; invalid values fall
            back to 10.
    PresetRecommendResponse:
      type: object
      required:
        - count
        - data
      properties:
        count:
          type: integer
        data:
          type: array
          items:
            $ref: '#/components/schemas/PresetRecommendation'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: model_not_found
            message:
              type: string
              example: 'Unknown model: flux-shnell'
            details: {}
    PresetRecommendation:
      type: object
      required:
        - id
        - kind
        - type
        - namespace
        - name
        - description
        - preview_url
        - metadata
        - confidence
        - why
      properties:
        id:
          type: string
        kind:
          type: string
        type:
          type: string
        namespace:
          type: string
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        preview_url:
          type:
            - string
            - 'null'
        metadata:
          type: object
          additionalProperties: true
        confidence:
          type: number
          minimum: 0
          maximum: 1
          description: Match strength; comparable only within one response.
        why:
          type: array
          items:
            type: string
          description: >-
            Match reasons, for example `name`, `description`, `tone=deep`
            (metadata value) or `axis:tone` (metadata key).
  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.