{"components":{"parameters":{"bg":{"description":"Background color: CSS name or 3/6-digit hex. Overrides the corresponding query color. Invalid colors use the default.","example":"tomato","in":"path","name":"bg","required":true,"schema":{"type":"string"}},"bg_color":{"description":"CSS named color or 3/6-digit hex, optionally prefixed with # (encode # as %23). Invalid values fall back to the default. A corresponding path color takes precedence. A valid gradient replaces the background color.","example":"tomato","in":"query","name":"bg_color","required":false,"schema":{"default":"#C7C7C7","type":"string"}},"caption":{"description":"URL-encoded caption. Overrides the text query parameter. Supports literal \\n or encoded newline characters. Raster captions wrap; SVG captions do not.","example":"Hello World","in":"path","name":"caption","required":true,"schema":{"type":"string"}},"dims":{"description":"Show dimension text. Only false (case-insensitive) hides it; other values show it. Captions still render when dimensions are hidden.","example":false,"in":"query","name":"dims","required":false,"schema":{"default":true,"type":"boolean"}},"ext":{"description":"Output extension: png, jpg, jpeg, webp, svg. Case-insensitive. Unrecognized extensions fall back to PNG.","example":"webp","in":"path","name":"ext","required":true,"schema":{"type":"string"}},"first":{"description":"A CSS named color or 3/6-digit hex without # sets the background. Anything else is a caption. Use ?text=red for a caption that looks like a color. A path color overrides bg_color; a path caption overrides text.","example":"steelblue","in":"path","name":"first","required":true,"schema":{"type":"string"}},"gradient":{"description":"Preset name (case-insensitive): sunset, ocean, forest, lavender, midnight, fire, sky, peach, mint, berry, coral, steel, candy, arctic, ember, twilight, spring, neon, rose, shadow. Alternatively, two CSS names or hex colors separated by a comma. Invalid or empty values use a solid background.","example":"sunset","in":"query","name":"gradient","required":false,"schema":{"default":"","type":"string"}},"gradient_angle":{"description":"CSS-style degrees: 0=up, 90=right, 180=down, 270=left. Omit to use the preset angle, or 180 for custom gradients. Invalid integers use that same default. Ignored without a valid gradient.","example":45,"in":"query","name":"gradient_angle","required":false,"schema":{"type":"integer"}},"height":{"description":"Height in pixels. Nonnegative integers are accepted and clamped to 10\u20135000; out-of-range values are not rejected. Negative numbers do not match the route.","example":300,"in":"path","name":"height","required":true,"schema":{"minimum":0,"type":"integer"}},"square":{"description":"Both dimensions in pixels. Nonnegative integers are accepted and clamped to 10\u20135000; out-of-range values are not rejected. Negative numbers do not match the route.","example":300,"in":"path","name":"square","required":true,"schema":{"minimum":0,"type":"integer"}},"text":{"description":"Caption; supports literal \\n or encoded newline characters. Raster captions wrap automatically; SVG captions do not. Ignored when a path caption is present.","example":"Blog Cover","in":"query","name":"text","required":false,"schema":{"default":"","type":"string"}},"text_c":{"description":"Text color: CSS name or 3/6-digit hex. Overrides the corresponding query color. Invalid colors use the default.","example":"white","in":"path","name":"text_c","required":true,"schema":{"type":"string"}},"text_color":{"description":"CSS named color or 3/6-digit hex, optionally prefixed with # (encode # as %23). Invalid values fall back to the default. A corresponding path color takes precedence. ","example":"white","in":"query","name":"text_color","required":false,"schema":{"default":"#8F8F8F","type":"string"}},"width":{"description":"Width in pixels. Nonnegative integers are accepted and clamped to 10\u20135000; out-of-range values are not rejected. Negative numbers do not match the route.","example":300,"in":"path","name":"width","required":true,"schema":{"minimum":0,"type":"integer"}}},"responses":{"Image":{"content":{"image/jpeg":{"schema":{"format":"binary","type":"string"}},"image/png":{"schema":{"format":"binary","type":"string"}},"image/svg+xml":{"schema":{"format":"binary","type":"string"}},"image/webp":{"schema":{"format":"binary","type":"string"}}},"description":"Generated image bytes. Embed the request URL directly in an img src.","headers":{"Cache-Control":{"description":"Images are currently served without caching.","example":"no-store, no-cache, must-revalidate, max-age=0","schema":{"type":"string"}},"X-FPOImg-New":{"description":"Optional service announcement; may be absent.","schema":{"type":"string"}}}},"NotFound":{"content":{"application/json":{"example":{"code":404,"description":"The requested URL was not found on the server.","name":"Not Found"},"schema":{"properties":{"code":{"type":"integer"},"description":{"type":"string"},"name":{"type":"string"}},"required":["code","name","description"],"type":"object"}}},"description":"The URL does not match a route (for example, negative dimensions)."},"PNGImage":{"content":{"image/png":{"schema":{"format":"binary","type":"string"}}},"description":"Generated image bytes. Embed the request URL directly in an img src.","headers":{"Cache-Control":{"description":"Images are currently served without caching.","example":"no-store, no-cache, must-revalidate, max-age=0","schema":{"type":"string"}},"X-FPOImg-New":{"description":"Optional service announcement; may be absent.","schema":{"type":"string"}}}},"ServerError":{"content":{"text/html":{"example":"Server Error","schema":{"type":"string"}}},"description":"Image generation failed."}}},"externalDocs":{"description":"API reference and examples","url":"https://fpoimg.com/docs"},"info":{"description":"Free URL-based placeholder images for wireframes, prototypes, and CMS layouts. No account or API key is required. GET an image URL directly or use it as an HTML img src. Responses contain image bytes, not JSON or a hosted-image URL. PNG is the default; an extension selects JPEG, WebP, or SVG. These are geometric placeholders with text and colors, not prompt-generated photographs or illustrations. Prefer query parameters for captions and colors to avoid ambiguous path segments. URL-encode query values; encode # as %23 or omit it.","title":"FPOImg Placeholder Image API","version":"1.0.0"},"openapi":"3.0.3","paths":{"/{square}":{"get":{"description":"Use the same pixel size for width and height.","operationId":"show_image_square","parameters":[{"$ref":"#/components/parameters/square"},{"$ref":"#/components/parameters/text"},{"$ref":"#/components/parameters/bg_color"},{"$ref":"#/components/parameters/text_color"},{"$ref":"#/components/parameters/gradient"},{"$ref":"#/components/parameters/gradient_angle"},{"$ref":"#/components/parameters/dims"}],"responses":{"200":{"$ref":"#/components/responses/PNGImage"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/ServerError"}},"summary":"Generate a square PNG","tags":["Images"],"x-example-url":"/300"}},"/{square}.{ext}":{"get":{"description":"Select PNG, JPEG, WebP, or SVG with a file extension.","operationId":"show_image_square_ext","parameters":[{"$ref":"#/components/parameters/ext"},{"$ref":"#/components/parameters/square"},{"$ref":"#/components/parameters/text"},{"$ref":"#/components/parameters/bg_color"},{"$ref":"#/components/parameters/text_color"},{"$ref":"#/components/parameters/gradient"},{"$ref":"#/components/parameters/gradient_angle"},{"$ref":"#/components/parameters/dims"}],"responses":{"200":{"$ref":"#/components/responses/Image"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/ServerError"}},"summary":"Generate a square in a selected format","tags":["Images"],"x-example-url":"/300.webp?text=Avatar"}},"/{square}/{bg}/{text_c}":{"get":{"description":"Set background and text colors in the URL path. Add a caption with the text query parameter.","operationId":"show_image_square_colors","parameters":[{"$ref":"#/components/parameters/bg"},{"$ref":"#/components/parameters/square"},{"$ref":"#/components/parameters/text_c"},{"$ref":"#/components/parameters/text"},{"$ref":"#/components/parameters/bg_color"},{"$ref":"#/components/parameters/text_color"},{"$ref":"#/components/parameters/gradient"},{"$ref":"#/components/parameters/gradient_angle"},{"$ref":"#/components/parameters/dims"}],"responses":{"200":{"$ref":"#/components/responses/PNGImage"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/ServerError"}},"summary":"Generate a square with path colors","tags":["Images"],"x-example-url":"/300/tomato/white?text=Avatar"}},"/{square}/{first}":{"get":{"description":"Color-like path values select a background; other values set a caption.","operationId":"show_image_square_first","parameters":[{"$ref":"#/components/parameters/first"},{"$ref":"#/components/parameters/square"},{"$ref":"#/components/parameters/text"},{"$ref":"#/components/parameters/bg_color"},{"$ref":"#/components/parameters/text_color"},{"$ref":"#/components/parameters/gradient"},{"$ref":"#/components/parameters/gradient_angle"},{"$ref":"#/components/parameters/dims"}],"responses":{"200":{"$ref":"#/components/responses/PNGImage"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/ServerError"}},"summary":"Generate a square with a path color or caption","tags":["Images"],"x-example-url":"/300/steelblue?text=Avatar&text_color=white"}},"/{width}x{height}":{"get":{"description":"Recommended default endpoint. Customize the image using query parameters.","operationId":"show_image_width_height","parameters":[{"$ref":"#/components/parameters/height"},{"$ref":"#/components/parameters/width"},{"$ref":"#/components/parameters/text"},{"$ref":"#/components/parameters/bg_color"},{"$ref":"#/components/parameters/text_color"},{"$ref":"#/components/parameters/gradient"},{"$ref":"#/components/parameters/gradient_angle"},{"$ref":"#/components/parameters/dims"}],"responses":{"200":{"$ref":"#/components/responses/PNGImage"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/ServerError"}},"summary":"Generate a rectangular PNG","tags":["Images"],"x-example-url":"/800x600?gradient=ocean&text=Blog+Cover&dims=false"}},"/{width}x{height}.{ext}":{"get":{"description":"Select PNG, JPEG, WebP, or SVG with a file extension.","operationId":"show_image_width_height_ext","parameters":[{"$ref":"#/components/parameters/ext"},{"$ref":"#/components/parameters/height"},{"$ref":"#/components/parameters/width"},{"$ref":"#/components/parameters/text"},{"$ref":"#/components/parameters/bg_color"},{"$ref":"#/components/parameters/text_color"},{"$ref":"#/components/parameters/gradient"},{"$ref":"#/components/parameters/gradient_angle"},{"$ref":"#/components/parameters/dims"}],"responses":{"200":{"$ref":"#/components/responses/Image"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/ServerError"}},"summary":"Generate a rectangle in a selected format","tags":["Images"],"x-example-url":"/800x600.svg?gradient=sunset&text=Hero&dims=false"}},"/{width}x{height}.{ext}/{caption}":{"get":{"description":"This caption is always treated as text, even when it matches a color name. It overrides the text query parameter.","operationId":"show_image_width_height_ext_caption","parameters":[{"$ref":"#/components/parameters/caption"},{"$ref":"#/components/parameters/ext"},{"$ref":"#/components/parameters/height"},{"$ref":"#/components/parameters/width"},{"$ref":"#/components/parameters/text"},{"$ref":"#/components/parameters/bg_color"},{"$ref":"#/components/parameters/text_color"},{"$ref":"#/components/parameters/gradient"},{"$ref":"#/components/parameters/gradient_angle"},{"$ref":"#/components/parameters/dims"}],"responses":{"200":{"$ref":"#/components/responses/Image"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/ServerError"}},"summary":"Generate an image with a format and path caption","tags":["Images"],"x-example-url":"/400x300.jpg/red?bg_color=navy&text_color=white"}},"/{width}x{height}/{bg}/{text_c}":{"get":{"description":"Set background and text colors in the URL path. A valid gradient replaces the background.","operationId":"show_image_width_height_colors","parameters":[{"$ref":"#/components/parameters/bg"},{"$ref":"#/components/parameters/height"},{"$ref":"#/components/parameters/text_c"},{"$ref":"#/components/parameters/width"},{"$ref":"#/components/parameters/text"},{"$ref":"#/components/parameters/bg_color"},{"$ref":"#/components/parameters/text_color"},{"$ref":"#/components/parameters/gradient"},{"$ref":"#/components/parameters/gradient_angle"},{"$ref":"#/components/parameters/dims"}],"responses":{"200":{"$ref":"#/components/responses/PNGImage"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/ServerError"}},"summary":"Generate a rectangle with path colors","tags":["Images"],"x-example-url":"/400x300/tomato/white?text=Card"}},"/{width}x{height}/{first}":{"get":{"description":"Color-like path values select a background; other values set a caption. For unambiguous captions prefer the text query parameter.","operationId":"show_image_width_height_first","parameters":[{"$ref":"#/components/parameters/first"},{"$ref":"#/components/parameters/height"},{"$ref":"#/components/parameters/width"},{"$ref":"#/components/parameters/text"},{"$ref":"#/components/parameters/bg_color"},{"$ref":"#/components/parameters/text_color"},{"$ref":"#/components/parameters/gradient"},{"$ref":"#/components/parameters/gradient_angle"},{"$ref":"#/components/parameters/dims"}],"responses":{"200":{"$ref":"#/components/responses/PNGImage"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/ServerError"}},"summary":"Generate a rectangle with a path color or caption","tags":["Images"],"x-example-url":"/400x300/Hello%20World"}}},"security":[],"servers":[{"description":"Public service","url":"https://fpoimg.com"}],"tags":[{"description":"Generate placeholder images on demand.","name":"Images"}]}
