curl --request POST \
--url https://app.bily.ai/api/customer/v1/creative-intelligence/{storeUrl}/generation-requests \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"sourceIntelligenceId": "<string>",
"idempotencyKey": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({sourceIntelligenceId: '<string>', idempotencyKey: '<string>'})
};
fetch('https://app.bily.ai/api/customer/v1/creative-intelligence/{storeUrl}/generation-requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.bily.ai/api/customer/v1/creative-intelligence/{storeUrl}/generation-requests"
payload = {
"sourceIntelligenceId": "<string>",
"idempotencyKey": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"storeUrl": "store.example.com",
"request": {
"protocol": "creative-generation-request-v1",
"id": "request-example",
"status": "failed",
"phase": "failed",
"generationId": null,
"sourceIntelligenceId": "analysis-example",
"quality": "draft",
"aspectRatio": "1:1",
"saveToLibrary": false,
"pinnedAt": null,
"createdAt": 1800000000,
"updatedAt": 1800000000,
"expiresAt": 1800172800,
"lastError": {
"protocol": "creative-generation-error-v1",
"code": "strategy_failed",
"phase": "planning",
"message": "Generation planning failed."
}
}
}{
"storeUrl": "store.example.com",
"request": {
"protocol": "creative-generation-request-v1",
"id": "request-example",
"status": "queued",
"phase": "awaiting_dispatch",
"generationId": null,
"sourceIntelligenceId": "analysis-example",
"quality": "draft",
"aspectRatio": "1:1",
"saveToLibrary": false,
"pinnedAt": null,
"createdAt": 1800000000,
"updatedAt": 1800000000,
"expiresAt": 1800172800,
"lastError": null
}
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}Generate Static Creative with Saved Request
Pending release; not a deployed-availability claim. Save one actor-owned request before planning and return its ID promptly. Read source-filtered unresolved requests and current admission first. For a genuinely fresh submission, durably retain the current advertised prefix plus a new UUIDv4 before one explicitly approved POST. Never automatically repeat or replace an unknown key. Acceptance is not image completion; read the same request and linked ready generation. This creates a Bily draft only, never a platform ad.
curl --request POST \
--url https://app.bily.ai/api/customer/v1/creative-intelligence/{storeUrl}/generation-requests \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"sourceIntelligenceId": "<string>",
"idempotencyKey": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({sourceIntelligenceId: '<string>', idempotencyKey: '<string>'})
};
fetch('https://app.bily.ai/api/customer/v1/creative-intelligence/{storeUrl}/generation-requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.bily.ai/api/customer/v1/creative-intelligence/{storeUrl}/generation-requests"
payload = {
"sourceIntelligenceId": "<string>",
"idempotencyKey": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"storeUrl": "store.example.com",
"request": {
"protocol": "creative-generation-request-v1",
"id": "request-example",
"status": "failed",
"phase": "failed",
"generationId": null,
"sourceIntelligenceId": "analysis-example",
"quality": "draft",
"aspectRatio": "1:1",
"saveToLibrary": false,
"pinnedAt": null,
"createdAt": 1800000000,
"updatedAt": 1800000000,
"expiresAt": 1800172800,
"lastError": {
"protocol": "creative-generation-error-v1",
"code": "strategy_failed",
"phase": "planning",
"message": "Generation planning failed."
}
}
}{
"storeUrl": "store.example.com",
"request": {
"protocol": "creative-generation-request-v1",
"id": "request-example",
"status": "queued",
"phase": "awaiting_dispatch",
"generationId": null,
"sourceIntelligenceId": "analysis-example",
"quality": "draft",
"aspectRatio": "1:1",
"saveToLibrary": false,
"pinnedAt": null,
"createdAt": 1800000000,
"updatedAt": 1800000000,
"expiresAt": 1800172800,
"lastError": null
}
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}Authorizations
A server-side Bily API key created under Settings > AI tools > Access keys. Select the intended workspace before creating it.
Headers
An organization ID returned by GET /context or GET /organizations. Omit it when a scoped key supplies the organization. Otherwise provide it when no organization is selected.
"org_01J8W7T9G3E6ZQ4M2K5N8P1R0S"
Fresh UUIDv4 for this one POST only when consuming qualified non-admission proof; never an authorization token or key rewrite.
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$Path Parameters
Exact workspace URL returned by GET /context.
Body
^[A-Za-z0-9._~-]{1,256}$^[A-Za-z0-9._~-]{1,256}$draft, polished 1:1, 4:5, 9:16, 2:3 500