Generate Image
generate_imageUse this to create or edit an AI image. Text-to-image from a prompt, OR image-to-image / editing / multi-reference by passing input_images (URLs, data URIs, or base64) — e.g. edit or restyle an image the user just generated by passing its URL. Input support is per-model: some take 1 image, some several, some none (check each model's max_input_images via list_models). Submits an async job and returns a job_id — then call check_generation_status to poll (usually ready in seconds); when complete it returns the finished image inline for you to display. Each call starts a new job that spends credits from the user's BudgetPixel balance (failed jobs aren't charged). Default model: seedream-5.5; call list_models to see every available model with prices and input limits. Write @handle in the prompt to cast a character (list_characters), e.g. a free BudgetPixel AI influencer like @barry; an item's @handle (search_wardrobe) dresses them: "@barry wearing @camel_coat_set"; a pose's @handle (search_poses) poses them: "@barry in @sitting_knee_up_pose".
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": {
"prompt": "<prompt>"
},
"name": "generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Seed for reproducible generation | |
| model | No | AI model id. Omit for the default (seedream-5.5 — natural light and skin, sharp small text, edits that keep the rest as it was, transparent cut-outs from the prompt; up to 10 reference images; 26 credits at 1K, 46 at 2K, plus 10 per reference image). For fast, low-cost drafts pick flux-3-image-klein (FLUX 3 Klein: 12 credits at 1K, up to 10 free references, images in seconds) or seedream-5.0-flash (flat 25 credits, free references). By job: gpt-image-2.6-sunburst (dense text, complex layouts, precise edits; up to 16 free references), gpt-image-2.6-flare (fast, sharp text; both make transparent cut-outs), seedream-4.5 (photorealism), gpt-image-2 (text in images), nano-banana-2.1 (fast, sharp text in images, up to 9 free references; optional paid search grounding), nano-banana-2 (editing), qwen-image-3.0 (all-rounder), flux-3-image (FLUX 3: up to 10 free references, optional web grounding; priced by size, 55 credits at 768px up to 790 at 4K). Call list_models for the full catalog with prices and input limits. | |
| prompt | Yes | Text prompt describing the image to generate (mai-image-2.7 takes up to 8,000 characters and refuses a longer prompt) | |
| quality | No | Optional rendering quality for models that support it (gpt-image-2: low/medium/high; gpt-image-2.5-sunburst and gpt-image-2.5-flare: low/medium/high/xhigh/max; gpt-image-2.6-sunburst and gpt-image-2.6-flare: low 70, medium 120, high 175, xhigh 340 or max 675 credits per image at any size; grok-imagine-image-2: low/medium — no high tier). Higher costs more. On grok-imagine-image-2 quality x resolution sets the price (low 1K=50, low 2K=80, medium 1K=80, medium 2K=100 credits). Omit for default. | |
| grounding | No | Optional, flux-3-image only: let the model research the prompt with web and image search before rendering. On by default and free. Set false for faster, self-contained generation. Omit for the default. | |
| background | No | Optional output background for models that support it (see list_models). gpt-image-2.6-sunburst / gpt-image-2.6-flare: "transparent" makes a cut-out (a sticker, logo or product) straight from the prompt or an edit, returned as a PNG with transparency; seedream-5.5 does the same; mai-image-2.7 makes a cut-out from a text prompt (with input images it draws the subject anew rather than cutting out the input). seedream-5.0-flash / seedream-5.0-pro: "transparent" only keeps a transparent background when EDITING: pass exactly one input image, a PNG that already has transparent pixels. Omit (or "opaque") for a normal image. | |
| num_images | No | Number of images to generate (1-4) | |
| resolution | No | Optional output size (per-model options, e.g. seedream-5.5, seedream-5.0-pro & seedream-5.0-flash: 1K/2K; minimax-h3-image: 2K or 4K; mai-image-2.7: 1K (default, 50 credits) or 2K (190), plus 11 credits at 1K or 45 at 2K for each of its up to 5 input images, per generated image; gpt-image-2 & nano-banana-2: up to 4K; nano-banana-2.1: 1K/2K/4K; flux-3-image and flux-3-image-klein: 768px/1K/1.5K/2K/4K — see list_models for what each size costs). Omit for the model default. Larger costs more, sometimes far more: flux-3-image is 55/65/90/130/790 credits per image at 768px/1K/1.5K/2K/4K (flux-3-image-klein 11/12/15/19/48), so confirm with the user before choosing 4K. | |
| aspect_ratio | No | Aspect ratio of the generated image. Omit for the default: 1:1 — except an edit with flux-3-image, flux-3-image-klein, nano-banana-2.1 or mai-image-2.7, which keeps the first input image's shape unless you set a ratio here. | |
| image_search | No | Optional, nano-banana-2.1 only: let the model look up web images as visual reference before rendering (what a real place, product or landmark looks like). Off by default. It runs a Google Search too, so it costs 20 credits per image in total, with or without google_search (list_models shows the current price). Tell the user it adds to the cost. | |
| input_images | No | Optional input image(s) for image-to-image / editing / multi-reference — each a public image URL, a data URI, or raw base64. Per-model support: some models take 1, some several, some none (see max_input_images in list_models). Omit for text-to-image. To edit an image the user just generated, pass its URL here. | |
| google_search | No | Optional, nano-banana-2.1 only: ground the image in live Google Search results (weather, scores, recent events, current facts). Off by default. Costs extra: 10 credits per image (list_models shows the current price). Turn it on only when the request needs current, real-world information, and tell the user it adds to the cost. | |
| negative_prompt | No | What to avoid in the generated image |