staqlydocs
REST APIAPI referenceMedia

Make a picture with the workspace's AI key

Make a picture with the workspace's AI key (media:write)

Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.

POST
/v1/ai/images/{op}

generate makes a picture from a prompt; edit changes the image by the prompt, only inside the mask's transparent pixels when a mask is sent. Answers the picture; nothing is stored. At most 30 pictures per 10 minutes per workspace; the provider's own limits and refusals come back as 429 or 422.

Authorization

headerAuthorizationBearer <token>

API key (stk_...), or in the Community Edition the access token (stk_local_...)

Path Parameters

op*string
Value in"generate""edit"

Request Body

multipart/form-data
  1. body
prompt*string
Lengthlength <= 4000
size?string

The model's sizes, e.g. 1024x1024, 1536x1024, 1024x1536 (gpt-image-1)

image?file

Required for edit

Formatbinary
mask?file

PNG; transparent pixels mark what may change

Formatbinary

Response Body

The picture

response?fileimage/png
Formatbinary
curl -X POST 'https://staqly.example.com/v1/ai/images/generate' \  -F 'prompt=string'
"string"