Write a video or image prompt
optimize_promptWrite or rewrite a video or image prompt the way the chosen model reads it: Seedance 2.5, Seedance 2.0, Kling 4.0, MiniMax H3, Wan 3.0, Veo 3.1, Nano Banana 2.1, GPT Image 2.6 Sunburst or Seedream 5.5. Modes: write turns an idea or a rough draft into one ready prompt; refs says what each reference picture, video or sound is for; fix takes a prompt that came out wrong, what went wrong (and optionally up to 3 stills from the result) and returns the likely causes and a corrected prompt. Video models also have shots (a timed multi-shot prompt) and frames (connect a first frame, keyframes and a last frame); image models also have edit (change one picture: what changes, what stays) and variants (a planned set of pictures of one subject). Returns the prompt, a shot list or a picture layout when there is one, things to check and suggested settings. It only writes text; nothing is generated. Uses a few PopNow credits: small amounts run right away with the price in the reply; otherwise it quotes first and runs after the user agrees (max_credits). Then pass the prompt to create_video, or to create_image or edit_image for the image models.
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": {
"model": "<model>",
"idea": "<idea>"
},
"name": "optimize_prompt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| idea | Yes | The user's idea or draft prompt, in their own words (up to 4000 characters). In fix mode: the exact prompt that was run. | |
| keep | No | edit and variants modes only (image models): what must stay the same, in the user's words (up to 400 characters). | |
| mode | No | write (default: turn an idea or draft into one ready prompt), refs (say what each reference is for) or fix (the user ran a prompt and the result came out wrong). Video models also: shots (a timed multi-shot prompt) and frames (connect a first frame, keyframes and a last frame). Image models also: edit (change one picture, saying what changes and what stays) and variants (a set of pictures of the same subject, saying what stays and what each one changes). | |
| note | No | fix mode: anything else the user said about the result, in their words (up to 600 characters). | |
| refs | No | refs, frames, edit and variants modes: the references in the order they will be attached, up to 12. In frames mode only pictures: exactly one first, any number of keyframe, at most one last. In edit mode only pictures, exactly one with role source (the picture to edit). | |
| task | No | Video: text-to-video (words only), image-to-video (starts from a picture) or reference-to-video (reference pictures, videos or sounds; not with veo-3-1). Image: text-to-image (words only) or image-to-image (edits or builds on the user's pictures). Leave it out to match the mode. | |
| model | Yes | The model the prompt is for. Video: seedance-2-5 (Seedance 2.5), seedance-2-0 (Seedance 2.0), kling-4-0 (Kling 4.0), minimax-h3 (MiniMax H3), wan-3-0 (Wan 3.0) or veo-3-1 (Veo 3.1). Image: nano-banana-2-1 (Nano Banana 2.1), gpt-image-2-6-sunburst (GPT Image 2.6 Sunburst) or seedream-5-5 (Seedream 5.5). | |
| shots | No | shots mode only: how many shots, 2 to 6 (each shot needs at least 2 seconds). Leave it out to let the idea decide. | |
| locale | No | Language for the shot list or layout, checks and notes, for example en, zh-CN, ja, de or fr. Default English. | |
| seconds | No | Video models only: planned clip length in seconds, 2 to 30, and one the model can make. Leave it out to let the idea decide. | |
| language | No | en (default): write the prompt in English. same: keep the language of the idea. | |
| symptoms | No | fix mode: what went wrong. identity (the face drifts), anatomy (hands or bodies wrong), ignored (part of the prompt was ignored), text (garbled or unwanted text), style (wrong look). Video only: order (events in the wrong order), camera (the camera did something else), static (too little movement), chaos (too much or warped motion), speech (dialogue or lip sync wrong), continuity (things jump between shots), length (the action doesn't fit the length). Image only: composition (things in the wrong place or size), overedit (an edit changed parts that should have stayed), count (wrong number of people or objects), consistency (the pictures in a set don't match). | |
| variants | No | variants mode only (image models): how many pictures in the set, 2 to 6. Leave it out to let the idea decide. | |
| frame_urls | No | fix mode, optional: up to 3 still pictures from the result (for a video, stills in time order; for an image model, the picture itself): popnow:// links from get_upload (after request_upload) or from earlier picture results. Not a video file. | |
| max_credits | No | The most PopNow credits the user agreed to spend on this. Only set it after the user confirmed a quoted price. |