Skip to main content
POST
/
images
/
generations
Generate an image
curl --request POST \
  --url https://www.trybloom.ai/api/v1/images/generations \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "prompt": "<string>",
  "brandSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "imageSize": "2K",
  "variantCount": 3,
  "referenceImageIds": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ]
}
'
{
  "data": {
    "ids": [
      "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    ],
    "variantGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "status": "<unknown>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://www.trybloom.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Body

application/json
prompt
string
required

Description of the image to generate (1–2000 chars)

Required string length: 1 - 2000
brandSessionId
string<uuid>
required

Brand session ID (from GET /brands)

aspectRatio
enum<string>

Aspect ratio. One of "1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9"

Available options:
1:1,
2:3,
3:2,
3:4,
4:3,
4:5,
5:4,
9:16,
16:9,
21:9
imageSize
enum<string>
default:2K

"2K" (default, 1 credit) or "4K" (2 credits, Plus/Pro)

Available options:
2K,
4K
model
enum<string>

Model tier. "fast" (cheaper/faster), "standard" (mid tier), or "pro" (default, highest quality).

Available options:
fast,
standard,
pro
variantCount
integer

Number of variant images to generate (1-5, default 1). Each variant costs the same credits.

Required range: 1 <= x <= 5
referenceImageIds
string<uuid>[]

IDs of uploaded or generated images to use as style/content references (max 10)

Maximum array length: 10

Response

OK

data
object
required