generate_post_cover
Generate an AI image and attach it as a post's featuredImage. Submits a kie.ai job, polls until complete, copies the result into the canonical post-asset R2 folder, and writes the public URL onto the post. Costs credits (see list_image_models). On poll timeout, the job continues — call attach_post_cover_from_job(postId, jobId) once it finishes to attach without paying again.
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": {
"postId": "<postId>",
"prompt": "<prompt>",
"modelCode": "<modelCode>"
},
"name": "generate_post_cover"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Random seed for reproducible output | |
| postId | Yes | The post ID | |
| prompt | Yes | Image generation prompt | |
| modelCode | Yes | Image model code from list_image_models (e.g. nano-banana-2) | |
| aspectRatio | No | Aspect ratio passed to the model, e.g. "16:9", "1:1" | |
| pollTimeoutMs | No | Default 60000. | |
| negativePrompt | No | Things to exclude from generation | |
| pollIntervalMs | No | Default 3000. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Tool result payload — shape varies per tool, see the tool description | |
| summary | Yes | One-line human-readable summary of the action | |
| renderType | Yes | UI rendering hint for the result |