Skip to main content
Glama

Generate Pollinations Image

pollinations_generate_image

Generate images from text descriptions using Pollinations models. Supports optional reference images for image-to-image generation.

Instructions

Generate an image from a text prompt using Pollinations image models. This calls Pollinations' OpenAI-compatible image generation endpoint and returns either a generated image URL or base64 image data. Use this when the user wants a new image from text, optionally with reference images for image-to-image generation. Do NOT use this for editing an existing image with specific source-image transformation instructions; use pollinations_edit_image instead. Args: - prompt (string, required): Text description of the desired image. Be specific about subject, style, composition, lighting, colors, and any text that should appear. - model (string, optional): Pollinations image model slug. Known image models include kontext, nanobanana, nanobanana-2, nanobanana-2-lite, nanobanana-pro, seedream5, seedream5-pro, seedream, seedream-pro, ideogram-v4-turbo, ideogram-v4-balanced, ideogram-v4-quality, gptimage, gptimage-large, gpt-image-2, flux, zimage, wan-image, wan-image-pro, qwen-image, grok-imagine, grok-imagine-pro, klein, p-image, p-image-edit, nova-canvas. Call pollinations_list_models first for current pricing/capabilities. - n (number, optional, default 1): Number of images. Pollinations currently supports max 1. - size (string, optional): Output size as WIDTHxHEIGHT, e.g. 1024x1024, 1536x1024, 1024x1536. Do not combine with width/height unless intentionally overriding. - width and height (numbers, optional): Alternative dimension controls. If both are provided and size is omitted, Nectar sends size as WIDTHxHEIGHT. - quality (string, optional): standard, hd, low, medium, or high. Best supported by gptimage, gptimage-large, and gpt-image-2; other models may ignore it. - response_format (string, optional, default b64_json): b64_json is preferred for local saving because Nectar can decode it directly. Use url only when the caller explicitly wants a Pollinations URL instead of embedded image data. - save_output (boolean, optional, default true): Save returned image data or URL media to a local file and include the path in the result. - output_dir (string, optional): Directory for saved files. Defaults to NECTAR_OUTPUT_DIR or ./nectar-output relative to the server process. - filename_prefix (string, optional): Prefix for saved media filenames. Nectar sanitizes this value. - image (string or string[], optional): Reference image URL(s) for image-to-image generation on supported models such as kontext, gptimage, seedream, klein, and nanobanana. - seed (number, optional): Reproducibility seed. Use -1 for random. Supported by models such as flux, zimage, seedream, and klein; other models may ignore it. - enhance (boolean, optional): Ask Pollinations to enhance/expand the prompt when supported. - negative_prompt (string, optional): Things to avoid in the generated image when supported. - transparent (boolean, optional): Request a transparent background. Only supported by gptimage, gptimage-large, and gpt-image-2. - safe (string, optional): Comma-separated safety filters: privacy, secrets, sexual, violence, shield, true, nsfw. true means privacy,secrets. nsfw means sexual,violence. - user (string, optional): End-user identifier for abuse tracking. - output_format (string, optional, default markdown): markdown summary or raw json response. Returns: Markdown or JSON with the generated URL, base64 length, and revised_prompt when Pollinations returns one. Examples: Use model=flux, prompt only for a general image. Use model=gpt-image-2 with transparent=true for a transparent asset. Use image=[url] with kontext or nanobanana for image-to-image reference generation. Error handling: 401 means missing/invalid POLLINATIONS_API_KEY in the MCP env block. 402 means insufficient pollen balance. 403 means the key lacks permission for the selected model. 429 means wait and retry. 400 usually means conflicting or unsupported parameters; call pollinations_list_models and retry with model-supported options.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoNumber of images to generate. Pollinations currently supports 1.
safeNoOptional comma-separated safety filters: privacy, secrets, sexual, violence, shield, true, nsfw. true enables privacy,secrets. nsfw enables sexual,violence. false or 0 disables safety filters.
seedNoOptional seed for reproducible results. Use -1 for random. Supported by flux, zimage, seedream, and klein; unsupported models may ignore it.
sizeNoOptional image size as WIDTHxHEIGHT, for example 1024x1024, 1536x1024, or 1024x1536. If omitted, Pollinations chooses the default. If width and height are both set and size is omitted, Nectar sends WIDTHxHEIGHT as size.
userNoOptional end-user identifier for abuse tracking.
imageNoOptional reference image URL or URLs for image-to-image generation on supported models such as kontext, gptimage, seedream, klein, and nanobanana.
modelNoOptional Pollinations image model slug. Examples: flux, kontext, gptimage, gptimage-large, gpt-image-2, seedream5, seedream5-pro, seedream, seedream-pro, nanobanana, nanobanana-2, nanobanana-pro, grok-imagine, wan-image, qwen-image, klein, p-image, p-image-edit, nova-canvas. Call pollinations_list_models first for current models.
widthNoOptional image width in pixels. Use with height as an alternative to size.
heightNoOptional image height in pixels. Use with width as an alternative to size.
promptYesRequired text description of the image. Include subject, composition, style, lighting, colors, mood, and any exact text that should appear.
enhanceNoOptional prompt enhancement flag. When supported, Pollinations may expand/improve the prompt before generation.
qualityNoImage quality: standard, hd, low, medium, high. Best supported by gptimage, gptimage-large, and gpt-image-2; other models may ignore it.medium
output_dirNoDirectory where generated image files should be saved. Defaults to NECTAR_OUTPUT_DIR or ./nectar-output.
save_outputNoSave returned image output to a local file. Works for both url and b64_json Pollinations responses.
transparentNoOptional transparent background request. Only supported by gptimage, gptimage-large, and gpt-image-2.
output_formatNoMCP response format: markdown for readable summaries, json for raw Pollinations response plus saved_files metadata when saving is enabled.markdown
filename_prefixNoOptional prefix for saved image filenames. Example: bee-logo or product-shot.
negative_promptNoOptional negative prompt describing what to avoid, when the selected model supports negative prompts.
response_formatNoPollinations image response format. Defaults to b64_json so Nectar can save the image locally without a second download. Use url only when the caller explicitly wants a Pollinations URL.b64_json
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations (readOnlyHint=false, openWorldHint=true, idempotentHint=false, destructiveHint=false), the description discloses rich behavioral context: whether output is a URL or base64, local saving behavior with save_output, default output directory, model-specific support for features like transparent and negative_prompt, and a detailed error-handling section covering 400/401/402/403/429 responses. This far exceeds what annotations provide and contains no contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but every section earns its place given the tool's complexity. It is front-loaded with the core purpose, then moves through behavior, parameters, return format, examples, and error handling in a logical, scannable structure. No filler sentences; each part provides actionable detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description correctly covers return values ('Returns: Markdown or JSON with the generated URL, base64 length, and revised_prompt'). It also includes examples for common scenarios, error handling, and parameter interplay. For a tool of this complexity (19 params, multiple modes, network calls), the description is complete enough for an agent to select and invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Even though schema coverage is 100%, the description adds substantial meaning beyond the raw schema. It explains prompt specificity, the complete list of known model slugs, the rationale for choosing b64_json over url, how width/height interact with size, what Nectar sanitizes, what safe filter values mean, and which parameters are model-dependent. This is exemplary parameter guidance for a 19-parameter tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource ('Generate an image from a text prompt using Pollinations image models') and clearly distinguishes from the sibling tool by stating 'Do NOT use this for editing an existing image... use pollinations_edit_image instead.' It also covers both text-to-image and image-to-image modes, leaving no ambiguity about its scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use: 'when the user wants a new image from text, optionally with reference images for image-to-image generation.' It gives exclusions and alternatives: 'Do NOT use this for editing an existing image with specific source-image transformation instructions; use pollinations_edit_image instead.' It also advises calling pollinations_list_models first for current capabilities, and gives practical examples for common use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pinkpixel-dev/nectar-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server