varg API

Every model in varg — image, video, voice, music, lipsync and the renderer — behind one key and one REST API. Pay per generation from the same credits as the app.

Base URLhttps://api.varg.ai/v2

Quickstart

  1. 1

    Create a key

    One key works for every model. Make one below and export it as VARG_API_KEY.

  2. 2

    Send a request

    Every tool has its own endpoint — /image, /video, /speech, /music, /render. The call returns a job right away.

    curl -X POST https://api.varg.ai/v2/image \
      -H "Authorization: Bearer $VARG_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "nano_banana_pro",
        "prompt": "a sunset over mountains, cinematic, golden hour",
        "aspect_ratio": "16:9"
      }'
  3. 3

    Get the result

    Poll the job until it is done; the output URL is in the response.

    curl https://api.varg.ai/v2/jobs/$JOB_ID \
      -H "Authorization: Bearer $VARG_API_KEY"

API keys

Go further