Image

Edit Image (OpenAI-compatible)

OpenAI-compatible image editing endpoint.

Edit images using a text prompt and one or more source images. Accepts JSON with image URLs or multipart/form-data with file uploads. Set response_format to "url" for a stored media URL, or "b64_json" for base64 image data (default). Community image models forward edits to the registrant's OpenAI-compatible endpoint as multipart form data.

Authentication: Include your API key as Authorization: Bearer YOUR_API_KEY.

post/v1/images/edits

Request

  • Base URL: https://gen.pollinations.ai
  • URL: https://gen.pollinations.ai/v1/images/edits
  • Auth: HTTP bearer

Request body

promptstring required

A text description of the desired edit

modelstring

The model to use for image generation

ninteger

Number of images to generate (currently max 1)

sizestring

Image size as WIDTHxHEIGHT (e.g., 1024x1024, 512x512)

quality'standard' | 'hd' | 'low' | 'medium' | 'high'

Image quality. OpenAI 'standard'/'hd' mapped to Pollinations equivalents

response_format'url' | 'b64_json'

Return format. "url" returns a stored media.pollinations.ai URL, "b64_json" returns base64-encoded image data

resolution'1k' | '2k' | '360p' | '480p' | '720p' | '768p' | '1080p' | '4k'

Output resolution for resolution-priced image and video models (Pollinations extension)

Response

Success

createdinteger required

Changes

No recorded changes to this operation across all 1 revision of this API.