Raw schema
{
"type": "object",
"properties": {
"output_url": {
"type": "string",
"minLength": 4,
"maxLength": 500,
"description": "The output_url returned by tinypng_compress_image (https://api.tinify.com/output/<id>), or just the id. Outputs are kept by Tinify for about 48 hours."
},
"resize_method": {
"description": "Resize method. scale: width or height; fit/cover/thumb: width and height.",
"type": "string",
"enum": [
"scale",
"fit",
"cover",
"thumb"
]
},
"resize_width": {
"description": "Target width in pixels.",
"type": "integer",
"minimum": 1,
"maximum": 20000
},
"resize_height": {
"description": "Target height in pixels.",
"type": "integer",
"minimum": 1,
"maximum": 20000
},
"convert_to": {
"description": "Target type(s), e.g. [\"image/webp\"]. Several = the smallest result is returned. [\"*/*\"] = the smallest of WebP, JPEG, PNG.",
"minItems": 1,
"maxItems": 6,
"type": "array",
"items": {
"type": "string",
"enum": [
"image/webp",
"image/jpeg",
"image/png",
"image/avif",
"image/jxl",
"*/*"
]
}
},
"background": {
"description": "Background for transparent areas when converting to a type without transparency (JPEG): \"#rrggbb\", \"white\" or \"black\". Only with convert_to.",
"type": "string",
"pattern": "^(#[0-9a-fA-F]{6}|white|black)$"
},
"preserve": {
"description": "Metadata to keep: copyright, creation, location (JPEG only).",
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"enum": [
"copyright",
"creation",
"location"
]
}
},
"include_image": {
"description": "Also return the resulting image (only when it is under 1 MB). Default false: sizes only.",
"type": "boolean"
}
},
"required": [
"output_url"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}