{"components":{"schemas":{"Color":{"examples":["#e63946"],"pattern":"^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$","type":"string"},"Crop":{"additionalProperties":false,"properties":{"height":{"minimum":1,"type":"integer"},"width":{"minimum":1,"type":"integer"},"x":{"minimum":0,"type":"integer"},"y":{"minimum":0,"type":"integer"}},"required":["x","y","width","height"],"type":"object"},"Error":{"properties":{"error":{"properties":{"code":{"examples":["invalid_options"],"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"},"ExportOptions":{"additionalProperties":false,"properties":{"dpi":{"default":72,"maximum":10000,"minimum":1,"type":"number"},"fixed_size":{"default":true,"type":"boolean"},"format":{"default":"svg11","enum":["svg10","svg11","svg12","pdf","eps","dxf","png"],"type":"string"},"precision":{"default":2,"maximum":6,"minimum":0,"type":"integer"},"scale":{"default":1,"exclusiveMinimum":0,"maximum":100,"type":"number"},"unit":{"default":"px","enum":["px","pt","in","cm","mm"],"type":"string"}},"type":"object"},"PaletteEntry":{"additionalProperties":false,"properties":{"color":{"$ref":"#/components/schemas/Color"},"map_to":{"$ref":"#/components/schemas/Color"},"remove":{"default":false,"type":"boolean"}},"required":["color"],"type":"object"},"VectorizeOptions":{"additionalProperties":false,"properties":{"alpha_threshold":{"default":128,"maximum":255,"minimum":0,"type":"integer"},"bw_threshold":{"default":null,"maximum":255,"minimum":0,"type":["integer","null"]},"clean_edges":{"default":true,"type":"boolean"},"color_mode":{"default":"color","enum":["color","grayscale","bilevel"],"type":"string"},"color_tolerance":{"default":10,"maximum":100,"minimum":0,"type":"number"},"corner_threshold":{"default":55,"maximum":180,"minimum":1,"type":"number"},"crop":{"$ref":"#/components/schemas/Crop"},"denoise":{"default":0,"maximum":3,"minimum":0,"type":"integer"},"detect_enlargement":{"default":true,"type":"boolean"},"draw_style":{"default":"fill_shapes","enum":["fill_shapes","stroke_shapes","stroke_edges"],"type":"string"},"fit_tolerance":{"default":0.8,"maximum":20,"minimum":0.05,"type":"number"},"gap_filler":{"default":false,"type":"boolean"},"gap_filler_width":{"default":0.6,"maximum":10,"minimum":0.01,"type":"number"},"group_by_color":{"default":true,"type":"boolean"},"max_colors":{"default":0,"description":"0 = automatic","maximum":256,"minimum":0,"type":"integer"},"max_pixels":{"default":4000000,"minimum":1024,"type":"integer"},"min_area":{"default":6,"maximum":1000000,"minimum":0,"type":"integer"},"palette":{"items":{"$ref":"#/components/schemas/PaletteEntry"},"maxItems":256,"minItems":1,"type":"array"},"remove_background":{"default":false,"type":"boolean"},"shapes":{"additionalProperties":false,"properties":{"arcs":{"default":true,"type":"boolean"},"ellipses":{"default":true,"type":"boolean"},"lines":{"default":true,"type":"boolean"},"rectangles":{"default":true,"type":"boolean"},"symmetry":{"default":true,"type":"boolean"}},"type":"object"},"smoothing":{"default":2,"maximum":10,"minimum":0,"type":"integer"},"stacking":{"default":"cutouts","enum":["cutouts","stacked"],"type":"string"},"stroke_width":{"default":1,"maximum":100,"minimum":0.01,"type":"number"},"upscale":{"default":true,"type":"boolean"}},"type":"object"},"VectorizeResponse":{"properties":{"cached":{"type":"boolean"},"crop":{"$ref":"#/components/schemas/Crop"},"height":{"type":"number"},"palette":{"items":{"properties":{"color":{"$ref":"#/components/schemas/Color"},"coverage":{"type":"number"},"map_to":{"$ref":"#/components/schemas/Color"},"pixels":{"type":"integer"},"remove":{"type":"boolean"}},"type":"object"},"type":"array"},"stats":{"properties":{"chains":{"type":"integer"},"colors":{"type":"integer"},"elapsed_ms":{"type":"integer"},"nodes":{"type":"integer"},"primitives":{"type":"integer"},"processed_height":{"type":"integer"},"processed_width":{"type":"integer"},"shapes":{"type":"integer"},"symmetric":{"type":"integer"}},"type":"object"},"svg":{"description":"SVG 1.1 preview","type":"string"},"width":{"type":"number"}},"required":["svg","width","height","crop","palette","stats","cached"],"type":"object"}}},"info":{"description":"Convert raster images into vector graphics (SVG 1.0/1.1/1.2 Tiny, PDF, EPS, DXF, PNG). The API is stateless; images are processed in memory and never stored. An MCP (Model Context Protocol) endpoint for AI assistants is available at POST /mcp.","license":{"identifier":"MIT","name":"MIT"},"title":"Vectorizer API","version":"0.1.0"},"openapi":"3.1.0","paths":{"/decode":{"post":{"operationId":"decode","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"image":{"format":"binary","type":"string"}},"required":["image"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"image/png":{"schema":{"format":"binary","type":"string"}}},"description":"PNG image"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing image"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unsupported image format"}},"summary":"Decode any supported image to PNG"}},"/health":{"get":{"operationId":"health","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"const":"ok"}},"type":"object"}}},"description":"Healthy"}},"summary":"Liveness probe"}},"/info":{"get":{"operationId":"info","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Server information"}},"summary":"Version, formats, limits and default options"}},"/openapi.json":{"get":{"operationId":"openapi","responses":{"200":{"description":"OpenAPI 3.1 document"}},"summary":"This document"}},"/vectorize":{"post":{"description":"Returns a JSON preview (format=json, default) or the file in the requested format.","operationId":"vectorize","parameters":[{"description":"Output format; overrides the `format` field and `export.format`.","in":"query","name":"format","required":false,"schema":{"default":"json","enum":["json","svg10","svg11","svg12","pdf","eps","dxf","png"],"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"encoding":{"export":{"contentType":"application/json"},"options":{"contentType":"application/json"}},"schema":{"properties":{"export":{"contentMediaType":"application/json","description":"JSON-encoded ExportOptions.","type":"string"},"format":{"enum":["json","svg10","svg11","svg12","pdf","eps","dxf","png"],"type":"string"},"image":{"description":"The image file.","format":"binary","type":"string"},"options":{"contentMediaType":"application/json","description":"JSON-encoded VectorizeOptions.","type":"string"}},"required":["image"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorizeResponse"}},"application/pdf":{"schema":{"format":"binary","type":"string"}},"application/postscript":{"schema":{"type":"string"}},"image/png":{"schema":{"format":"binary","type":"string"}},"image/svg+xml":{"schema":{"type":"string"}},"image/vnd.dxf":{"schema":{"type":"string"}}},"description":"JSON preview, or the exported file (with Content-Disposition)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request or options"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Upload or image too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unsupported image format"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Image could not be decoded or the crop is empty"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server busy; retry after the Retry-After delay"}},"summary":"Vectorise an image"}}},"servers":[{"url":"/api/v1"}]}