Skip to main content
This guide walks you through everything you need to make your first authenticated request to the Varo Cloud API — from generating a key to running a model and getting back a result.
Base URL: https://inference.varo.cloud/v1 — all endpoints in this guide are relative to it.

Prerequisites

Before you start, make sure you have:

A Varo Cloud account

Sign up if you don’t have one yet — the free tier is enough to start building with multiple models.

An API key

Generate an sk_live_ key from your dashboard. You’ll pass it as a Bearer token on every request.

curl or a language runtime

Any HTTP client works. Examples below use curl, Node.js, and Python.

5 minutes

That’s all it takes to go from zero to your first generated asset.

Step 1: Generate an API Key

All requests to the Varo Cloud API are authenticated with a bearer token. To create one:
1

Open the dashboard

Sign in at varo.cloud/auth and open API Keys in your dashboard.
2

Create a new key

Click Create key, give it a descriptive name (e.g. local-dev or ci-pipeline), and choose the scopes it needs.
3

Copy and store it securely

The full key is shown only once. Copy it immediately and store it in a secret manager or environment variable — never commit it to source control.
export VARO_API_KEY="sk_live_..."
Treat your API key like a password. If a key is ever exposed, rotate it immediately from the dashboard.

Step 2: Run Your First Generation

Let’s create an image. Send a POST request to /v1/generations with the model you want to run and its inputs. Pass your key in the Authorization header as a bearer token:
curl -X POST https://inference.varo.cloud/v1/generations \
  -H "Authorization: Bearer $VARO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google-nano-banana-pro/text-to-image",
    "prompt": "a cat sitting on a windowsill, golden hour lighting, photorealistic",
    "aspect_ratio": "4:3",
    "output_format": "jpeg",
    "resolution": "1K"
  }'
const response = await fetch("https://inference.varo.cloud/v1/generations", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.VARO_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "google-nano-banana-pro/text-to-image",
    prompt: "a cat sitting on a windowsill, golden hour lighting, photorealistic",
    aspect_ratio: "4:3",
    output_format: "jpeg",
    resolution: "1K",
  }),
});

const generation = await response.json();
console.log(generation.output.url);
import os
import requests

response = requests.post(
    "https://inference.varo.cloud/v1/generations",
    headers={
        "Authorization": f"Bearer {os.environ['VARO_API_KEY']}",
        "Content-Type": "application/json",
    },
    json={
        "model": "google-nano-banana-pro/text-to-image",
        "prompt": "a cat sitting on a windowsill, golden hour lighting, photorealistic",
        "aspect_ratio": "4:3",
        "output_format": "jpeg",
        "resolution": "1K",
    },
)

generation = response.json()
print(generation["output"]["url"])

Step 3: Read the Response

The API returns a generation object. When status is completed, output.url points to your finished asset:
{
  "id": "9d481365-2b49-4e94-ac9b-c3d2db5b2374",
  "object": "generation",
  "status": "completed",
  "model": "google-nano-banana-pro/text-to-image",
  "created_at": 1783996705,
  "output": {
    "type": "image",
    "url": "https://staging-assets.varo.cloud/generations/.../result.jpeg"
  },
  "usage": {
    "cost_usd": 0.04
  }
}
FieldDescription
idUnique identifier for this generation
statusGeneration state — completed when the asset is ready
modelThe model that produced the output
output.typeimage or video, depending on the model
output.urlDirect link to download the generated asset
usage.cost_usdCost of this generation, in USD (varies by model and parameters)
If you get back a 401 Unauthorized, double-check that your key is correct, starts with sk_live_, and hasn’t been revoked. See Errors for the full list of response codes.

Step 4: Try Another Model

The same endpoint runs every model on the platform — just change the model field and its inputs. Here’s a video model instead of an image one:
curl -X POST https://inference.varo.cloud/v1/generations \
  -H "Authorization: Bearer $VARO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "alibaba-wan-2-7/reference-to-video",
    "prompt": "the cat slowly turns to look at the camera"
  }'
The response has the same shape, with output.type set to video:
{
  "id": "9d481365-2b49-4e94-ac9b-c3d2db5b2374",
  "object": "generation",
  "status": "completed",
  "model": "alibaba-wan-2-7/reference-to-video",
  "created_at": 1783996705,
  "output": {
    "type": "video",
    "url": "https://staging-assets.varo.cloud/generations/.../result.mp4"
  },
  "usage": {
    "cost_usd": 0.5
  }
}
One API, one key, one response shape for every model — swap the model field to move between image, video, and other modalities without changing your integration.

Next Steps

You’ve run your first model and retrieved a result. Here’s where to go next:

Full API Reference

Browse every endpoint, request schema, and response format.

Authentication Deep Dive

Learn about key scopes, rotation, and best practices.

Errors

Understand error codes and how to handle failed generations.

Webhooks

Receive real-time events instead of polling for status.