Art of AI logoAOI::lab
Sign in
API // v1

Developers

A versioned REST API for the lab. Available to members whose plan includes API access — create a key in your Account.

Base URL: /api/public/v1 · every response carries the header AOI-API-Version: 1.

Auth: Authorization: Bearer aoi_…. Keys are shown once; revoke them anytime.

Errors: { error: { code, message } } with codes like unauthorized (401), insufficient_tokens (402), api_not_enabled (403), provider_not_connected (409).

Versioning: breaking changes ship as /v2; /v1 keeps working.

GET/v1Index of endpoints (no key)
GET/v1/modelsModels, ratios, study base phrase (no key)
GET/v1/meYour account and token balance
POST/v1/generationsCreate an image: { model, prompt, ratio?, study? }
GET/v1/generations?limit=48List your images
DELETE/v1/generations/:idDelete an image
GET/v1/stylesList your saved styles
POST/v1/stylesSave a style: { name, description }
DELETE/v1/styles/:idDelete a style
GET/v1/pipelinesList your pipelines
POST/v1/pipelinesCreate: { name, steps: [{ type, detail }] }
PUT/v1/pipelines/:idReplace name and steps
DELETE/v1/pipelines/:idDelete a pipeline
curl -X POST https://<your-site>/api/public/v1/generations \
  -H "Authorization: Bearer aoi_your_key" \
  -H "Content-Type: application/json" \
  -d '{"model":"lovable/image-fast","prompt":"Đông Hồ woodblock, red and ochre","ratio":"1:1","study":true}'
Manage API keys