cURL
curl --request POST \
--url 'https://www.rainbrand.com/api/v1/generations' \
--header "x-api-key: $RAINBRAND_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"brandSessionId": "e6220a5e-4a68-4d39-8bb9-5105e9a3a164",
"model": "openai/gpt-image-2.5-sunburst",
"input": {
"prompt": "Create a landscape launch image for Acme Inc. Atlas Pro. Center the product and include the headline \"Meet Atlas Pro\" and the call to action \"Explore Atlas Pro\".",
"size": "1536x1024"
},
"briefId": "657bcf79-1f2f-47fa-90f8-9245142980ed"
}'{
"data": {
"id": "a1b2c3d4-140f-4491-8a24-b215616ed34a",
"status": "pending"
}
}{
"error": {
"code": "INVALID_INPUT",
"status": 400,
"message": "Invalid generation input",
"data": "<unknown>"
}
}{
"error": {
"code": "UNAUTHORIZED",
"status": 401,
"message": "Invalid or missing API credentials",
"data": "<unknown>"
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"status": 402,
"message": "Not enough credits to generate",
"data": {
"action_url": "<string>"
}
}
}{
"error": {
"code": "ACCOUNT_BANNED",
"status": 403,
"message": "This account has been suspended.",
"data": "<unknown>"
}
}{
"error": {
"code": "MODEL_NOT_FOUND",
"status": 404,
"message": "Generation model not found",
"data": "<unknown>"
}
}{
"error": {
"code": "IDEMPOTENCY_CONFLICT",
"status": 409,
"message": "Idempotency-Key was already used with a different request",
"data": "<unknown>"
}
}{
"error": {
"code": "TOO_MANY_REQUESTS",
"status": 429,
"message": "Rate limit exceeded",
"data": "<unknown>"
}
}{
"error": {
"code": "BILLING_SETUP_ERROR",
"status": 500,
"message": "We couldn't determine the value of this account's credits, so this generation didn't run and nothing was charged. Retrying won't help; email support@rainbrand.com and we'll fix the account.",
"data": "<unknown>"
}
}{
"error": {
"code": "CATALOG_UNAVAILABLE",
"status": 503,
"message": "Could not load generation models",
"data": "<unknown>"
}
}Generations
Start a generation
Generate a file with a selected model. A Brand ID scopes the request; pass a completed Brief to a supported model to include brand guidance and assets. Retrieve outputs with Get a generation.
POST
/
generations
cURL
curl --request POST \
--url 'https://www.rainbrand.com/api/v1/generations' \
--header "x-api-key: $RAINBRAND_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"brandSessionId": "e6220a5e-4a68-4d39-8bb9-5105e9a3a164",
"model": "openai/gpt-image-2.5-sunburst",
"input": {
"prompt": "Create a landscape launch image for Acme Inc. Atlas Pro. Center the product and include the headline \"Meet Atlas Pro\" and the call to action \"Explore Atlas Pro\".",
"size": "1536x1024"
},
"briefId": "657bcf79-1f2f-47fa-90f8-9245142980ed"
}'{
"data": {
"id": "a1b2c3d4-140f-4491-8a24-b215616ed34a",
"status": "pending"
}
}{
"error": {
"code": "INVALID_INPUT",
"status": 400,
"message": "Invalid generation input",
"data": "<unknown>"
}
}{
"error": {
"code": "UNAUTHORIZED",
"status": 401,
"message": "Invalid or missing API credentials",
"data": "<unknown>"
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"status": 402,
"message": "Not enough credits to generate",
"data": {
"action_url": "<string>"
}
}
}{
"error": {
"code": "ACCOUNT_BANNED",
"status": 403,
"message": "This account has been suspended.",
"data": "<unknown>"
}
}{
"error": {
"code": "MODEL_NOT_FOUND",
"status": 404,
"message": "Generation model not found",
"data": "<unknown>"
}
}{
"error": {
"code": "IDEMPOTENCY_CONFLICT",
"status": 409,
"message": "Idempotency-Key was already used with a different request",
"data": "<unknown>"
}
}{
"error": {
"code": "TOO_MANY_REQUESTS",
"status": 429,
"message": "Rate limit exceeded",
"data": "<unknown>"
}
}{
"error": {
"code": "BILLING_SETUP_ERROR",
"status": 500,
"message": "We couldn't determine the value of this account's credits, so this generation didn't run and nothing was charged. Retrying won't help; email support@rainbrand.com and we'll fix the account.",
"data": "<unknown>"
}
}{
"error": {
"code": "CATALOG_UNAVAILABLE",
"status": 503,
"message": "Could not load generation models",
"data": "<unknown>"
}
}Authorizations
apiKeybeareroauth
Headers
Body
application/json
Was this page helpful?