{
  "openapi": "3.0.3",
  "security": [],
  "info": {
    "title": "Pixhost API",
    "version": "2.0.0",
    "description": "Upload images and covers, create galleries, check image-page availability, and manage resources created with an opt-in management URL. Pixhost does not require an API key. The `show_url` returned by upload operations is the canonical public link clients should share. The `th_url` is a direct thumbnail URL for previews and embeds. Direct original-image URLs are intentionally not part of this API contract. HTTPS connections can negotiate HTTP/1.1, HTTP/2, or HTTP/3; clients must use the numeric response status rather than compare a literal protocol status line.",
    "contact": {
      "email": "pixhost.to@gmail.com"
    }
  },
  "externalDocs": {
    "description": "Pixhost API documentation",
    "url": "https://pixhost.cc/api/index.html"
  },
  "servers": [
    {
      "url": "https://api.pixhost.cc",
      "description": "Pixhost.cc API"
    },
    {
      "url": "https://api.pixhost.to",
      "description": "Pixhost.to API"
    },
    {
      "url": "https://api.pixho.st",
      "description": "Pixho.st API"
    }
  ],
  "tags": [
    {
      "name": "Images",
      "description": "Upload images and check public image-page availability."
    },
    {
      "name": "Covers",
      "description": "Upload a cover made from one or two images."
    },
    {
      "name": "Galleries",
      "description": "Create and finalize multi-image galleries."
    },
    {
      "name": "Management",
      "description": "Rename or delete resources using an opt-in private management token."
    }
  ],
  "paths": {
    "/images": {
      "post": {
        "tags": [
          "Images"
        ],
        "summary": "Upload an image",
        "description": "Uploads one JPEG, PNG, GIF, WebP, or AVIF image. Share the `show_url` from the response. Do not set the multipart `Content-Type` header manually; the client must supply its boundary.",
        "operationId": "uploadImage",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "img",
                  "content_type"
                ],
                "properties": {
                  "img": {
                    "type": "string",
                    "format": "binary",
                    "description": "Image file. The configured production limit is currently 10 MB."
                  },
                  "content_type": {
                    "$ref": "#/components/schemas/ContentTypeFlag"
                  },
                  "max_th_size": {
                    "$ref": "#/components/schemas/ThumbnailSize"
                  },
                  "optimize_for_web": {
                    "$ref": "#/components/schemas/OptimizeForWebFlag"
                  },
                  "gallery_hash": {
                    "type": "string",
                    "description": "Public gallery identifier. Supply together with `gallery_upload_hash` to add the image to an unfinished gallery."
                  },
                  "gallery_upload_hash": {
                    "type": "string",
                    "description": "Private gallery upload token. Supply together with `gallery_hash`.",
                    "x-sensitive": true
                  },
                  "include_manage_url": {
                    "$ref": "#/components/schemas/IncludeManageUrlFlag"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Image uploaded successfully.",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "413": {
            "$ref": "#/components/responses/UploadTooLarge"
          },
          "414": {
            "$ref": "#/components/responses/UnsupportedImageFormat"
          },
          "415": {
            "$ref": "#/components/responses/GalleryNotFound"
          },
          "416": {
            "$ref": "#/components/responses/GalleryUploadTokenInvalid"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/images/status": {
      "post": {
        "tags": [
          "Images"
        ],
        "summary": "Check image-page availability",
        "description": "Checks public Pixhost show URLs against the application database. Results preserve input order and duplicates. This endpoint does not fetch image files or CDN nodes.",
        "operationId": "checkImageStatus",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status result for every submitted URL.",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageStatusResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/JsonBadRequest"
          },
          "405": {
            "description": "This endpoint only accepts POST requests.",
            "headers": {
              "Allow": {
                "description": "Allowed request method.",
                "schema": {
                  "type": "string",
                  "example": "POST"
                }
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "The JSON request body exceeds 64 KiB.",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type is not `application/json`.",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "The `urls` field is invalid or exceeds its limits.",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry according to `Retry-After`.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/JsonInternalError"
          }
        }
      }
    },
    "/covers": {
      "post": {
        "tags": [
          "Covers"
        ],
        "summary": "Upload a cover",
        "description": "Uploads a cover composed from a required left image and an optional right image. Share the `show_url` from the response. Do not set the multipart `Content-Type` header manually; the client must supply its boundary.",
        "operationId": "uploadCover",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "img_left",
                  "content_type"
                ],
                "properties": {
                  "img_left": {
                    "type": "string",
                    "format": "binary",
                    "description": "Left image file."
                  },
                  "img_right": {
                    "type": "string",
                    "format": "binary",
                    "description": "Optional right image file."
                  },
                  "content_type": {
                    "$ref": "#/components/schemas/ContentTypeFlag"
                  },
                  "optimize_for_web": {
                    "$ref": "#/components/schemas/OptimizeForWebFlag"
                  },
                  "gallery_hash": {
                    "type": "string",
                    "description": "Public gallery identifier. Supply together with `gallery_upload_hash` to add the cover to an unfinished gallery."
                  },
                  "gallery_upload_hash": {
                    "type": "string",
                    "description": "Private gallery upload token. Supply together with `gallery_hash`.",
                    "x-sensitive": true
                  },
                  "include_manage_url": {
                    "$ref": "#/components/schemas/IncludeManageUrlFlag"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cover uploaded successfully.",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "413": {
            "$ref": "#/components/responses/UploadTooLarge"
          },
          "414": {
            "$ref": "#/components/responses/UnsupportedImageFormat"
          },
          "415": {
            "$ref": "#/components/responses/GalleryNotFound"
          },
          "416": {
            "$ref": "#/components/responses/GalleryUploadTokenInvalid"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/galleries": {
      "post": {
        "tags": [
          "Galleries"
        ],
        "summary": "Create a gallery",
        "description": "Creates an unfinished gallery. Upload images using the returned `gallery_hash` and private `gallery_upload_hash`, then call the finalize operation. Keep private tokens out of chat messages, logs, and final answers.",
        "operationId": "createGallery",
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "gallery_name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Gallery name. A missing or empty value creates an untitled gallery."
                  },
                  "include_manage_url": {
                    "$ref": "#/components/schemas/IncludeManageUrlFlag"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gallery created successfully.",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GalleryCreateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/JsonBadRequest"
          },
          "422": {
            "$ref": "#/components/responses/JsonUnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/JsonInternalError"
          }
        }
      }
    },
    "/galleries/{gallery_hash}/finalize": {
      "post": {
        "tags": [
          "Galleries"
        ],
        "summary": "Finalize a gallery",
        "description": "Makes a non-empty gallery public after its uploads finish. Empty galleries are removed. The successful response body is empty.",
        "operationId": "finalizeGallery",
        "parameters": [
          {
            "$ref": "#/components/parameters/GalleryHash"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "gallery_upload_hash"
                ],
                "properties": {
                  "gallery_upload_hash": {
                    "type": "string",
                    "description": "Private upload token returned when the gallery was created.",
                    "x-sensitive": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gallery finalized successfully. The response body is empty.",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "415": {
            "$ref": "#/components/responses/GalleryNotFound"
          },
          "416": {
            "$ref": "#/components/responses/GalleryUploadTokenInvalid"
          },
          "417": {
            "description": "The gallery could not be finalized.",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/management/{token}/rename": {
      "post": {
        "tags": [
          "Management"
        ],
        "summary": "Rename a managed gallery",
        "description": "Renames a gallery created with `include_manage_url=1`. Image management tokens do not support rename. Treat the path token as a bearer credential.",
        "operationId": "renameManagedGallery",
        "parameters": [
          {
            "$ref": "#/components/parameters/ManagementToken"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/GalleryRenameRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GalleryRenameRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gallery renamed successfully.",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GalleryRenameResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/JsonBadRequest"
          },
          "404": {
            "$ref": "#/components/responses/ManagementNotFound"
          },
          "410": {
            "$ref": "#/components/responses/ManagementGone"
          },
          "422": {
            "$ref": "#/components/responses/JsonUnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/JsonInternalError"
          }
        }
      }
    },
    "/management/{token}/delete": {
      "post": {
        "tags": [
          "Management"
        ],
        "summary": "Delete a managed image or gallery",
        "description": "Deletes a standalone image or a gallery and all its images. The management token is revoked after a successful deletion. This operation is destructive and cannot be undone through the API.",
        "operationId": "deleteManagedResource",
        "parameters": [
          {
            "$ref": "#/components/parameters/ManagementToken"
          }
        ],
        "responses": {
          "200": {
            "description": "Resource deleted and management token revoked.",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/JsonBadRequest"
          },
          "404": {
            "$ref": "#/components/responses/ManagementNotFound"
          },
          "410": {
            "$ref": "#/components/responses/ManagementGone"
          },
          "500": {
            "$ref": "#/components/responses/JsonInternalError"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "GalleryHash": {
        "name": "gallery_hash",
        "in": "path",
        "required": true,
        "description": "Public gallery identifier returned by the create-gallery operation.",
        "schema": {
          "type": "string"
        }
      },
      "ManagementToken": {
        "name": "token",
        "in": "path",
        "required": true,
        "description": "Private 43-character management token. This is a bearer credential and must not be logged or shared.",
        "schema": {
          "type": "string",
          "minLength": 43,
          "maxLength": 43,
          "pattern": "^[A-Za-z0-9_-]{43}$"
        },
        "x-sensitive": true
      }
    },
    "headers": {
      "RequestId": {
        "description": "Request identifier useful when reporting an API failure.",
        "schema": {
          "type": "string"
        }
      },
      "RetryAfter": {
        "description": "Seconds to wait before retrying.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "schemas": {
      "ContentTypeFlag": {
        "type": "integer",
        "enum": [
          0,
          1
        ],
        "description": "Content classification: `0` for safe-for-work content and `1` for NSFW content."
      },
      "ThumbnailSize": {
        "type": "integer",
        "minimum": 150,
        "maximum": 500,
        "default": 200,
        "description": "Maximum thumbnail width or height in pixels."
      },
      "OptimizeForWebFlag": {
        "type": "integer",
        "enum": [
          0,
          1
        ],
        "default": 0,
        "description": "Set to `1` to optimize a static image for web delivery. Optimization can remove private metadata, apply orientation, resize the longest edge to 3840 pixels, and select a smaller storage format. JPEG and PNG use a WebP quality setting of 90 when a WebP candidate is evaluated. Every GIF remains GIF, including a static GIF; animated PNG, WebP, and AVIF uploads also remain unchanged. Optimization is optional, so an internal optimizer failure can fall back to the original upload without an `optimization` response field."
      },
      "IncludeManageUrlFlag": {
        "type": "integer",
        "enum": [
          0,
          1
        ],
        "default": 0,
        "description": "Set to `1` to return a private management URL for a standalone image or newly created gallery. Keep the returned URL secret."
      },
      "UploadResponse": {
        "type": "object",
        "required": [
          "name",
          "show_url",
          "th_url",
          "thumb_width",
          "thumb_height"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Normalized stored filename without Pixhost's generated numeric prefix. Its extension can change when web optimization converts the upload."
          },
          "show_url": {
            "type": "string",
            "format": "uri",
            "description": "Canonical public Pixhost image-page URL. This is the link clients should share.",
            "example": "https://pixhost.cc/show/8582/563_image.jpg"
          },
          "th_url": {
            "type": "string",
            "format": "uri",
            "description": "Direct thumbnail URL for previews and embeds.",
            "example": "https://t1.pixhost.cc/thumbs/8582/563_image.jpg"
          },
          "thumb_width": {
            "type": "integer",
            "minimum": 1,
            "description": "Actual thumbnail width in pixels.",
            "example": 420
          },
          "thumb_height": {
            "type": "integer",
            "minimum": 1,
            "description": "Actual thumbnail height in pixels.",
            "example": 280
          },
          "manage_url": {
            "type": "string",
            "format": "uri",
            "description": "Optional private edit/delete URL returned only when `include_manage_url=1`. Possession authorizes management actions; never share it as the public result.",
            "x-sensitive": true
          },
          "optimization": {
            "$ref": "#/components/schemas/OptimizationResult"
          }
        },
        "additionalProperties": false
      },
      "OptimizationResult": {
        "type": "object",
        "description": "Result of an opt-in web-optimization attempt. Every GIF returns `gif_not_optimized`; animated PNG, WebP, and AVIF uploads return `animated`. This object can be omitted if the optional optimizer fails and the upload falls back to the original image.",
        "required": [
          "requested",
          "applied",
          "converted",
          "reason",
          "source_mime",
          "stored_mime",
          "source_bytes",
          "stored_bytes"
        ],
        "properties": {
          "requested": {
            "type": "boolean",
            "example": true
          },
          "applied": {
            "type": "boolean"
          },
          "converted": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "enum": [
              "animated",
              "gif_not_optimized",
              "metadata_only",
              "kept_avif",
              "reencoded_webp",
              "converted_to_webp",
              "webp_not_smaller"
            ]
          },
          "source_mime": {
            "type": "string",
            "example": "image/jpeg"
          },
          "stored_mime": {
            "type": "string",
            "example": "image/webp"
          },
          "source_bytes": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "stored_bytes": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "source_width": {
            "type": "integer",
            "minimum": 1
          },
          "source_height": {
            "type": "integer",
            "minimum": 1
          },
          "stored_width": {
            "type": "integer",
            "minimum": 1
          },
          "stored_height": {
            "type": "integer",
            "minimum": 1
          },
          "original_candidate_bytes": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "webp_candidate_bytes": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "ImageStatusRequest": {
        "type": "object",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "description": "Public Pixhost show URLs. Each string is limited to 512 bytes by the API.",
            "items": {
              "type": "string",
              "maxLength": 512
            }
          }
        },
        "additionalProperties": true
      },
      "ImageStatusResponse": {
        "type": "object",
        "required": [
          "results"
        ],
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImageStatusResult"
            }
          }
        },
        "additionalProperties": false
      },
      "ImageStatusResult": {
        "type": "object",
        "required": [
          "url",
          "status"
        ],
        "properties": {
          "url": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "available",
              "deleted",
              "not_found",
              "pending",
              "invalid"
            ]
          }
        },
        "additionalProperties": false
      },
      "GalleryCreateResponse": {
        "type": "object",
        "required": [
          "gallery_name",
          "gallery_hash",
          "gallery_url",
          "gallery_upload_hash"
        ],
        "properties": {
          "gallery_name": {
            "type": "string"
          },
          "gallery_hash": {
            "type": "string",
            "description": "Public gallery identifier."
          },
          "gallery_url": {
            "type": "string",
            "format": "uri",
            "description": "Canonical public gallery URL."
          },
          "gallery_upload_hash": {
            "type": "string",
            "description": "Private upload token valid for approximately 24 hours.",
            "x-sensitive": true
          },
          "manage_url": {
            "type": "string",
            "format": "uri",
            "description": "Optional private management URL returned only when `include_manage_url=1`.",
            "x-sensitive": true
          }
        },
        "additionalProperties": false
      },
      "GalleryRenameRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "description": "New gallery name. Leading and trailing whitespace is removed and repeated Unicode spaces are collapsed. Control/format characters, line separators, angle brackets, and four-byte characters such as emoji are rejected. An empty value is stored as an empty string and displayed publicly with the translated untitled-gallery label."
          }
        },
        "additionalProperties": true
      },
      "GalleryRenameResponse": {
        "type": "object",
        "required": [
          "success",
          "resource_type",
          "gallery_name",
          "gallery_url"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "resource_type": {
            "type": "string",
            "enum": [
              "gallery"
            ]
          },
          "gallery_name": {
            "type": "string"
          },
          "gallery_url": {
            "type": "string",
            "format": "uri"
          }
        },
        "additionalProperties": false
      },
      "DeleteResponse": {
        "type": "object",
        "required": [
          "success",
          "resource_type",
          "deleted"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "resource_type": {
            "type": "string",
            "enum": [
              "image",
              "gallery"
            ]
          },
          "deleted": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "additionalProperties": false
      },
      "ApiError": {
        "type": "object",
        "description": "JSON error shape used by structured API failures. Some legacy upload failures can instead return plain text or an empty body, so clients must always check the HTTP status.",
        "properties": {
          "success": {
            "type": "boolean",
            "example": false
          },
          "error": {
            "type": "string",
            "description": "Stable error code where the endpoint supplies one."
          },
          "message": {
            "type": "string",
            "description": "Human-readable error message."
          },
          "request_id": {
            "type": "string",
            "description": "Request identifier included by bootstrap-level failures."
          }
        },
        "additionalProperties": true
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid request, missing parameter, or missing file. The body can be JSON, plain text, or empty for legacy upload errors.",
        "headers": {
          "X-Request-ID": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "text/plain": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "JsonBadRequest": {
        "description": "Invalid request, malformed JSON, or missing parameter.",
        "headers": {
          "X-Request-ID": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "UploadTooLarge": {
        "description": "Uploaded file exceeds the configured size limit.",
        "headers": {
          "X-Request-ID": {
            "$ref": "#/components/headers/RequestId"
          }
        }
      },
      "UnsupportedImageFormat": {
        "description": "Legacy API status meaning the uploaded image format is unsupported.",
        "headers": {
          "X-Request-ID": {
            "$ref": "#/components/headers/RequestId"
          }
        }
      },
      "GalleryNotFound": {
        "description": "Legacy API status meaning the target gallery does not exist.",
        "headers": {
          "X-Request-ID": {
            "$ref": "#/components/headers/RequestId"
          }
        }
      },
      "GalleryUploadTokenInvalid": {
        "description": "Legacy API status meaning the gallery upload token is incorrect.",
        "headers": {
          "X-Request-ID": {
            "$ref": "#/components/headers/RequestId"
          }
        }
      },
      "UnprocessableEntity": {
        "description": "The requested option is invalid or the upload was rejected. The body can be JSON, plain text, or empty for legacy upload errors.",
        "headers": {
          "X-Request-ID": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "text/plain": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "JsonUnprocessableEntity": {
        "description": "The request is structurally valid but its operation or field value is not allowed.",
        "headers": {
          "X-Request-ID": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "ManagementNotFound": {
        "description": "Management token does not exist or is not valid.",
        "headers": {
          "X-Request-ID": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "ManagementGone": {
        "description": "Managed content was already deleted or the management token was revoked.",
        "headers": {
          "X-Request-ID": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "InternalError": {
        "description": "Internal server error. The body can be JSON, plain text, or empty for legacy upload errors.",
        "headers": {
          "X-Request-ID": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          },
          "text/plain": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "JsonInternalError": {
        "description": "Internal server error.",
        "headers": {
          "X-Request-ID": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      }
    }
  }
}
