{"openapi":"3.1.0","info":{"title":"Imagerry API & CLI Microservice","version":"1.0.0","description":"Official OpenAPI 3.1 specification for the Imagerry REST API microservice (`imagerry serve`) and local image processing engine. Enables AI agents, automation pipelines, and backend microservices to style, convert, resize, crop, and transform images locally with zero server uploads.","contact":{"name":"Imagerry Support","email":"support@imagerry.com","url":"https://imagerry.com/cli/docs"},"license":{"name":"Proprietary / Free Starter Tier","url":"https://imagerry.com/pro"}},"servers":[{"url":"http://127.0.0.1:4322","description":"Local self-hosted Imagerry microservice (`imagerry serve`)"},{"url":"https://imagerry.com","description":"Imagerry Canonical Production Site"}],"paths":{"/presets":{"get":{"summary":"List Available Presets","description":"Returns all available named styling presets supported by the Imagerry engine.","operationId":"listPresets","responses":{"200":{"description":"List of presets successfully retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"presets":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"mesh"},"description":{"type":"string","example":"Vibrant mesh gradient background (indigo / blue / emerald)"}},"required":["name","description"]}}},"required":["presets"]}}}}}}},"/template":{"get":{"summary":"Get Default Preset Template","description":"Returns the complete default JSON preset structure and parameters for custom image styling.","operationId":"getTemplate","responses":{"200":{"description":"Full preset template object","content":{"application/json":{"schema":{"type":"object","properties":{"padding":{"type":"integer","example":64},"rounded":{"type":"integer","example":16},"shadow":{"type":"integer","example":35},"inset":{"type":"integer","example":0},"bgType":{"type":"string","enum":["solid","gradient","mesh","transparent","custom"],"example":"mesh"},"aspectRatio":{"type":"string","example":"16:9"},"exportFormat":{"type":"string","enum":["png","jpeg","webp","avif"],"example":"png"}}}}}}}}},"/process":{"post":{"summary":"Process & Style Image","description":"Applies custom styling, resizing, padding, gradients, or aspect ratios to an uploaded image payload and returns the processed image.","operationId":"processImage","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"Input image file (PNG, JPEG, WebP, AVIF)"},"preset":{"type":"string","description":"Preset name (e.g. 'mesh', 'gradient') or raw JSON configuration string","example":"mesh"},"format":{"type":"string","enum":["png","jpeg","webp","avif"],"default":"png"},"licenseKey":{"type":"string","description":"Optional Imagerry Pro license key for unlimited automated execution"}},"required":["file"]}}}},"responses":{"200":{"description":"Processed image binary stream","content":{"image/png":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid preset configuration or unsupported file payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Pro license required for unlimited batch processing or exceeding daily rate limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","example":"Invalid preset configuration"},"message":{"type":"string","example":"The preset property 'bgType' must be one of: solid, gradient, mesh, transparent"}},"required":["error"]}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-license-key","description":"Imagerry Pro license key for API authentication"}}}}