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 — all it takes is your email and a verification code.

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 and give it a descriptive name (e.g. local-dev or ci-pipeline).
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.
Treat your API key like a password. If a key is ever exposed, delete it from the dashboard and create a new one right away.

Step 2: Create a 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. Generations run asynchronously: this request creates a task and returns immediately with an id and a status. You’ll poll that id in the next step to get the finished asset.

Step 3: Poll for the Result

Fetch the generation by its id and keep polling until its status becomes completed (or succeeded). If it comes back failed, stop and read the error message.
Poll every few seconds rather than in a tight loop. Image models usually finish in seconds; video models can take longer.

Step 4: Read the Response

The API returns a generation object. When status is completed, output.url points to your finished asset:
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 5: 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:
The response has the same shape, with output.type set to video:
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 creating keys, storage, and security best practices.

Errors

Understand error codes and how to handle failed generations.