@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api QuickChart API
@base https://quickchart.io
@version 1.0.0
@auth ApiKey key in query | Bearer bearer
@endpoints 25
@hint download_for_search
@toc openapi.json(1), chart(3), wordcloud(2), table(2), watermark(2), graphviz(2), gchart(1), api(2), qr(3), qr-url(1), qr-urls(1), barcode(2), qr-read(2), natural(1)

@group openapi.json
@endpoint GET /openapi.json
@returns(200)

@endgroup

@group chart
@endpoint GET /chart
@optional {chart: str, c: str, width: int=500, height: int=300, format: str(png/jpg/jpeg/webp/svg/pdf/base64), devicePixelRatio: num=2, backgroundColor: str, version: str(2/3/4), encoding: str(url/base64), key: str}
@returns(200)
@errors {400, 403, 429}

@endpoint POST /chart
@optional {chart: any, c: any, width: int=500, w: int, height: int=300, h: int, devicePixelRatio: num=2, backgroundColor: str=transparent, bkg: str, version: str(2/3/4)=2, v: str(2/3/4), format: str(png/jpg/jpeg/webp/svg/pdf/base64)=png, f: str(png/jpg/jpeg/webp/svg/pdf/base64), encoding: str(url/base64)=url, templateOverrides: any, key: str}
@returns(200)
@errors {400, 403, 429}

@endpoint POST /chart/create
@optional {chart: any, c: any, width: int=500, w: int, height: int=300, h: int, devicePixelRatio: num=2, backgroundColor: str=transparent, bkg: str, version: str(2/3/4)=2, v: str(2/3/4), format: str(png/jpg/jpeg/webp/svg/pdf/base64)=png, f: str(png/jpg/jpeg/webp/svg/pdf/base64), encoding: str(url/base64)=url, templateOverrides: any, key: str}
@returns(200) {success: bool, url: str(uri)}
@errors {500}

@endgroup

@group wordcloud
@endpoint GET /wordcloud
@required {text: str}
@optional {format: str(svg/png)=svg, width: int=600, height: int=600, backgroundColor: str, fontFamily: str=serif, fontWeight: str=normal, loadGoogleFonts: str, fontScale: num=25, scale: str(linear/sqrt/log)=linear, padding: num=2, rotation: num=20, maxNumWords: int=200, minWordLength: int=1, case: str(upper/lower/none)=lower, colors: str, removeStopwords: bool=false, cleanWords: bool=true, language: str=en, useWordList: bool=false}
@returns(200)
@errors {400, 403}

@endpoint POST /wordcloud
@required {text: str}
@optional {format: str(svg/png)=svg, width: int=600, height: int=600, backgroundColor: str=transparent, fontFamily: str=serif, fontWeight: str=normal, loadGoogleFonts: str, fontScale: num=25, scale: str(linear/sqrt/log)=linear, padding: num=2, rotation: num=20, maxNumWords: int=200, minWordLength: int=1, case: str(upper/lower/none)=lower, colors: [str], removeStopwords: bool=false, cleanWords: bool=true, language: str=en, stopwords: [str], useWordList: bool=false}
@returns(200)
@errors {400, 403}

@endgroup

@group table
@endpoint GET /v1/table
@required {data: str}
@optional {options: str}
@returns(200)
@errors {400, 403}

@endpoint POST /v1/table
@required {data: any}
@optional {options: any}
@returns(200)
@errors {400, 403}

@endgroup

@group watermark
@endpoint GET /watermark
@required {mainImageUrl: str(uri), markImageUrl: str(uri)}
@optional {opacity: num=1, margin: num, imageWidth: int, imageHeight: int, markWidth: int, markHeight: int, markRatio: num, position: str(topLeft/topMiddle/topRight/middleLeft/center/middleRight/bottomLeft/bottomMiddle/bottomRight)=bottomRight, positionX: int, positionY: int}
@returns(200)
@errors {400}

@endpoint POST /watermark
@required {mainImageUrl: str(uri), markImageUrl: str(uri)}
@optional {opacity: num=1, margin: num, imageWidth: int, imageHeight: int, markWidth: int, markHeight: int, markRatio: num, position: str(topLeft/topMiddle/topRight/middleLeft/center/middleRight/bottomLeft/bottomMiddle/bottomRight)=bottomRight, positionX: int, positionY: int}
@returns(200)
@errors {400}

@endgroup

@group graphviz
@endpoint GET /graphviz
@required {graph: str}
@optional {format: str(svg/png)=svg, engine: str=dot, layout: str, width: int, height: int}
@returns(200)
@errors {400}

@endpoint POST /graphviz
@required {graph: str}
@optional {format: str(svg/png)=svg, engine: str=dot, layout: str, width: int, height: int}
@returns(200)
@errors {400}

@endgroup

@group gchart
@endpoint GET /gchart
@required {cht: str}
@optional {chs: str, chd: str, chl: str, chco: str, chds: str, chxt: str, chxl: str, chxr: str, chm: str, chbh: str, chld: str, chof: str(png/svg), format: str}
@returns(200)
@errors {400}

@endgroup

