varg.ai Pricing API

Estimate costs and browse the price catalog

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 2

POST /estimate Estimate a price without creating a job #
GET /pricing Get the price catalog (public) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/varg-ai:varg-ai-pricing-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

varg-ai-pricing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: varg Pricing 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 billing: 1 credit =

    1 cent = $0.01, and models are priced pass-through — you pay what the

    provider charges, no markup. Every amount comes as integer credits

    (`*_cents` / `credits` fields) and as dollars (`*_usd` fields).


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


    **Rate limits** (sliding one-minute windows; a `429` carries `Retry-After`

    and `X-RateLimit-*`):

    - every request with an API key or session: 1,200 a minute per credential;

    - every request without one: 120 a minute per IP;

    - job submits: 60 a minute per key (300 across a team);

    - keyless search (`GET /skills/search`): 3 a minute per IP, then

    `429 sign_in_required` — sign in (`vargai login`) or send a key to keep

    searching.'
servers:
- url: https://api.varg.ai/v2
security:
- bearerAuth: []
tags:
- name: Pricing
  description: Estimate costs and browse the price catalog
paths:
  /estimate:
    post:
      tags:
      - Pricing
      operationId: estimatePrice
      summary: Estimate a price without creating a job
      description: 'Send the same body you would send to a generation endpoint and get the

        price back. Also accepts a batch format with an `items` array where each

        item carries `tool`, `model`, and `params`.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/EstimateRequest'
              - $ref: '#/components/schemas/EstimateBatchRequest'
            examples:
              single:
                summary: Single estimate
                value:
                  model: kling_v3
                  prompt: cat jumping over a fence
                  duration: 5
              batch:
                summary: Batch estimate
                value:
                  items:
                  - tool: image
                    model: flux_schnell
                    params:
                      aspect_ratio: '16:9'
                  - tool: video
                    model: kling_v3
                    params:
                      duration: 5
      responses:
        '200':
          description: Estimate
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/EstimateResponse'
                - $ref: '#/components/schemas/EstimateBatchResponse'
        '400':
          description: Body is not a JSON object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Unknown model or tool (single mode). Flat body, not the error envelope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EstimateError'
        '422':
          description: Validation failed. Single mode with an invalid request returns the flat `EstimateError`; empty `items` / missing `model` returns the standard envelope.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/EstimateError'
                - $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: No active pricing rule (single mode). Flat body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EstimateError'
  /pricing:
    get:
      tags:
      - Pricing
      operationId: getPricingCatalog
      summary: Get the price catalog (public)
      description: 'The full model catalog with per-provider price estimates, grouped by

        tool. No authentication required. Prices are pass-through: what the

        provider charges, rounded up to the cent.'
      security: []
      responses:
        '200':
          description: Price catalog
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        model:
                          type: string
                          example: flux_schnell
                        tool:
                          type: string
                          example: image
                        providers:
                          type: array
                          items:
                            type: object
                            properties:
                              provider:
                                type: string
                                example: fal
                              model_key:
                                type: string
                                example: fal:flux_schnell
                              pricing_id:
                                type:
                                - string
                                - 'null'
                              user_price_estimate_cents:
                                type:
                                - integer
                                - 'null'
                                description: Worst-case price in credits (pass-through provider price)
                              user_price_estimate_usd:
                                type:
                                - number
                                - 'null'
                                description: '`user_price_estimate_cents` in dollars'
components:
  schemas:
    EstimateBatchRequest:
      type: object
      required:
      - items
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              tool:
                type: string
              capability:
                type: string
              model:
                type: string
              params:
                type: object
    EstimateError:
      type: object
      description: Flat error body returned by `POST /estimate` in single mode (not the standard error envelope).
      properties:
        valid:
          type: boolean
          const: false
        code:
          type: string
          example: model_not_found
        message:
          type: string
        details:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              message:
                type: string
    EstimateLineItem:
      type: object
      properties:
        capability:
          type: string
        model:
          type: string
        credits:
          type: integer
        usd:
          type: number
          description: '`credits` in dollars'
        billing:
          type: string
        provider:
          type: string
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: model_not_found
            message:
              type: string
              example: 'Unknown model: flux-shnell'
            details: {}
    EstimateBatchResponse:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              capability:
                type: string
              model:
                type: string
              credits:
                type: integer
              usd:
                type: number
                description: '`credits` in dollars'
              billing:
                type: string
                enum:
                - metered
                - byok
                - x402
              provider:
                type: string
                description: Always an empty string today
              valid:
                type: boolean
                const: false
                description: Present (false) only when this item failed validation; `credits` is then 0
              code:
                type: string
              message:
                type: string
              details:
                type: array
                items:
                  type: object
                  properties:
                    path:
                      type: string
                    message:
                      type: string
        total_credits:
          type: integer
        total_usd:
          type: number
    EstimateResponse:
      type: object
      properties:
        valid:
          type: boolean
        model:
          type: string
        tool:
          type: string
        resolved_model_key:
          type:
          - string
          - 'null'
          description: The exact route (`provider:model`) this request would run on. Pin it as `model` for deterministic routing.
        pricing:
          type: object
          properties:
            user_price_cents:
              type:
              - integer
              - 'null'
              description: Pass-through provider price in credits (1 credit = $0.01)
            user_price_usd:
              type:
              - number
              - 'null'
              description: '`user_price_cents` in dollars'
            pricing_id:
              type:
              - string
              - 'null'
            children_user_price_cents:
              type: integer
              description: Render only. Estimated price of the sub-generations the TSX will spawn (upper bound).
            children_user_price_usd:
              type: number
            total_user_price_cents:
              type: integer
              description: Render only. `user_price_cents` + `children_user_price_cents`.
            total_user_price_usd:
              type: number
        breakdown:
          type: array
          description: Render only. Per-child line items.
          items:
            $ref: '#/components/schemas/EstimateLineItem'
        warnings:
          type: array
          items:
            type: string
    EstimateRequest:
      type: object
      required:
      - model
      properties:
        model:
          type: string
        tool:
          type: string
        capability:
          type: string
          description: Alias of `tool`. If both are absent the tool is inferred from `model`.
      additionalProperties: true
  responses:
    Unauthorized:
      description: Missing or invalid API key / JWT
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            unauthorized:
              value:
                error:
                  code: unauthorized
                  message: Invalid or missing API key or JWT
  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.

        '