openapi: "3.0.0"
info:
version: 4.0.11
title: vectorizer.io
servers:
- url: https://api.vectorizer.io/v4.0/
components:
securitySchemes:
CreditsCodeAuth:
type: apiKey
in: header
name: X-CREDITS-CODE
description: "Successful calls to API endpoints are charged with one credit from the specified credits code. If an error occurs during an API call no credit will be charged. If you want to evaluate this service with 'free credits' then you do not have to specify this header. Contact britnex+vectorizerapisales@gmail.com if you have any questions."
security:
- CreditsCodeAuth: []
paths:
/vectorize:
post:
security:
- CreditsCodeAuth: []
summary: "Main vectorization endpoint to covert raster images to scalable vector graphics. Upload input image, start vectorization process, keep connection alive until vectorization is completed and download generated output file in specified output file format. Completion time depends on input image size, number of colors and structure but should never exceed 59 seconds."
operationId: vectorize
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
image:
type: string
format: binary
description: "Input image binary. Use PNG file format for best compatibility. Try to avoid uploading files larger than 1MB (max. 10MB) to prevent timeouts."
format:
type: string
enum: [svg, eps, png]
default: "svg"
description: "Supported output file formats:
- svg = Scalable Vector Graphics (default)
- eps = Encapsulated Postscript
- png = PNG (raster image)
Contact us if you need other output file formats."
colors:
type: number
minimum: 0
maximum: 99
default: 0
description: "Maximum number of colors used to generated the output. A value of 0 is automatic mode."
model:
type: string
enum: [auto, clipart, photo, sketch, drawing]
default: "auto"
algorithm:
type: string
enum: [auto, overlap, overlaplow, overlapmid, overlaphigh, nooverlap, single, strokesingle, contour, centerline, border]
default: "auto"
description: "- auto automatic algorithm detection
- Filled Layers:
- overlap, overlaplow, overlapmid, overlaphigh
- nooverlap
- single
Stroked Layers:- strokesingle
- contour
- centerline
- border
"
details:
type: string
enum: [auto, min, low, mid, high, max]
default: "auto"
description: "Other values than auto reduce the detail level in the input image to cluster similar pixels to larger areas. (Only relevant for model: photo, sketch and clipart)"
antialiasing:
type: string
enum: [auto, min, low, mid, high, max]
default: "auto"
minarea:
type: integer
default: 5
minimum: 0
maximum: 1000000
description: "Minimum area of output shapes in px^2."
colormergefactor:
type: integer
default: 5
minimum: 0
maximum: 100
description: "Color merge factor in percent. Merges similar output colors to a color group."
unit:
type: string
enum: [auto, none, px, inch, mm]
default: "auto"
description: "Unit for the width/height for the output file. (Only relevant for SVG output format)"
width:
type: number
format: float
default: 0
minimum: 0
maximum: 1000000
description: "A value of 0 is the default value. Other values define the width of the vectorized result in the specified unit. Height will be calculated by ratio of input image (or a specified height value is used)."
height:
type: number
format: float
default: 0
minimum: 0
maximum: 1000000
description: "A value of 0 is the default value. Other values define the height of the vectorized result in the specified unit. Width will be calculated by ratio of input image (or a specified width value is used)."
transparency-threshold:
type: number
default: 0
minimum: 0
maximum: 255
description: "(optional) For default behavior omit this parameter or set to value 0.
Transparency threshold value. All pixels with a transpareny level below this threshold will be threated as full transparent. If transparency-color is set to a RGB color code, then transparent pixels with be replaced with specified non-transparent color."
transparency-color:
type: string
pattern: "^transparent|([A-Fa-f0-9]{6})$"
default: ""
description: "(optional) For default behavior omit this parameter or set to empty string.
- transparent: keep transparent pixels transparent
- 000000 replace transparent pixels using black color
- FF0000 replace transparent pixels using red color
"
background-threshold:
type: number
default: 0
minimum: 0
maximum: 255
description: "(optional) For default behavior omit this parameter or set to value 0.
Background threshold value. Use a value of 1 to remove background pixels which are the same color as the configured background-color. Use higher values to remove pixels with similar colors."
background-color:
type: string
pattern: "^auto|([A-Fa-f0-9]{6})$"
default: ""
description: "(optional) For default behavior omit this parameter or set to empty string.
- auto: detect background color automatically
- 000000 black background color
- FF0000 red background color
"
roundness:
type: string
enum: [off, low, default, high, max]
default: default
description: "(optional) Roundness of generated vector shapes."
palette:
type: string
format: binary
description: "(optional) Import your palette as an .ASE (RGB color space) or .PAL file to vectorize images using ONLY colors from your chosen palette."
required:
- image
encoding:
image:
contentType: application/octet-stream
# Use the HTTP status code of the response to implement your error handling. The HTTP body of the response is only for debugging purposes and can change without a version change.
responses:
'200':
description: "Output format depends on format argument."
headers:
X-CREDITS-AVAILABLE:
schema:
type: integer
description: "Number of available credits before starting the vectorization operation. This number does not include the one credit that will be charged for a successful download. [this header requires authentication using X-CREDITS-CODE header]"
X-CREDITS-EXPIRE:
schema:
type: string
description: "Credits valid until this date (RFC7231 format). [this header requires authentication using X-CREDITS-CODE header]"
X-FREE-CREDITS-AVAILABLE:
schema:
type: integer
description: "Free credits available. [this header is only available if not authenticated using X-CREDITS-CODE header]"
content:
# Content type for SVG
image/svg+xml:
schema:
type: string
# Content type of EPS
application/postscript:
schema:
type: string
format: binary
image/png:
schema:
type: string
format: binary
'500':
description: "Error: Internal Server Error."
content:
text/plain:
schema:
type: string
'402':
description: "Error: Payment required."
content:
text/plain:
schema:
type: string
'413':
description: "Error: Payload too large. (max. 10MB)"
content:
text/plain:
schema:
type: string
'429':
description: "Error: Too many requests (limited to max. 60 API calls per minute. For higher limit please contact us.)"
content:
text/plain:
schema:
type: string
'504':
description: "Error: Gateway Timeout"
content:
text/plain:
schema:
type: string
/paintbynumbers:
post:
security:
- CreditsCodeAuth: []
summary: "Vectorization endpoint for paint-by-number images. Completion time depends on input image size, number of colors and structure but should never exceed 59 seconds."
operationId: paintbynumbers
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
image:
type: string
format: binary
description: "Input image binary. Use PNG file format for best compatibility. Try to avoid uploading files larger than 1MB (max. 10MB) to prevent timeouts."
output:
type: string
enum: [color,contour,bundle]
default: "contour"
description: "- color: vectorization result with colors and numbers
- contour: vectorization result with only the contour lines and numbers (default)
- bundle: vectorization results in different file formats in ZIP file archive (same as interactive version of the website) (parameter 'format' is ignored for this option)
"
format:
type: string
enum: [svg, png]
default: "svg"
description: "Supported output file formats: - svg = SVG (default)
- png = PNG
. Contact us if you need other output file formats."
fontsize:
type: integer
minimum: 0
maximum: 100
default: 60
description: "Maximum font size for the labels representing the color numbers. The default value of 60 might be too large for your use case, then use a smaller value like 12."
colors:
type: number
minimum: 1
maximum: 99
default: 32
description: "Maximum number of colors used to generated the output. (Recommended: 24, 36, 50)"
model:
type: string
enum: [auto, clipart, photo, sketch, drawing]
default: "auto"
noisereduction:
type: string
enum: [off, low, high]
default: "off"
description: "Noise reduction level to improve input image quality. (Use off for most use cases, because other values can add 10-30 seconds of processing time)"
details:
type: string
enum: [auto, min, low, mid, high, max]
default: "max"
description: "Other values than auto reduce the detail level in the input image to cluster similar pixels to larger areas. (Only relevant for model: photo, sketch and clipart)"
minarea:
type: integer
default: 5
minimum: 0
maximum: 1000000
description: "Minimum area of output shapes in px^2."
colormergefactor:
type: integer
default: 5
minimum: 0
maximum: 100
description: "Color merge factor in percent. Merges similar output colors to a color group."
minradius:
type: number
format: float
default: 1.5
minimum: 0
maximum: 8.0
description: "Minimum incircle radius in mm for output shapes. Too remove 'small' non-paintable areas select a higher value. (The radius is related to output width/height in mm)"
unit:
type: string
enum: [auto, none, px, inch, mm]
default: "mm"
description: "Unit for the width/height for the output file."
width:
type: number
format: float
default: 0
minimum: 0
maximum: 1000000
description: "A value of 0 is the default value. Specify '500' for 50cm. Other values define the width of the vectorized result in the specified unit. Height will be calculated by ratio of input image (or a specified height value is used)."
height:
type: number
format: float
default: 0
minimum: 0
maximum: 1000000
description: "A value of 0 is the default value. Specify '400' for 40cm. Other values define the height of the vectorized result in the specified unit. Width will be calculated by ratio of input image (or a specified width value is used)."
transparency-threshold:
type: number
default: 0
minimum: 0
maximum: 255
description: "(optional) For default behavior omit this parameter or set to value 0.
Transparency threshold value. All pixels with a transpareny level below this threshold will be threated as full transparent. If transparency-color is set to a RGB color code, then transparent pixels with be replaced with specified non-transparent color."
transparency-color:
type: string
pattern: "^transparent|([A-F0-9a-f]{6})$"
default: ""
description: "(optional) For default behavior omit this parameter or set to empty string.
- transparent: keep transparent pixels transparent
- 000000 replace transparent pixels using black color
- FF0000 replace transparent pixels using red color
"
background-threshold:
type: number
default: 0
minimum: 0
maximum: 255
description: "(optional) For default behavior omit this parameter or set to value 0.
Background threshold value. Use a value of 1 to remove background pixels which are the same color as the configured background-color. Use higher values to remove pixels with similar colors."
background-color:
type: string
pattern: "^auto|([A-Fa-f0-9]{6})$"
default: ""
description: "(optional) For default behavior omit this parameter or set to empty string.
- auto: detect background color automatically
- 000000 black background color
- FF0000 red background color
"
facedetect:
type: string
enum: [auto, off, on]
default: "auto"
description: "By default the position of faces are detected to improve the detail level of faces. This may produce color patches which are too small to paint, in this case a value of off disables face detection."
roundness:
type: string
enum: [off, low, default, high, max]
default: default
description: "(optional) Roundness of generated vector shapes."
palette:
type: string
format: binary
description: "(optional) Import your palette as an .ASE (RGB color space) or .PAL file to vectorize images using ONLY colors from your chosen palette."
required:
- image
encoding:
image:
contentType: application/octet-stream
# Use the HTTP status code of the response to implement your error handling. The HTTP body of the response is only for debugging purposes and can change without a version change.
responses:
'200':
description: "Output format depends on format argument."
headers:
X-CREDITS-AVAILABLE:
schema:
type: integer
description: "Number of available credits before starting the vectorization operation. This number does not include the one credit that will be charged for a successful download. [this header requires authentication using X-CREDITS-CODE header]"
X-CREDITS-EXPIRE:
schema:
type: string
description: "Credits valid until this date (RFC7231 format). [this header requires authentication using X-CREDITS-CODE header]"
X-FREE-CREDITS-AVAILABLE:
schema:
type: integer
description: "Free credits available. [this header is only available if not authenticated using X-CREDITS-CODE header]"
X-COLORCODES:
schema:
type: string
description: "Hex RGB colors codes of vectorization result. First entry has the label '1' in the vector result. (Colors are SPACE separated values of [0-9A-F]{6}): example: '0000FF 00FF00 FF0000'"
X-COLORAREAS:
schema:
type: string
description: "Area used by each color in the vectorization result in percent 0 - 100. First entry has the label '1' in the vector result. (Areas are SPACE separated values of decimal percent values): example: '52 0.05 12.5'"
content:
image/svg+xml:
schema:
type: string
image/png:
schema:
type: string
format: binary
'500':
description: "Error: Internal Server Error."
content:
text/plain:
schema:
type: string
'402':
description: "Error: Payment required."
content:
text/plain:
schema:
type: string
'413':
description: "Error: Payload too large. (max. 10MB)"
content:
text/plain:
schema:
type: string
'429':
description: "Error: Too many requests (limited to max. 60 API calls per minute. For higher limit please contact us.)"
content:
text/plain:
schema:
type: string
'504':
description: "Error: Gateway Timeout"
content:
text/plain:
schema:
type: string
/vectorize#advanced:
post:
security:
- CreditsCodeAuth: []
summary: "Advanced vectorization endpoint to covert raster images to scalable vector graphics. (Fragmentation part of url not required). Completion time depends on input image size, number of colors and structure but should never exceed 59 seconds."
operationId: vectorizeadvanced
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
image:
type: string
format: binary
description: "Input image binary. Use PNG file format for best compatibility. Try to avoid uploading files larger than 1MB (max. 10MB) to prevent timeouts."
config:
type: string
format: binary
description: "Advanced configuration in YAML format.
Example configuration: advanced-config-yaml-example-v4.0.7.yaml."
palette:
type: string
format: binary
description: "(optional) Import your palette as an .ASE (RGB color space) or .PAL file to vectorize images using ONLY colors from your chosen palette."
required:
- image
- config
encoding:
image:
contentType: application/octet-stream
# Use the HTTP status code of the response to implement your error handling. The HTTP body of the response is only for debugging purposes and can change without a version change.
responses:
'200':
description: "Output format depends on format argument."
headers:
X-CREDITS-AVAILABLE:
schema:
type: integer
description: "Number of available credits before starting the vectorization operation. This number does not include the one credit that will be charged for a successful download. [this header requires authentication using X-CREDITS-CODE header]"
X-CREDITS-EXPIRE:
schema:
type: string
description: "Credits valid until this date (RFC7231 format). [this header requires authentication using X-CREDITS-CODE header]"
X-FREE-CREDITS-AVAILABLE:
schema:
type: integer
description: "Free credits available. [this header is only available if not authenticated using X-CREDITS-CODE header]"
content:
# Content type for SVG
image/svg+xml:
schema:
type: string
# Content type of EPS
application/postscript:
schema:
type: string
format: binary
image/png:
schema:
type: string
format: binary
'500':
description: "Error: Internal Server Error."
content:
text/plain:
schema:
type: string
'402':
description: "Error: Payment required."
content:
text/plain:
schema:
type: string
'413':
description: "Error: Payload too large. (max. 10MB)"
content:
text/plain:
schema:
type: string
'429':
description: "Error: Too many requests (limited to max. 60 API calls per minute. For higher limit please contact us.)"
content:
text/plain:
schema:
type: string
'504':
description: "Error: Gateway Timeout"
content:
text/plain:
schema:
type: string
/diamondpainting:
post:
security:
- CreditsCodeAuth: []
summary: "Vectorization endpoint for diamond painting images. Completion time depends on input image size, number of colors and structure but should never exceed 59 seconds."
operationId: diamondpainting
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
image:
type: string
format: binary
description: "Input image binary. Use PNG file format for best compatibility. Try to avoid uploading files larger than 1MB (max. 10MB) to prevent timeouts."
output:
type: string
enum: [bundle]
default: "bundle"
description: ""
colors:
type: number
minimum: 1
maximum: 99
default: 32
description: "Maximum number of colors used to generated the output. (Recommended: 24, 36, 50)"
model:
type: string
enum: [auto, clipart, photo, sketch, drawing]
default: "auto"
noisereduction:
type: string
enum: [off, low, high]
default: "off"
description: "Noise reduction level to improve input image quality. (Use off for most use cases, because other values can add 10-30 seconds of processing time)"
details:
type: string
enum: [auto, min, low, mid, high, max]
default: "max"
description: "Other values than auto reduce the detail level in the input image to cluster similar pixels to larger areas. (Only relevant for model: photo, sketch and clipart)"
minarea:
type: integer
default: 5
minimum: 0
maximum: 1000000
description: "Minimum area of output shapes in px^2."
colormergefactor:
type: integer
default: 5
minimum: 0
maximum: 100
description: "Color merge factor in percent. Merges similar output colors to a color group."
minradius:
type: number
format: float
default: 1.5
minimum: 0
maximum: 8.0
description: "Minimum incircle radius in mm for output shapes. Too remove 'small' non-paintable areas select a higher value. (The radius is related to output width/height in mm)"
unit:
type: string
enum: [auto, none, px, inch, mm]
default: "mm"
description: "Unit for the width/height for the output file."
width:
type: number
format: float
default: 0
minimum: 0
maximum: 1000000
description: "A value of 0 is the default value. Specify '500' for 50cm. Other values define the width of the vectorized result in the specified unit. Height will be calculated by ratio of input image (or a specified height value is used)."
height:
type: number
format: float
default: 0
minimum: 0
maximum: 1000000
description: "A value of 0 is the default value. Specify '400' for 40cm. Other values define the height of the vectorized result in the specified unit. Width will be calculated by ratio of input image (or a specified width value is used)."
transparency-threshold:
type: number
default: 0
minimum: 0
maximum: 255
description: "(optional) For default behavior omit this parameter or set to value 0.
Transparency threshold value. All pixels with a transpareny level below this threshold will be threated as full transparent. If transparency-color is set to a RGB color code, then transparent pixels with be replaced with specified non-transparent color."
transparency-color:
type: string
pattern: "^transparent|([A-F0-9a-f]{6})$"
default: ""
description: "(optional) For default behavior omit this parameter or set to empty string.
- transparent: keep transparent pixels transparent
- 000000 replace transparent pixels using black color
- FF0000 replace transparent pixels using red color
"
background-threshold:
type: number
default: 0
minimum: 0
maximum: 255
description: "(optional) For default behavior omit this parameter or set to value 0.
Background threshold value. Use a value of 1 to remove background pixels which are the same color as the configured background-color. Use higher values to remove pixels with similar colors."
background-color:
type: string
pattern: "^auto|([A-Fa-f0-9]{6})$"
default: ""
description: "(optional) For default behavior omit this parameter or set to empty string.
- auto: detect background color automatically
- 000000 black background color
- FF0000 red background color
"
roundness:
type: string
enum: [off, low, default, high, max]
default: "default"
description: "(optional) Roundness of generated vector shapes."
diamonds:
type: string
enum: [square25,round28]
default: "square25"
description: "(optional) Diamond type: - square25:
25mm * 25mm (square) - round28:
28mm (round)
"
palette:
type: string
format: binary
description: "(optional) Import your palette as an .ASE (RGB color space) or .PAL file to vectorize images using ONLY colors from your chosen palette."
required:
- image
encoding:
image:
contentType: application/octet-stream
# Use the HTTP status code of the response to implement your error handling. The HTTP body of the response is only for debugging purposes and can change without a version change.
responses:
'200':
description: "Output format depends on format argument."
headers:
X-CREDITS-AVAILABLE:
schema:
type: integer
description: "Number of available credits before starting the vectorization operation. This number does not include the one credit that will be charged for a successful download. [this header requires authentication using X-CREDITS-CODE header]"
X-CREDITS-EXPIRE:
schema:
type: string
description: "Credits valid until this date (RFC7231 format). [this header requires authentication using X-CREDITS-CODE header]"
X-FREE-CREDITS-AVAILABLE:
schema:
type: integer
description: "Free credits available. [this header is only available if not authenticated using X-CREDITS-CODE header]"
X-COLORCODES:
schema:
type: string
description: "Hex RGB colors codes of vectorization result. First entry has the label '1' in the vector result. (Colors are SPACE separated values of [0-9A-F]{6}): example: '0000FF 00FF00 FF0000'"
X-COLORAREAS:
schema:
type: string
description: "Area used by each color in the vectorization result in percent 0 - 100. First entry has the label '1' in the vector result. (Areas are SPACE separated values of decimal percent values): example: '52 0.05 12.5'"
content:
image/svg+xml:
schema:
type: string
image/png:
schema:
type: string
format: binary
'500':
description: "Error: Internal Server Error."
content:
text/plain:
schema:
type: string
'402':
description: "Error: Payment required."
content:
text/plain:
schema:
type: string
'413':
description: "Error: Payload too large. (max. 10MB)"
content:
text/plain:
schema:
type: string
'429':
description: "Error: Too many requests (limited to max. 60 API calls per minute. For higher limit please contact us.)"
content:
text/plain:
schema:
type: string
'504':
description: "Error: Gateway Timeout"
content:
text/plain:
schema:
type: string