{"openapi":"3.0.3","info":{"title":"Gh-Optipix API","version":"v1","description":"Upload, optimize, and deliver images programmatically."},"servers":[{"url":"https:\/\/optipix.g-hyksos.com"}],"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"opt_live_\u2026 or opt_test_\u2026"}}},"paths":{"\/v1\/images":{"post":{"summary":"Upload and optimize an image","description":"Accepts a single image file, optimizes it in the background, and returns immediately with status \"pending\". Poll GET \/v1\/images\/{id} for completion, or configure a webhook to be notified.","security":[{"ApiKey":[]}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"image":{"type":"string","format":"binary","description":"The image file (JPEG, PNG, WebP, GIF, AVIF)."},"quality":{"type":"integer","format":null,"description":"10\u2013100. Default 80."},"convert_to":{"type":"string","format":null,"description":"jpg | png | webp | avif. Omit to keep the original format."},"folder":{"type":"string","format":null,"description":"Destination folder path."},"tags":{"type":"string","format":null,"description":"Comma-separated tags."}},"required":["image"]}}}},"responses":{"202":{"description":"Accepted \u2014 optimization queued."},"422":{"description":"Validation failed (unsupported type, file too large for your plan)."},"429":{"description":"Monthly optimization or storage limit reached."}}},"get":{"summary":"List images","description":"Paginated list of images for the authenticated team, most recent first.","security":[{"ApiKey":[]}],"responses":{"200":{"description":"A page of images."}}}},"\/v1\/images\/{id}":{"get":{"summary":"Get an image","description":"Fetch a single image by its UUID, including current status and, once completed, size savings.","security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Image UUID.","schema":{"type":"string"}}],"responses":{"200":{"description":"The image."},"404":{"description":"Not found, or not owned by your team."}}},"delete":{"summary":"Delete an image","description":"Permanently removes the image and every stored version.","security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Image UUID.","schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted."},"404":{"description":"Not found or not owned by your team."}}}},"\/v1\/images\/{id}\/download":{"get":{"summary":"Download the optimized file","description":"Streams the optimized binary. Only available once status is \"completed\".","security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Image UUID.","schema":{"type":"string"}}],"responses":{"200":{"description":"Binary image data."},"404":{"description":"Not found or not yet optimized."}}}},"\/cdn\/{params}\/{id}.{extension}":{"get":{"summary":"Fetch a delivery rendition","description":"Public, unauthenticated CDN endpoint. {params} is a comma-separated transformation string (w_800,q_auto,f_auto) or a named alias (t_product-thumb). Responses are cached with a one-year immutable header.","parameters":[{"name":"params","in":"path","required":true,"description":"e.g. w_800,h_600,c_fill,q_auto,f_auto \u2014 or t_{alias-slug}.","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Image UUID.","schema":{"type":"string"}},{"name":"extension","in":"path","required":true,"description":"Output extension, e.g. jpg.","schema":{"type":"string"}}],"responses":{"200":{"description":"The rendered image."},"400":{"description":"Invalid transformation parameters."},"404":{"description":"Image not found, or unknown alias."}}}}}}