generate_imagefrom €0.03 per image
Generate or edit an image
Create an image from a prompt, or edit and combine images you already have by passing them as references. Each image is charged. When you want several options of the same idea, set count in this one call instead of calling it again.
Parameters
- prompt
- What to generate, or the edit to apply to the reference images.
- model
- Model id. Default nano-banana-2.1 (Nano Banana 2.1). Name one, or let the assistant pick.
- count
- How many images from this same prompt (1–4). Default 1. Each image is charged at the normal price.
- aspect_ratio
- e.g. 1:1, 3:4, 16:9. Omit when editing to keep the first reference’s ratio.
- resolution
- One of the model’s sizes from list_models (e.g. 1K, 2K, 4K).
- reference_asset_ids
- asset_ids of previous or uploaded images to edit or use as references.
- reference_urls
- Public https image URLs to use as references.
Example
Make four vintage travel-poster options of Lisbon at dusk, 16:9, with Nano Banana 2.1.
list_modelsFree
List image models
The curated models, what each is best for, and the price per image by resolution in EUR and USD, plus the extra per reference image. Free. The assistant uses this to pick a model; you can also ask it to list prices.
Parameters
- all
- Set true only if you ask for a model that is not on the curated list. Default false.
Example
Which Tastepix models are cheapest for a product photo, and what does each one cost?
show_imagesFree
Show images
Render existing images inline when you ask to see earlier results again, or after an upload. Free. Not needed after generate_image, whose result is already shown in the viewer.
Parameters
- asset_ids
- One or more asset_ids from a previous result or upload.
Example
Show me the last two posters we made.
remove_background€0.04
Remove the background
Remove the background of an image, leaving the subject on transparency (PNG). For product shots, logos, stickers and portraits. Charged per image. The result shows inline and gets its own asset_id.
Parameters
- asset_id
- The image to work on: an asset_id from a previous result or upload.
Example
Remove the background from that product shot so I can drop it on a white landing page.
upscale_image€0.08
Upscale an image
Make an image 2× or 4× larger and sharper, faithfully (no new content), keeping transparency. For print or large screens. Same price for 2× and 4×.
Parameters
- asset_id
- The image to enlarge: an asset_id from a previous result or upload.
- factor
- 2 or 4. Default 2.
Example
Upscale that hero 4× for the print brochure.
vectorize_image€0.02
Vectorize an image to SVG
Convert an existing image into an SVG vector file. Use it when you want an SVG, a vector or a scalable version of an image you already have (a logo, icon, illustration or flat graphic). Best on clean artwork; photos come out stylized. Returns svg_url for the SVG file.
Parameters
- asset_id
- The image to convert: an asset_id from a previous result or upload.
Example
Turn that logo into an SVG I can drop in the repo.
animate_image€0.065/s
Animate an image
Turn an image into a short video clip (Grok Imagine Video, 720p, with sound), charged per second. Returns at once with status "rendering" and a generation_id; the viewer shows the video when it is ready. Default length is 5 seconds.
Parameters
- asset_id
- The image to animate: an asset_id from a previous result or upload.
- prompt
- How it should move, e.g. "slow push-in, waves rolling in". Omit for gentle natural motion.
- seconds
- Length in seconds: 5, 8, 10. Default 5.
Example
Animate that still: slow camera push-in, steam rising, 5 seconds.
get_videoFree
Get a video
Check on a video started with animate_image. Returns status "rendering" while it is being made, or shows the finished video inline. Free. The viewer also polls this on its own.
Parameters
- generation_id
- The generation_id returned by animate_image.
Example
Is the video ready?
upload_imagesFree
Upload images
Show an inline upload widget so you can add local images (for example ones you attached in chat). Then wait: your next message carries the new asset_ids. In clients that can run code, request_upload is the alternative.
Parameters
- max_files
- How many files the widget accepts (1–8). Default 8.
- label
- Short hint shown in the widget, e.g. "Drop the product photo".
Example
I want to edit a photo I have on my computer — open the upload widget.
request_uploadFree
Get an upload URL
One-time URL to upload a local file. For clients that can run code (Claude Code, Codex): PUT the file with the returned curl command. The upload widget uses it too. In chat apps prefer upload_images. Accepted: image/png, image/jpeg, image/webp.
Parameters
- mime_type
- One of image/png, image/jpeg, image/webp.
Example
Give me an upload URL so I can PUT public/logo.png, then vectorize it.