Skip to main content
The varg API publishes an OpenAPI 3.1 spec that covers every public /v2 endpoint: generation, tools, jobs, files, folders, presets, templates, pricing, billing, analytics and account. The API serves the spec itself, so it always matches the deployed version. Fetching it needs no API key. Every page in this API Reference is generated from the same file.

Generate a typed client

TypeScript

Generate types with openapi-typescript, then call the API through openapi-fetch. Paths, bodies and responses are all type-checked:

Python

Other languages

OpenAPI Generator supports Go, Java, Kotlin, Ruby, PHP, C#, Rust and more:

Model-specific inputs

Each generation endpoint (POST /video, POST /image, …) serves many models. The spec types the fields every model shares: model, prompt, files, duration, aspect_ratio, provider_options, options. The extra inputs and limits of one model come from its JSON Schema, which needs no API key:
The same information is also published as Markdown for agents at https://varg.ai/models/<model>.md (see Model specs for agents).

Use it with AI agents and API tools

  • AI agents and IDEs: give the JSON URL to any tool that reads OpenAPI, for example ChatGPT actions, Cursor docs or an MCP OpenAPI bridge. For the hosted MCP server, see MCP Server.
  • Postman and Insomnia: Import → Link and paste https://api.varg.ai/v2/openapi.json.
  • LLM context: docs.varg.ai/llms.txt lists every docs page as Markdown and links this spec.
Authenticate with your API key as a Bearer token. See Authentication.