@group api
@endpoint POST /api/validate-chart
@optional {chart: any, c: any, width: int=500, w: int, height: int=300, h: int, devicePixelRatio: num=2, backgroundColor: str=transparent, bkg: str, version: str(2/3/4)=2, v: str(2/3/4), format: str(png/jpg/jpeg/webp/svg/pdf/base64)=png, f: str(png/jpg/jpeg/webp/svg/pdf/base64), encoding: str(url/base64)=url, templateOverrides: any, key: str}
@returns(200) {success: bool, errors: [str], warnings: [str], normalized: map, renderCheck: map{contentType: str, bytes: int}}
@errors {400, 403, 429}

@endgroup

@group qr
@endpoint GET /qr
@required {text: str}
@optional {format: str(png/svg/jpg/jpeg/base64), size: int=150, margin: int=4, ecLevel: str(L/M/Q/H), dark: str, light: str, dotStyle: str(square/dot/dots/round/circle/rounded), finderStyle: str(square/rounded/circle/dot/dots), finderDotStyle: str(square/rounded/dot/dots/circle), finderColor: str, centerImageUrl: str, centerImageSizeRatio: num=0.3, centerImageWidth: int, centerImageHeight: int, caption: str, captionFontFamily: str=Arial, captionFontSize: int=12, captionFontColor: str=black, sig: str, accountId: str, key: str}
@returns(200)
@errors {400, 403}

@endpoint POST /qr
@required {text: str}
@optional {format: str(png/svg/jpg/jpeg/base64)=png, size: int=150, margin: int=4, ecLevel: str(L/M/Q/H), dark: str=000000, light: str=ffffff, finderColor: str, dotStyle: str(square/dot/dots/round/circle/rounded), finderStyle: str(square/rounded/circle/dot/dots), finderDotStyle: str(square/rounded/dot/dots/circle), centerImageUrl: str, centerImageSizeRatio: num=0.3, centerImageWidth: int, centerImageHeight: int, caption: str, captionFontFamily: str=Arial, captionFontSize: int=12, captionFontColor: str=black, sig: str, accountId: str, filename: str, key: str}
@returns(200)
@errors {400, 403}

@endgroup

@group api
@endpoint POST /api/validate-qr
@required {text: str}
@optional {format: str(png/svg/jpg/jpeg/base64)=png, size: int=150, margin: int=4, ecLevel: str(L/M/Q/H), dark: str=000000, light: str=ffffff, finderColor: str, dotStyle: str(square/dot/dots/round/circle/rounded), finderStyle: str(square/rounded/circle/dot/dots), finderDotStyle: str(square/rounded/dot/dots/circle), centerImageUrl: str, centerImageSizeRatio: num=0.3, centerImageWidth: int, centerImageHeight: int, caption: str, captionFontFamily: str=Arial, captionFontSize: int=12, captionFontColor: str=black, sig: str, accountId: str, filename: str, key: str}
@returns(200) {success: bool, errors: [str], warnings: [str], normalized: map, renderCheck: map{contentType: str, bytes: int}}
@errors {400, 403, 429}

@endgroup

@group qr
@endpoint POST /qr/batch
@returns(200)
@errors {400, 403, 429}

@endgroup

@group qr-url
@endpoint POST /qr-url
@optional {text: str, format: str(png/svg/jpg/jpeg/base64)=png, size: int=150, margin: int=4, ecLevel: str(L/M/Q/H), dark: str=000000, light: str=ffffff, finderColor: str, dotStyle: str(square/dot/dots/round/circle/rounded), finderStyle: str(square/rounded/circle/dot/dots), finderDotStyle: str(square/rounded/dot/dots/circle), centerImageUrl: str, centerImageSizeRatio: num=0.3, centerImageWidth: int, centerImageHeight: int, caption: str, captionFontFamily: str=Arial, captionFontSize: int=12, captionFontColor: str=black, sig: str, accountId: str, filename: str, key: str}
@returns(200) {url: str(uri)}
@errors {400}

@endgroup

@group qr-urls
@endpoint POST /qr-urls
@required {qrCodes: [map{text: str, format: str, size: int, margin: int, ecLevel: str, dark: str, light: str, finderColor: str, dotStyle: str, finderStyle: str, finderDotStyle: str, centerImageUrl: str, centerImageSizeRatio: num, centerImageWidth: int, centerImageHeight: int, caption: str, captionFontFamily: str, captionFontSize: int, captionFontColor: str, sig: str, accountId: str, filename: str, key: str}]}
@returns(200) {urls: [str(uri)]}
@errors {400}

@endgroup

@group barcode
@endpoint GET /barcode
@required {type: str, text: str}
@optional {format: str(png/svg), width: int, height: int, includeText: bool=false, useMillimeters: bool=false, rotate: str(N/R/L/I)=N, scale: int=1}
@returns(200)
@errors {400}

@endpoint POST /barcode
@required {type: str, text: str}
@optional {data: str, format: str(png/svg)=png, width: int, height: int, scale: int=1, includeText: bool=false, useMillimeters: bool=false, rotate: str(N/R/L/I)=N}
@returns(200)
@errors {400}

@endgroup

@group qr-read
@endpoint GET /qr-read
@required {url: str(uri)}
@returns(200) {result: str}
@errors {400, 429, 500}

@endpoint POST /qr-read
@optional {url: str(uri), image: str}
@returns(200) {result: str}
@errors {400, 429, 500}

@endgroup

@group natural
@endpoint POST /natural/config
@required {description: str}
@optional {width: int=500, height: int=300, backgroundColor: str=transparent}
@returns(200) {success: bool, description: str, chart: str, chartUrl: str, chartMakerUrl: str, warnings: [str]}

@endgroup

@end
