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": "match_input_image",
  "image": "example_value",
  "model": "black-forest-labs/flux-kontext-i2i-max",
  "prompt": "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

image
string
required
model
enum<string>
required

Model name to use for the request

Available options:
black-forest-labs/flux-kontext-i2i-max
prompt
string
required
aspect_ratio
enum<string>

Aspect ratio

Available options:
match_input_image,
1:1,
16:9,
9:16,
4:3,
3:4,
3:2,
2:3,
4:5,
5:4,
21:9,
9:21,
2:1,
1:2

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