chatgpt_generate_image
Generate or edit images on chatgpt.com by submitting a prompt with optional reference images, then save the resulting PNG to a specified output path in a single automated call.
Instructions
Generate or edit an image on chatgpt.com end-to-end and save it to disk in ONE call. Opens a fresh chat, optionally uploads reference images (e.g. a brand logo), submits the prompt, waits for the generated image to finish, then writes the result PNG to output_path. Requires an authenticated chatgpt.com session (import cookies first via cookie_import). Returns the saved path and pixel dimensions. Note: chatgpt image generation is slow (~60-120s) — set timeout_ms accordingly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Text prompt for image generation/editing. | |
| timeout_ms | No | Max ms to wait for the generated image. | |
| image_paths | No | Optional reference image file paths to upload before prompting (e.g. a logo). | |
| output_path | Yes | Absolute path to write the resulting PNG. |