Plan a generation
plan_generationWork out what generating would use, rendering nothing and spending no draft or credit. Give it the kind (og_image for any image, email or pdf for any document) and whatever the user has said so far; it answers with the template it would use and that template's fields with their defaults, which required fields are still missing, the image sizes, the brand kit it would resolve to and the other kits with their ids, the page, orientation and footer a PDF would take from the kit, the templates the user has saved, the free drafts left, the unlock cost, and ready. Call it once before generate_og_image, generate_email or generate_pdf, then generate in the same turn unless one open choice would change the result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| page | No | ||
| size | No | Where the image will be posted. Sizes: 'og' 1200x630 (The card X, LinkedIn, Slack and iMessage show under a link); 'square' 1080x1080 (An Instagram, LinkedIn or Facebook feed post); 'portrait' 1080x1350 (A taller Instagram or LinkedIn feed post); 'story' 1080x1920 (An Instagram or Facebook story, or a Reels cover); 'landscape' 1280x720 (A YouTube thumbnail or a 16:9 slide); 'facebook_cover' 1640x624 (A Facebook page or profile cover photo, shown at 820 by 312); 'linkedin_banner' 1584x396 (The background image on a LinkedIn profile); 'x_header' 1500x500 (The header image on an X profile). Left out it is 'og'. | |
| align | No | ||
| props | No | ||
| title | No | The PDF title, if they gave one. | |
| header | No | ||
| subject | No | The email subject, if they gave one. | |
| markdown | No | ||
| appearance | No | ||
| footer_text | No | ||
| template_id | No | The template the user named, if any. | |
| brand_kit_id | No | A brand_kit_id from list_brand_kits. | |
| page_numbers | No | ||
| saved_template_id | No | A saved_template_id from list_templates; its inputs seed the ones you pass. |