Skip to main content
POST
/
image
curl --request POST \
  --url https://api.varg.ai/v1/image \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "flux-pro",
  "prompt": "a minimalist logo design, geometric shapes, blue and white gradient",
  "aspect_ratio": "1:1"
}
'
{
  "job_id": "job_a1b2c3d4",
  "status": "completed",
  "model": "fal:kling-v2.5",
  "created_at": "2026-02-13T10:00:00Z",
  "completed_at": "2026-02-13T10:02:30Z",
  "output": {
    "url": "https://s3.varg.ai/o/job_a1b2c3d4.mp4",
    "media_type": "video/mp4"
  },
  "cache": {
    "hit": false,
    "key": "sha256:abc123..."
  },
  "error": "Provider returned an error"
}

Authorizations

Authorization
string
header
required

API key from varg.ai/dashboard.

Pass as Authorization: Bearer varg_xxx.

Body

application/json
model
string
required

Image model to use. Also accepts image editing and upscale models.

Text-to-image: flux-pro, flux-dev, flux-schnell, nano-banana-pro, recraft-v3, phota, grok-imagine-image, soul

Image editing: nano-banana-pro/edit, nano-banana-2/edit, phota/edit, phota/enhance, grok-imagine-image/edit, seedream-v4.5/edit, qwen-angles

Image upscale: seedvr, recraft-clarity, clarity-upscaler, topaz, ccsr, aura-sr

Examples:

"flux-pro"

"flux-schnell"

"nano-banana-pro"

"recraft-v3"

"phota"

"grok-imagine-image"

"soul"

"nano-banana-pro/edit"

"seedvr"

"topaz"

prompt
string
required

Text description of the image to generate. For editing models, describe the desired change. For upscale models, can be empty.

Example:

"sunset over mountains, dramatic lighting, photorealistic"

aspect_ratio
string
default:1:1

Output aspect ratio

Examples:

"1:1"

"16:9"

"9:16"

"4:3"

"3:4"

files
object[]

Input images for editing, style transfer, or upscaling.

  • Image editing: 1 source image URL
  • Image upscale: 1 image URL
  • Multi-angle (qwen-angles): 1 source image
provider_options
object

Additional options passed directly to the provider

Response

Job created

job_id
string
required

Unique job identifier

Example:

"job_a1b2c3d4"

status
enum<string>
required

Current job status

Available options:
queued,
processing,
completed,
failed,
cancelled
Example:

"completed"

model
string
required

Resolved model identifier (provider:model format)

Example:

"fal:kling-v2.5"

created_at
string<date-time>
required

When the job was created

Example:

"2026-02-13T10:00:00Z"

completed_at
string<date-time>

When the job finished (completed, failed, or cancelled)

Example:

"2026-02-13T10:02:30Z"

output
object

Job output, present when status is completed

cache
object

Cache metadata

error
string

Error message, present when status is failed

Example:

"Provider returned an error"