POSTapi.synup.com/api/v4/social-post-ideas/generate-idea-visual
Generate idea visual
Generates an on-demand visual (image) for a social post idea from a prompt, optionally grounded by up to two referenceImageUrls and a target imageSize.
Requires an API key. Send it as
Authorization: API <your-key> — see Getting started.Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Synup-Version | string | required | API version date (YYYY-MM-DD). |
Body
| Name | Type | Required | Description |
|---|---|---|---|
ideaId | string | required | |
prompt | string | optional | |
referenceImageUrls | array of string | optional | |
imageSize | string | optional |
Request
Request
curl -X POST 'https://api.synup.com/api/v4/social-post-ideas/generate-idea-visual' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"ideaId": "91b2...",
"prompt": "bright storefront on a sunny day"
}'const res = await fetch('https://api.synup.com/api/v4/social-post-ideas/generate-idea-visual', {
method: 'POST',
headers: {
Authorization: 'API YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"ideaId": "91b2...",
"prompt": "bright storefront on a sunny day"
}),
});
const data = await res.json();import requests
res = requests.post(
"https://api.synup.com/api/v4/social-post-ideas/generate-idea-visual",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"ideaId": "91b2...",
"prompt": "bright storefront on a sunny day"
},
)
data = res.json()req, _ := http.NewRequest("POST", "https://api.synup.com/api/v4/social-post-ideas/generate-idea-visual", bytes.NewBufferString(payload))
req.Header.Set("Authorization", "API YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Responses
| Status | Description |
|---|---|
200 | Successful response |
401 | Unauthorized - Invalid or missing API key |
Example response (generated from the schema)
{
"data": {
"generateIdeaVisual": {
"success": true,
"idea": {},
"error": {
"message": "string",
"code": "string",
"contextInfo": [
{
"key": "string",
"value": "string"
}
]
}
}
}
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | object | optional | |
data.generateIdeaVisual | object | optional | |
data.generateIdeaVisual.success | boolean | optional | |
data.generateIdeaVisual.idea | object | optional | The updated post idea (see Post idea for the full shape). |
data.generateIdeaVisual.error | object | optional | |
data.generateIdeaVisual.error.message | string | optional | |
data.generateIdeaVisual.error.code | string | optional | |
data.generateIdeaVisual.error.contextInfo | array of object | optional | |
data.generateIdeaVisual.error.contextInfo[].key | string | optional | |
data.generateIdeaVisual.error.contextInfo[].value | string | optional |