Generate Hero Image
post_posts_by_id_heroGenerate (or regenerate) a blog post's hero image, or its OG social card — works the same before and after the post exists. Returns the image inline plus its public URL. The fields below cover prompts, references, style, and the commit:false review flow. Rules that span fields: only the title and subtitle may ever appear on an OG card, because given anything else the generator invents its own tagline; an OG card takes NO references unless you name them, since auto-matching used to put a real face on social cards nobody asked to be in; for target:"og" prompt is the VISUAL DIRECTION and still gets OG framing; to anchor a face, mark the photo as a "headshot" via mark_reference_image first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "post_posts_by_id_hero"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Post UUID | |
| style | No | Visual style. Defaults to "modern". | |
| commit | No | Default true: apply the image to the post immediately. False generates a review CANDIDATE (kind hero-candidate) and leaves the post untouched. | |
| domain | No | ||
| prompt | No | Image prompt, auto-generated from the post if omitted. For target:"og", layered on the site share_card_style. | |
| target | No | "hero" (default) sets featured_image; "og" makes the 1200x630 Open Graph card and sets og_image, leaving the hero untouched. | |
| site_id | No | ||
| alt_text | No | ACCEPT mode: override the auto-generated alt text on the accepted asset. Applies to accept_asset_id; ignored on accept_image_url. | |
| subtitle | No | OG only. Secondary line rendered verbatim beneath the title. Defaults to the post's own subtitle; nothing appears unless passed or stored. | |
| caller_name | No | Optional self-reported label for who/what is generating (e.g. an agent name). Shows up in get_hero_history as caller_name — a label you provide, not a verified identity. Omit to default to your account id. | |
| accept_asset_id | No | ACCEPT mode, no generation: promote a candidate and attach it. Sets og_image for an OG candidate (og-candidate kind), or featured_image + hero_asset_id for a hero candidate. The field_set key in the response says which field was written. | |
| accept_image_url | No | ACCEPT fallback when only the URL is known — sets featured_image (or og_image when target: "og" is also passed) without asset promotion. | |
| include_subtitle | No | OG only. Default true. False renders a title-only card even when the post has a subtitle. | |
| iteration_prompt | No | Edit instruction for iterating on a previous hero (e.g. "make the background darker"). Requires source_image_url, which anchors composition. | |
| latest_candidate | No | READ mode, no generation: returns the newest un-accepted hero candidate for the post. | |
| source_image_url | No | URL of the hero to iterate on (a prior result's image_url). Used with iteration_prompt. | |
| include_title_text | No | OG only. Default true: render the title as text on the card. False produces a purely visual card. | |
| reference_image_ids | No | Curated reference IDs and/or media-library asset IDs (upload_media / list_media). Omitted: reuses the first hero's references, else auto-matches from the prompt. [] uses none. |