{
  "openapi": "3.1.0",
  "info": {
    "title": "Kraken.io API Documentation",
    "version": "1.2.34",
    "description": "Comprehensive API documentation for Kraken.io including full input support for optimization, conversion, and storage operations via URL and file upload, along with user status retrieval."
  },
  "tags": [
    { "name": "URL Operations" },
    { "name": "File Upload Operations" },
    { "name": "User Status" }
  ],
  "paths": {
    "/v1/url": {
      "post": {
        "tags": ["URL Operations"],
        "summary": "URL-based image operations",
        "description": "Handles image optimization, conversion, and storage via URL with comprehensive input support.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/UrlRequest" },
              "examples": {
                "defaultExample": {
                  "summary": "Default Image Optimization",
                  "value": {
                    "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                    "url": "https://assets.kraken.io/assets/images/index-results/01-original.jpg",
                    "wait": true
                  }
                },
                "resizeExample": {
                  "summary": "Single Resize Adjustment",
                  "value": {
                    "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                    "url": "https://assets.kraken.io/assets/images/index-results/01-original.jpg",
                    "wait": true,
                    "resize": { "width": 800, "height": 600, "strategy": "crop" }
                  }
                },
                "multipleResizeExample": {
                  "summary": "Multiple Resize Configurations",
                  "value": {
                    "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                    "url": "https://assets.kraken.io/assets/images/index-results/01-original.jpg",
                    "wait": true,
                    "resize": [
                      { "id": "thumbnail", "width": 150, "height": 150, "strategy": "fit" },
                      { "id": "medium", "width": 600, "height": 400, "strategy": "auto" },
                      { "id": "large", "width": 1200, "height": 800, "strategy": "crop" }
                    ]
                  }
                },
                "convertExample": {
                  "summary": "Image Format Conversion to WebP",
                  "value": {
                    "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                    "url": "https://assets.kraken.io/assets/images/index-results/01-original.jpg",
                    "wait": true,
                    "convert": { "format": "webp" }
                  }
                },
                "callbackExample": {
                  "summary": "Asynchronous Processing with Callback",
                  "value": {
                    "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                    "url": "https://assets.kraken.io/assets/images/index-results/01-original.jpg",
                    "wait": false,
                    "callback_url": "https://your-server-address.any/callback"
                  }
                },
                "s3StoreExample": {
                  "summary": "Store Optimized Image in Amazon S3",
                  "value": {
                    "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                    "url": "https://assets.kraken.io/assets/images/index-results/01-original.jpg",
                    "wait": true,
                    "s3_store": {
                      "key": "YOUR_AWS_ACCESS_KEY",
                      "secret": "YOUR_AWS_SECRET_KEY",
                      "bucket": "your-bucket-name",
                      "region": "us-east-1",
                      "path": "optimized-images/"
                    }
                  }
                },
                "gcsStoreExample": {
                  "summary": "Store Optimized Image in Google Cloud Storage",
                  "value": {
                    "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                    "url": "https://assets.kraken.io/assets/images/index-results/01-original.jpg",
                    "wait": true,
                    "gcs_store": {
                      "acl": "private",
                      "bucket": "your-gcs-bucket-name",
                      "path": "optimized-images/",
                      "credentials": "YOUR_GCS_CREDENTIALS"
                    }
                  }
                },
                "rackspaceStoreExample": {
                  "summary": "Store Optimized Image in Rackspace Cloud Files",
                  "value": {
                    "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                    "url": "https://assets.kraken.io/assets/images/index-results/01-original.jpg",
                    "wait": true,
                    "cf_store": {
                      "user": "YOUR_RACKSPACE_USERNAME",
                      "key": "YOUR_RACKSPACE_API_KEY",
                      "container": "your-container-name",
                      "region": "DFW",
                      "path": "optimized-images/"
                    }
                  }
                },
                "azureStoreExample": {
                  "summary": "Store Optimized Image in Microsoft Azure Blob Storage",
                  "value": {
                    "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                    "url": "https://assets.kraken.io/assets/images/index-results/01-original.jpg",
                    "wait": true,
                    "azure_store": {
                      "account": "your-azure-account",
                      "key": "your-azure-key",
                      "container": "destination-container",
                      "headers": { "Cache-Control": "public, max-age=31536000" }
                    }
                  }
                },
                "softlayerStoreExample": {
                  "summary": "Store Optimized Image in SoftLayer Object Storage",
                  "value": {
                    "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                    "url": "https://assets.kraken.io/assets/images/index-results/01-original.jpg",
                    "wait": true,
                    "sl_store": {
                      "user": "YOUR_SOFTLAYER_USERNAME",
                      "key": "YOUR_SOFTLAYER_API_KEY",
                      "container": "your-container-name",
                      "region": "your-container-location"
                    }
                  }
                },
                "lossyOptimizationExample": {
                  "summary": "Lossy Image Optimization",
                  "value": {
                    "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                    "url": "https://assets.kraken.io/assets/images/index-results/01-original.png",
                    "wait": true,
                    "lossy": true
                  }
                },
                "losslessOptimizationExample": {
                  "summary": "Lossless Image Optimization",
                  "value": {
                    "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                    "url": "https://assets.kraken.io/assets/images/index-results/01-original.png",
                    "wait": true,
                    "lossy": false
                  }
                },
                "autoOrientExample": {
                  "summary": "Auto-Orient Image Adjustment",
                  "value": {
                    "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                    "url": "https://assets.kraken.io/assets/images/index-results/01-rotated.jpg",
                    "wait": true,
                    "auto_orient": true,
                    "preserve_meta": ["orientation"]
                  }
                },
                "chromaSubsamplingExample": {
                  "summary": "Chroma Subsampling Optimization",
                  "value": {
                    "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                    "url": "https://assets.kraken.io/assets/images/index-results/01-original.jpg",
                    "wait": true,
                    "chroma_subsampling": "4:2:0"
                  }
                },
                "customQualityExample": {
                  "summary": "Custom Image Quality Setting",
                  "value": {
                    "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                    "url": "https://assets.kraken.io/assets/images/index-results/01-original.jpg",
                    "wait": true,
                    "quality": 85
                  }
                },
                "sandboxModeExample": {
                  "summary": "Sandbox Mode for Development Testing",
                  "value": {
                    "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                    "url": "https://assets.kraken.io/assets/images/index-results/01-original.jpg",
                    "wait": true,
                    "dev": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation completed successfully.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/OperationResponse" }
              }
            }
          }
        }
      }
    },
    "/v1/upload": {
      "post": {
        "summary": "Upload file + JSON data (with oneOf)",
        "tags": ["File Upload Operations"],
        "description": "Endpoint to upload a file and additional JSON data in a single multipart/form-data request.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": { "$ref": "#/components/schemas/FileRequest" },
              "examples": {
                "basicExample": {
                  "summary": "Basic Image Optimization",
                  "value": {
                    "file": "<<BINARY_FILE>>",
                    "data": {
                      "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET"  },
                      "wait": true
                    }
                  }
                },
                "resizeExample": {
                  "summary": "Single Resize Adjustment",
                  "value": {
                    "file": "<<BINARY_FILE>>",
                    "data": {
                      "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                      "resize": { "width": 800, "height": 600, "strategy": "crop" },
                      "wait": true
                    }
                  }
                },
                "multipleResizeExample": {
                  "summary": "Multiple Resize Configurations",
                  "value": {
                    "file": "<<BINARY_FILE>>",
                    "data": {
                      "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                      "wait": true,
                      "resize": [
                        { "id": "thumbnail", "width": 150, "height": 150, "strategy": "fit" },
                        { "id": "medium", "width": 600, "height": 400, "strategy": "auto" },
                        { "id": "large", "width": 1200, "height": 800, "strategy": "crop" }
                      ]
                    }
                  }
                },
                "convertExample": {
                  "summary": "Image Format Conversion to WebP",
                  "value": {
                    "file": "<<BINARY_FILE>>",
                    "data": {
                      "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                      "convert": { "format": "webp" },
                      "wait": true
                    }
                  }
                },
                "callbackExample": {
                  "summary": "Asynchronous Processing with Callback",
                  "value": {
                    "file": "<<BINARY_FILE>>",
                    "data": {
                      "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                      "wait": false,
                      "callback_url": "https://your-server-address.any/callback"
                    }
                  }
                },
                "s3StoreExample": {
                  "summary": "Store Optimized Image in Amazon S3",
                  "value": {
                    "file": "<<BINARY_FILE>>",
                    "data": {
                      "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                      "wait": true,
                      "s3_store": {
                        "key": "YOUR_AWS_ACCESS_KEY",
                        "secret": "YOUR_AWS_SECRET_KEY",
                        "bucket": "your-bucket-name",
                        "region": "us-east-1",
                        "path": "optimized-images/"
                      }
                    }
                  }
                },
                "gcsStoreExample": {
                  "summary": "Store Optimized Image in Google Cloud Storage",
                  "value": {
                    "file": "<<BINARY_FILE>>",
                    "data": {
                      "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                      "wait": true,
                      "gcs_store": {
                        "acl": "private",
                        "bucket": "your-gcs-bucket-name",
                        "path": "optimized-images/",
                        "credentials": "YOUR_GCS_CREDENTIALS"
                      }
                    }
                  }
                },
                "rackspaceStoreExample": {
                  "summary": "Store Optimized Image in Rackspace Cloud Files",
                  "value": {
                    "file": "<<BINARY_FILE>>",
                    "data": {
                      "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                      "wait": true,
                      "cf_store": {
                        "user": "YOUR_RACKSPACE_USERNAME",
                        "key": "YOUR_RACKSPACE_API_KEY",
                        "container": "your-container-name",
                        "region": "DFW",
                        "path": "optimized-images/"
                      }
                    }
                  }
                },
                "azureStoreExample": {
                  "summary": "Store Optimized Image in Microsoft Azure Blob Storage",
                  "value": {
                    "file": "<<BINARY_FILE>>",
                    "data": {
                      "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                      "wait": true,
                      "azure_store": {
                        "account": "your-azure-account",
                        "key": "your-azure-key",
                        "container": "destination-container",
                        "headers": { "Cache-Control": "public, max-age=31536000" }
                      }
                    }
                  }
                },
                "softlayerStoreExample": {
                  "summary": "Store Optimized Image in SoftLayer Object Storage",
                  "value": {
                    "file": "<<BINARY_FILE>>",
                    "data": {
                      "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                      "wait": true,
                      "sl_store": {
                        "user": "YOUR_SOFTLAYER_USERNAME",
                        "key": "YOUR_SOFTLAYER_API_KEY",
                        "container": "your-container-name",
                        "region": "your-container-location"
                      }
                    }
                  }
                },
                "lossyOptimizationExample": {
                  "summary": "Lossy Image Optimization",
                  "value": {
                    "file": "<<BINARY_FILE>>",
                    "data": {
                      "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                      "wait": true,
                      "lossy": true
                    }
                  }
                },
                "losslessOptimizationExample": {
                  "summary": "Lossless Image Optimization",
                  "value": {
                    "file": "<<BINARY_FILE>>",
                    "data": {
                      "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                      "wait": true,
                      "lossy": false
                    }
                  }
                },
                "autoOrientExample": {
                  "summary": "Auto-Orient Image Adjustment",
                  "value": {
                    "file": "<<BINARY_FILE>>",
                    "data": {
                      "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                      "wait": true,
                      "auto_orient": true,
                      "preserve_meta": ["orientation"]
                    }
                  }
                },
                "chromaSubsamplingExample": {
                  "summary": "Chroma Subsampling Optimization",
                  "value": {
                    "file": "<<BINARY_FILE>>",
                    "data": {
                      "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                      "wait": true,
                      "chroma_subsampling": "4:2:0"
                    }
                  }
                },
                "customQualityExample": {
                  "summary": "Custom Image Quality Setting",
                  "value": {
                    "file": "<<BINARY_FILE>>",
                    "data": {
                      "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                      "wait": true,
                      "quality": 85
                    }
                  }
                },
                "sandboxModeExample": {
                  "summary": "Sandbox Mode for Development Testing",
                  "value": {
                    "file": "<<BINARY_FILE>>",
                    "data": {
                      "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                      "wait": true,
                      "dev": true
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Upload processed successfully",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/UploadResponse" }
              }
            }
          }
        }
      }
    },
    "/user_status": {
      "post": {
        "tags": ["User Status"],
        "summary": "Retrieve user status",
        "description": "Fetches the current user status, including plan information and quota details.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/UserStatusResponse" },
              "examples": {
                "defaultExample": {
                  "summary": "Default user status request",
                  "value": {
                    "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User status successfully retrieved.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/UserStatusResponse" }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "UrlRequest": {
        "type": "object",
        "required": ["auth", "url"],
        "properties": {
          "auth": { "$ref": "#/components/schemas/Auth" },
          "url": {
            "type": "string",
            "description": "Image URL."
          },
          "wait": {
            "type": "boolean",
            "default": true
          },
          "dev": {
            "type": "boolean",
            "default": false,
            "description": "Enable sandbox mode for development testing (returns randomized results)"
          },
          "resize": {
            "$ref": "#/components/schemas/Resize"
          },
          "convert": {
            "$ref": "#/components/schemas/Convert"
          },
          "quality": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "description": "Custom quality level for JPG, PNG, and GIF (1-100)"
          },
          "callback_url": {
            "type": "string",
            "nullable": true,
            "default": null,
            "description": "URL for asynchronous callback notification"
          },
          "s3_store": {
            "type": "object",
            "properties": {
              "key": { "type": "string" },
              "secret": { "type": "string" },
              "bucket": { "type": "string" },
              "region": { "type": "string" },
              "path": { "type": "string" }
            },
            "description": "Store optimized image in Amazon S3"
          },
          "gcs_store": {
            "type": "object",
            "properties": {
              "acl": { "type": "string" },
              "bucket": { "type": "string" },
              "path": { "type": "string" },
              "credentials": { "type": "string" }
            },
            "description": "Store optimized image in Google Cloud Storage"
          },
          "cf_store": {
            "type": "object",
            "properties": {
              "username": { "type": "string" },
              "api_key": { "type": "string" },
              "container": { "type": "string" },
              "region": { "type": "string" },
              "path": { "type": "string" }
            },
            "description": "Store optimized image in Rackspace Cloud Files"
          },
          "azure_store": {
            "type": "object",
            "properties": {
              "account": { "type": "string" },
              "key": { "type": "string" },
              "container": { "type": "string" },
              "headers": {
                "type": "object",
                "additionalProperties": { "type": "string" }
              }
            },
            "description": "Store optimized image in Microsoft Azure Blob Storage"
          },
          "sl_store": {
            "type": "object",
            "properties": {
              "user": { "type": "string" },
              "key": { "type": "string" },
              "container": { "type": "string" },
              "region": { "type": "string" }
            },
            "description": "Store optimized image in SoftLayer Object Storage"
          },
          "lossy": {
            "type": "boolean",
            "default": false,
            "description": "Enable lossy compression for better optimization (defaults to false for lossless)"
          },
          "preserve_meta": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["profile", "date", "copyright", "geotag", "orientation"]
            },
            "description": "Preserve specific metadata (EXIF, XMP, IPTC, etc.) in the optimized image"
          },
          "auto_orient": {
            "type": "boolean",
            "default": false,
            "description": "Automatically orient the image based on EXIF orientation data"
          },
          "chroma_subsampling": {
            "type": "string",
            "enum": ["4:2:0", "4:2:2", "4:4:4"],
            "description": "Specify chroma subsampling for JPEG images"
          }
        }
      },
      "FileRequest": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "description": "The file to be uploaded."
          },
          "data": {
            "description": "JSON object for additional parameters (auth, wait, resize, convert, etc.)",
            "anyOf": [
              {
                "$ref": "#/components/schemas/DataBasic"
              },
              {
                "$ref": "#/components/schemas/DataResize"
              },
              {
                "$ref": "#/components/schemas/DataConvert"
              }
            ]
          }
        },
        "required": ["file", "data"]
      },
      "DataBasic": {
        "type": "object",
        "properties": {
          "auth": {
            "$ref": "#/components/schemas/Auth"
          },
          "wait": {
            "type": "boolean",
            "default": true
          }
        },
        "examples": {
          "basicExample": {
            "summary": "Basic Image Optimization",
            "value": {
              "file": "<<BINARY_FILE>>",
              "data": {
                "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                "wait": true
              }
            }
          },
          "resizeExample": {
            "summary": "Single Resize Adjustment",
            "value": {
              "file": "<<BINARY_FILE>>",
              "data": {
                "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                "resize": { "width": 800, "height": 600, "strategy": "crop" }
              }
            }
          },
          "multipleResizeExample": {
            "summary": "Multiple Resize Configurations",
            "value": {
              "file": "<<BINARY_FILE>>",
              "data": {
                "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                "wait": true,
                "resize": [
                  { "id": "thumbnail", "width": 150, "height": 150, "strategy": "fit" },
                  { "id": "medium", "width": 600, "height": 400, "strategy": "auto" },
                  { "id": "large", "width": 1200, "height": 800, "strategy": "crop" }
                ]
              }
            }
          },
          "convertExample": {
            "summary": "Image Format Conversion to WebP",
            "value": {
              "file": "<<BINARY_FILE>>",
              "data": {
                "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                "convert": { "format": "webp" }
              }
            }
          },
          "callbackExample": {
            "summary": "Asynchronous Processing with Callback",
            "value": {
              "file": "<<BINARY_FILE>>",
              "data": {
                "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                "wait": false,
                "callback_url": "https://your-server-address.any/callback"
              }
            }
          },
          "s3StoreExample": {
            "summary": "Store Optimized Image in Amazon S3",
            "value": {
              "file": "<<BINARY_FILE>>",
              "data": {
                "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                "wait": true,
                "s3_store": {
                  "key": "YOUR_AWS_ACCESS_KEY",
                  "secret": "YOUR_AWS_SECRET_KEY",
                  "bucket": "your-bucket-name",
                  "region": "us-east-1",
                  "path": "optimized-images/"
                }
              }
            }
          },
          "gcsStoreExample": {
            "summary": "Store Optimized Image in Google Cloud Storage",
            "value": {
              "file": "<<BINARY_FILE>>",
              "data": {
                "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                "wait": true,
                "gcs_store": {
                  "acl": "private",
                  "bucket": "your-gcs-bucket-name",
                  "path": "optimized-images/",
                  "credentials": "YOUR_GCS_CREDENTIALS"
                }
              }
            }
          },
          "rackspaceStoreExample": {
            "summary": "Store Optimized Image in Rackspace Cloud Files",
            "value": {
              "file": "<<BINARY_FILE>>",
              "data": {
                "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                "wait": true,
                "cf_store": {
                  "user": "YOUR_RACKSPACE_USERNAME",
                  "key": "YOUR_RACKSPACE_API_KEY",
                  "container": "your-container-name",
                  "region": "DFW",
                  "path": "optimized-images/"
                }
              }
            }
          },
          "azureStoreExample": {
            "summary": "Store Optimized Image in Microsoft Azure Blob Storage",
            "value": {
              "file": "<<BINARY_FILE>>",
              "data": {
                "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                "wait": true,
                "azure_store": {
                  "account": "your-azure-account",
                  "key": "your-azure-key",
                  "container": "destination-container",
                  "headers": { "Cache-Control": "public, max-age=31536000" }
                }
              }
            }
          },
          "softlayerStoreExample": {
            "summary": "Store Optimized Image in SoftLayer Object Storage",
            "value": {
              "file": "<<BINARY_FILE>>",
              "data": {
                "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                "wait": true,
                "sl_store": {
                  "user": "YOUR_SOFTLAYER_USERNAME",
                  "key": "YOUR_SOFTLAYER_API_KEY",
                  "container": "your-container-name",
                  "region": "your-container-location"
                }
              }
            }
          },
          "lossyOptimizationExample": {
            "summary": "Lossy Image Optimization",
            "value": {
              "file": "<<BINARY_FILE>>",
              "data": {
                "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                "wait": true,
                "lossy": true
              }
            }
          },
          "losslessOptimizationExample": {
            "summary": "Lossless Image Optimization",
            "value": {
              "file": "<<BINARY_FILE>>",
              "data": {
                "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                "wait": true,
                "lossy": false
              }
            }
          },
          "autoOrientExample": {
            "summary": "Auto-Orient Image Adjustment",
            "value": {
              "file": "<<BINARY_FILE>>",
              "data": {
                "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                "wait": true,
                "auto_orient": true,
                "preserve_meta": ["orientation"]
              }
            }
          },
          "chromaSubsamplingExample": {
            "summary": "Chroma Subsampling Optimization",
            "value": {
              "file": "<<BINARY_FILE>>",
              "data": {
                "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                "wait": true,
                "chroma_subsampling": "4:2:0"
              }
            }
          },
          "customQualityExample": {
            "summary": "Custom Image Quality Setting",
            "value": {
              "file": "<<BINARY_FILE>>",
              "data": {
                "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                "wait": true,
                "quality": 85
              }
            }
          },
          "imageConversionExample": {
            "summary": "Image Type Conversion to WebP",
            "value": {
              "file": "<<BINARY_FILE>>",
              "data": {
                "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                "wait": true,
                "convert": { "format": "webp", "background": "#FFFFFF" }
              }
            }
          },
          "sandboxModeExample": {
            "summary": "Sandbox Mode for Development Testing",
            "value": {
              "file": "<<BINARY_FILE>>",
              "data": {
                "auth": { "api_key": "API_KEY", "api_secret": "API_SECRET" },
                "wait": true,
                "dev": true
              }
            }
          }
        }
      },
      "DataResize": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DataBasic"
          },
          {
            "type": "object",
            "required": ["resize"],
            "properties": {
              "resize": {
                "$ref": "#/components/schemas/Resize"
              }
            }
          }
        ]
      },
      "DataConvert": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DataBasic"
          },
          {
            "type": "object",
            "required": ["convert"],
            "properties": {
              "convert": {
                "$ref": "#/components/schemas/Convert"
              }
            }
          }
        ]
      },
      "Auth": {
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string"
          },
          "api_secret": {
            "type": "string"
          }
        },
        "required": ["api_key", "api_secret"]
      },
      "Resize": {
        "type": "object",
        "properties": {
          "width": { "type": "integer" },
          "height": { "type": "integer" },
          "strategy": {
            "type": "string",
            "enum": ["exact", "crop", "portrait", "landscape", "auto", "fit"]
          }
        }
      },
      "Convert": {
        "type": "object",
        "properties": {
          "format": {
            "type": "string",
            "enum": ["jpeg", "png", "gif", "webp", "avif"]
          },
          "background": {
            "type": "string",
            "nullable": true,
            "description": "Background color for transparent formats (HEX, RGB, RGBA)"
          },
          "keep_extension": {
            "type": "boolean",
            "default": false,
            "description": "Keep original file extension despite format conversion"
          }
        }
      },
      "UploadResponse": {
        "type": "object",
        "properties": {
          "success": { "type": "boolean" },
          "kraked_url": { "type": "string" },
          "file_name": { "type": "string" },
          "original_size": { "type": "integer" },
          "kraked_size": { "type": "integer" },
          "saved_bytes": { "type": "integer" }
        }
      },
      "OperationResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "kraked_url": {
            "type": "string"
          },
          "file_name": {
            "type": "string"
          },
          "original_size": {
            "type": "integer"
          },
          "kraked_size": {
            "type": "integer"
          },
          "saved_bytes": {
            "type": "integer"
          }
        }
      },
      "UserStatusRequest": {
        "type": "object",
        "required": ["auth"],
        "properties": {
          "auth": { "$ref": "#/components/schemas/Auth" }
        }
      },
      "UserStatusResponse": {
        "type": "object",
        "properties": {
          "success": { "type": "boolean" },
          "active": { "type": "boolean" },
          "plan_name": { "type": "string" },
          "quota_total": { "type": "integer" },
          "quota_used": { "type": "integer" },
          "quota_remaining": { "type": "integer" }
        }
      }
    }
  }
}
