Skip to main content
Version: v2

Introduction

The Alberti Studio API lets you generate images from code with your Alberti Studio account. It runs the same models as the Studio app, and every generation is billed to your own Studio credits.

Base URL

All endpoints live under:

https://api.alberti.studio

Authentication

Every request needs a Studio API key, sent as a Bearer token.

Authorization: Bearer sk_...

You create and manage keys in the Studio app, under the API tab. You can hold up to 3 keys at a time. Keys last one year, and you can extend or replace them from the same place. A key is shown only once when you create it, so store it somewhere safe.

Your account also has one webhook secret. It signs the delivery callbacks described below.

Generating an image

Pick a model type and POST to its endpoint. For example, Selena:

curl -X POST https://api.alberti.studio/v2/studio/artworks/selena \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{ "prompt": "a serene mountain lake at dawn" }'

You get back 202 Accepted with an artwork id right away. Generation runs in the background.

{ "id": "01KWKM4SP1Q0XXBEDPX892MH2Y" }

To get the result, either wait for a webhook or poll the artwork.

GET /v2/studio/artworks/{id}
GET /v2/studio/artworks/{id}/status

Webhooks

Pass a webhook URL with your request and we POST the finished artwork to it once generation completes. The callback is signed with your webhook secret using HMAC-SHA256. Each delivery carries an Alberti-Timestamp and an Alberti-Signature header. Verify the signature against {timestamp}.{rawBody} before you trust the payload. Webhook URLs must be public HTTPS endpoints.

Credits

Each generation costs credits from your Studio balance. If a generation fails, those credits are refunded. Check your balance and concurrency any time.

GET /v2/studio/usage

Your credit history is here.

GET /v2/studio/transactions

Support

Reach us at support@alberti.studio.