Skip to main content
POST
/
v1
/
images
/
generations
/
async
Generate image
curl --request POST \
  --url https://api.siray.ai/v1/images/generations/async \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "aspect_ratio": "1:1",
  "image": "example_value",
  "mask": "example_value",
  "model": "ideogram/ideogram-v3-turbo-i2i",
  "prompt": "example_value",
  "seed": -1,
  "style": "Auto",
  "style_reference_images": [
    "example_value"
  ]
}
'
{
  "code": "success",
  "data": {
    "task_id": "<string>"
  },
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication using API key

Body

application/json

Request payload

Request format for image generation models

aspect_ratio
enum<string>
required

Aspect ratio

Available options:
1:1,
16:9,
9:16,
4:3,
3:4
image
string
required

Input image for generation, it can be data URL or image URL

model
enum<string>
required

Model name to use for the request

Available options:
ideogram/ideogram-v3-turbo-i2i
prompt
string
required

Text prompt for generation

mask
string

Mask image for inpainting, it can be data URL or image URL

seed
integer

Random seed for generation

Required range: -1 <= x <= 9999999999
style
enum<string>

Style option

Available options:
Auto,
General,
Realistic,
Design
style_reference_images
string[]

Array of style reference images, which can be data URL or image URL

Required array length: 1 - 4 elements

Response

200 - application/json

Successful response

Standard async task creation response

code
string
required

Status code returned by the service

Example:

"success"

data
object
required

Response payload containing task details

message
string
required

Additional information about the request result