Generate an image
generate_imageGenerate an image from a prose prompt with a platform-specific aspect ratio. Optionally use up to 6 reference keys, then get a media key for posts.
Instructions
Make one image from a prompt written as a scene in prose, in the aspect ratio of the platform it is for, optionally conditioned on up to 6 reference_keys from the media library (a logo, a product shot, an earlier image). quality "premium" is the dearer model. Returns the image as a media key with a URL; put the key in posts_create mediaKeys. SPENDS CREDIT: about $0.016 of engine cost a default call, billed with the plan's margin; budgetUsd caps it (default 2, max 10) and chargedUsd says what it cost. Needs the write scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | A 2-6 word filename for this image, the way you would describe it to a colleague - e.g. "founder desk golden hour". Becomes the file the user sees in their Assets. | |
| size | No | 1K draft, 2K final. | |
| prompt | Yes | The full scene as 2-5 sentences of flowing prose, directing medium, subject, setting, light, and composition — YES "A photorealistic overhead shot of a cluttered founder desk at golden hour, one glowing laptop as the focal point, deep negative space on the right", NOT "desk, laptop, startup, 4k, trending, professional". When reference_keys are given, also say what each referenced object does in the scene. | |
| quality | No | standard = the default model (default). premium = the fidelity escalation, several times the price. | |
| budgetUsd | No | Optional: the most this call may spend, in dollars, default 2, max 10. | |
| aspectRatio | Yes | LinkedIn feed image: 4:5. Wide header: 16:9. | |
| reference_keys | No | Up to 6 media keys to condition on: brand-asset keys from the digest, mediaKeys of earlier generated images, or chat-upload keys. Omit for a purely imagined scene. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | Yes | ||
| media | Yes | ||
| output | No | The tool's own result, shaped by the tool. | |
| chargedUsd | Yes |