Skip to main content
POST
/
api
/
v1
/
{workspaceID}
/
playground
/
images
/
generations
Playground image generation
curl --request POST \
  --url https://ai.liara.ir/api/v1/{workspaceID}/playground/images/generations \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "model": "<string>",
  "n": 123,
  "size": "<string>",
  "quality": "<string>"
}
'
{}

Authorizations

Authorization
string
header
required

Enter the token with the Bearer: prefix, e.g. "Bearer abcde12345"

Path Parameters

workspaceID
string
required

The workspace ID

Pattern: ^[a-f0-9]{24}$

Body

application/json
prompt
string
required
model
string
required
n
number
size
string
quality
string
output_format
enum<string>
Available options:
png,
jpeg,
webp

Response

Successful response

The response is of type object.