Title: element shown as a browser tooltip and used by screen readers. Example: ?title=ChartQuery+Website","schema":{"type":"string","description":"SVG or download)"},"Shared barcode (share: true)":{"value":{"id":"cq-a1b2c3d4-e5f6-7890-abcd-ef1234567890","view_url":"https://api.chartquery.com/v1/barcode/view/cq-a1b2c3d4-e5f6-7890-abcd-ef1234567890","embed_url":"","expires_in":"3 days","render_url":"https://api.chartquery.com/v1/barcode/render/cq-a1b2c3d4-e5f6-7890-abcd-ef1234567890"}}}}}},"400":{"description":"Bad Request — missing or invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Bad Request"}}}},"500":{"description":"Internal Server Error — something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Internal Error"}}}}}},"get":{"summary":"Barcode","description":"Generate a barcode image via GET. Output: SVG (default) or PNG. Supports 25+ formats: EAN-13, Code 128, ITF-14, GS1-128, postal codes and more. Example: ?data=4006381333931&type=ean13\n\n**Credit cost:** 3 credits per call","operationId":"get-barcode","security":[],"parameters":[{"name":"data","in":"query","required":true,"description":"The data to encode in the barcode. Always a string (including all-digit GTINs). Examples by type:\n\n**EAN-13** (retail): `4006381333931` (12 digits accepted; check digit computed)\n**EAN-8** (small pack): `73513535`\n**UPC-A** (North America): `012345678905`\n**Code 128** (general): `HELLO-WORLD-2026` or `INV-2026-00456`\n**Code 39** (uppercase): `CODE39-DEMO` or `SHELF-A12`\n**ITF-14** (carton): `00012345678905`\n**GS1-128** (with AIs): `(01)12345678901234(17)260101`\n**Codabar** (library): `A1234567890B`\n**POSTNET** (postal): `902100123`","schema":{"type":"string","description":"The data to encode in the barcode. Always a string (including all-digit GTINs). Examples by type:\n\n**EAN-13** (retail): `4006381333931` (12 digits accepted; check digit computed)\n**EAN-8** (small pack): `73513535`\n**UPC-A** (North America): `012345678905`\n**Code 128** (general): `HELLO-WORLD-2026` or `INV-2026-00456`\n**Code 39** (uppercase): `CODE39-DEMO` or `SHELF-A12`\n**ITF-14** (carton): `00012345678905`\n**GS1-128** (with AIs): `(01)12345678901234(17)260101`\n**Codabar** (library): `A1234567890B`\n**POSTNET** (postal): `902100123`"}},{"name":"type","in":"query","required":false,"description":"Barcode format. Default: `code128`.\n\n**Retail:** `ean13`, `ean8`, `ean5`, `ean2`, `upca`, `upce`\n**General:** `code128`, `code39`, `code39ext`, `code93`, `code93ext`\n**Logistics:** `itf`, `itf14`, `gs1-128`, `gs1-databar`, `gs1-databar-limited`, `gs1-databar-expanded`\n**Other:** `codabar`, `msi`, `pharmacode`, `code11`, `plessey`\n**Postal:** `postnet`, `planet`, `identcode`, `leitcode`","schema":{"type":"string","enum":["code128","ean13","ean8","upca","upce","code39","itf","itf14","codabar","gs1-128","postnet","planet","plessey"],"default":"code128","description":"Barcode format. Default: `code128`.\n\n**Retail:** `ean13`, `ean8`, `ean5`, `ean2`, `upca`, `upce`\n**General:** `code128`, `code39`, `code39ext`, `code93`, `code93ext`\n**Logistics:** `itf`, `itf14`, `gs1-128`, `gs1-databar`, `gs1-databar-limited`, `gs1-databar-expanded`\n**Other:** `codabar`, `msi`, `pharmacode`, `code11`, `plessey`\n**Postal:** `postnet`, `planet`, `identcode`, `leitcode`"}},{"name":"height","in":"query","required":false,"description":"Bar height in pixels. Default: 80. Typical values: 50 (compact), 80 (standard), 100–120 (tall labels). Example: ?height=100","schema":{"type":"number","description":"Bar height in pixels. Default: 80. Typical values: 50 (compact), 80 (standard), 100–120 (tall labels). Example: ?height=100"}},{"name":"color","in":"query","required":false,"description":"Bar color as a CSS color string. Default: #000. Examples: ?color=%231e293b (dark slate), ?color=%230f172a (near black), ?color=%237c3aed (purple), ?color=%23dc2626 (red). Use %23 to URL-encode the # character.","schema":{"type":"string","description":"Bar color as a CSS color string. Default: #000. Examples: ?color=%231e293b (dark slate), ?color=%230f172a (near black), ?color=%237c3aed (purple), ?color=%23dc2626 (red). Use %23 to URL-encode the # character."}},{"name":"show_text","in":"query","required":false,"description":"Show human-readable text below the bars. Example: ?show_text=true. Combine with font_size and text_align for print labels.","schema":{"type":"boolean","description":"Show human-readable text below the bars. Example: ?show_text=true. Combine with font_size and text_align for print labels."}},{"name":"text_position","in":"query","required":false,"description":"Position of the human-readable text label. Default: bottom. Example: ?text_position=top","schema":{"type":"string","enum":["bottom","top"],"default":"bottom","description":"Position of the human-readable text label. Default: bottom. Example: ?text_position=top"}},{"name":"text_align","in":"query","required":false,"description":"Horizontal alignment of the text label. Default: center. Example: ?text_align=left","schema":{"type":"string","enum":["center","left","right"],"default":"center","description":"Horizontal alignment of the text label. Default: center. Example: ?text_align=left"}},{"name":"font_size","in":"query","required":false,"description":"Font size of the text label in pixels. Default: 14. Example: ?font_size=12","schema":{"type":"number","description":"Font size of the text label in pixels. Default: 14. Example: ?font_size=12"}},{"name":"font_family","in":"query","required":false,"description":"Font family of the text label. Default: monospace. Examples: ?font_family=monospace, ?font_family=sans-serif, ?font_family=Arial","schema":{"type":"string","description":"Font family of the text label. Default: monospace. Examples: ?font_family=monospace, ?font_family=sans-serif, ?font_family=Arial"}},{"name":"bar_width","in":"query","required":false,"description":"Width multiplier per module (bar). Default: 2. Increase for wider, more scannable barcodes. Example: ?bar_width=3","schema":{"type":"number","description":"Width multiplier per module (bar). Default: 2. Increase for wider, more scannable barcodes. Example: ?bar_width=3"}},{"name":"bar_gap","in":"query","required":false,"description":"Extra horizontal spacing between bars in pixels. Default: 0. Example: ?bar_gap=1","schema":{"type":"number","description":"Extra horizontal spacing between bars in pixels. Default: 0. Example: ?bar_gap=1"}},{"name":"background","in":"query","required":false,"description":"Background fill color. Default: #fff. Use transparent for no background. Example: ?background=%23f8fafc","schema":{"type":"string","description":"Background fill color. Default: #fff. Use transparent for no background. Example: ?background=%23f8fafc"}},{"name":"margin","in":"query","required":false,"description":"Uniform margin around the barcode in pixels. Default: 10. Overridden per side by margin_top/bottom/left/right. Example: ?margin=6","schema":{"type":"number","description":"Uniform margin around the barcode in pixels. Default: 10. Overridden per side by margin_top/bottom/left/right. Example: ?margin=6"}},{"name":"margin_top","in":"query","required":false,"description":"Top margin in pixels (overrides margin). Example: ?margin_top=4","schema":{"type":"number","description":"Top margin in pixels (overrides margin). Example: ?margin_top=4"}},{"name":"margin_bottom","in":"query","required":false,"description":"Bottom margin in pixels (overrides margin). Example: ?margin_bottom=4","schema":{"type":"number","description":"Bottom margin in pixels (overrides margin). Example: ?margin_bottom=4"}},{"name":"margin_left","in":"query","required":false,"description":"Left margin in pixels (overrides margin). Example: ?margin_left=8","schema":{"type":"number","description":"Left margin in pixels (overrides margin). Example: ?margin_left=8"}},{"name":"margin_right","in":"query","required":false,"description":"Right margin in pixels (overrides margin). Example: ?margin_right=8","schema":{"type":"number","description":"Right margin in pixels (overrides margin). Example: ?margin_right=8"}},{"name":"rotation","in":"query","required":false,"description":"Rotate the barcode by 0, 90, 180 or 270 degrees. Default: 0. Use 90 or 270 for vertical label orientation. Example: ?rotation=90","schema":{"type":"number","enum":[0,90,180,270],"description":"Rotate the barcode by 0, 90, 180 or 270 degrees. Default: 0. Use 90 or 270 for vertical label orientation. Example: ?rotation=90"}},{"name":"bearer_bars","in":"query","required":false,"description":"Add horizontal bearer bars above and below the barcode. Required for ITF-14. Default: false. Example: ?bearer_bars=true","schema":{"type":"boolean","description":"Add horizontal bearer bars above and below the barcode. Required for ITF-14. Default: false. Example: ?bearer_bars=true"}},{"name":"unit","in":"query","required":false,"description":"Measurement unit for dimensions. Default: px. Use mm, in or cm for print-ready output. Example: ?unit=mm","schema":{"type":"string","enum":["px","mm","in","cm"],"default":"px","description":"Measurement unit for dimensions. Default: px. Use mm, in or cm for print-ready output. Example: ?unit=mm"}},{"name":"aria_label","in":"query","required":false,"description":"Accessible label added as aria-label on the SVG element. Improves screen reader support. Example: ?aria_label=EAN-13+barcode+for+product+4006381333931","schema":{"type":"string","description":"Accessible label added as aria-label on the SVG element. Improves screen reader support. Example: ?aria_label=EAN-13+barcode+for+product+4006381333931"}},{"name":"title","in":"query","required":false,"description":"SVG
or download)"},"SVG image (format: \"svg\")":{"value":""},"Shared chart (share: true)":{"value":{"id":"cq-a1b2c3d4-e5f6-7890-abcd-ef1234567890","view_url":"https://api.chartquery.com/v1/chart/view/cq-a1b2c3d4-e5f6-7890-abcd-ef1234567890","embed_url":"","expires_in":"3 days","render_url":"https://api.chartquery.com/v1/chart/render/cq-a1b2c3d4-e5f6-7890-abcd-ef1234567890"}},"Prompt too long (400)":{"value":{"error":"Prompt must not exceed 1000 characters."}}}}}},"400":{"description":"Bad Request — missing or invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Bad Request"}}}},"401":{"description":"Unauthorized — the API key is missing, invalid, inactive, or expired, or a rate limit was exceeded (`Rate limit exceeded…` message).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"invalidKey":{"value":{"error":"Invalid API Key"}},"planRateLimit":{"value":{"error":"Rate limit exceeded: You've exceeded the per second rate limit on your subscription"}},"keyQuota":{"value":{"error":"Rate limit exceeded for the API key: quota monthly"}}}}}},"402":{"description":"Payment Required — your subscription or credit balance is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Payment required"}}}},"500":{"description":"Internal Server Error — something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Internal Error"}}}}}},"get":{"summary":"Chart AI","description":"Describe a chart in plain English via GET and get a rendered image back. Powered by AI.\n\n**Credit cost:** 10 credits per call","operationId":"get-chart-ai","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"prompt","in":"query","required":true,"description":"Describe your chart in plain English (max 1000 chars). Be specific: mention chart type, data topic, colors, style.","schema":{"type":"string","description":"Describe your chart in plain English (max 1000 chars). Be specific: mention chart type, data topic, colors, style."}},{"name":"raw_data","in":"query","required":false,"description":"Raw data for the chart. URL-encoded string, CSV, or JSON. AI will parse and structure it.\n\nExamples:\n- String: `Jan: 12400, Feb: 18900, Mar: 15200`\n- JSON array: `[{\"month\":\"Jan\",\"a\":120,\"b\":85},{\"month\":\"Feb\",\"a\":145,\"b\":102}]`\n- JSON object: `{\"Organic\":38,\"Paid\":24,\"Direct\":18}`\n\nLimit: 10 000 characters / 500 items. Need more? Open a support ticket.","schema":{"type":"string","description":"Raw data for the chart. URL-encoded string, CSV, or JSON. AI will parse and structure it.\n\nExamples:\n- String: `Jan: 12400, Feb: 18900, Mar: 15200`\n- JSON array: `[{\"month\":\"Jan\",\"a\":120,\"b\":85},{\"month\":\"Feb\",\"a\":145,\"b\":102}]`\n- JSON object: `{\"Organic\":38,\"Paid\":24,\"Direct\":18}`\n\nLimit: 10 000 characters / 500 items. Need more? Open a support ticket."}},{"name":"title","in":"query","required":false,"description":"Override the chart title generated by AI.","schema":{"type":"string","description":"Override the chart title generated by AI."}},{"name":"subtitle","in":"query","required":false,"description":"Override the chart subtitle.","schema":{"type":"string","description":"Override the chart subtitle."}},{"name":"legend","in":"query","required":false,"description":"Legend position or visibility. Use \"false\" to hide.","schema":{"type":"string","enum":["top","bottom","left","right","chartArea","false"],"default":"top","description":"Legend position or visibility. Use \"false\" to hide."}},{"name":"format","in":"query","required":false,"description":"Output format. Default: \"png\".","schema":{"type":"string","enum":["png","svg"],"default":"png","description":"Output format. Default: \"png\"."}},{"name":"width","in":"query","required":false,"description":"Image width in pixels (50–4000). Default: 1200.","schema":{"type":"number","description":"Image width in pixels (50–4000). Default: 1200."}},{"name":"height","in":"query","required":false,"description":"Image height in pixels (50–4000). Default: 600.","schema":{"type":"number","description":"Image height in pixels (50–4000). Default: 600."}},{"name":"background","in":"query","required":false,"description":"Background color as a hex value. Default: #ffffff.","schema":{"type":"string","description":"Background color as a hex value. Default: #ffffff."}},{"name":"device_pixel_ratio","in":"query","required":false,"description":"Device pixel ratio for the rendered image. Default: 1.","schema":{"type":"number","description":"Device pixel ratio for the rendered image. Default: 1."}},{"name":"share","in":"query","required":false,"description":"Set share=true to persist the config and receive JSON instead of an image: { id, render_url, view_url, embed_url, expires_in }. Free plan: 3-day expiry with watermark. Paid plan: 6-month expiry, no branding.","schema":{"type":"boolean","description":"Set share=true to persist the config and receive JSON instead of an image: { id, render_url, view_url, embed_url, expires_in }. Free plan: 3-day expiry with watermark. Paid plan: 6-month expiry, no branding.","default":false}},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/is_async"},{"$ref":"#/components/parameters/soft_fail"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"},"examples":{"PNG image":{"value":"(binary image/png: use directly in
or download)"},"SVG image (format: \"svg\")":{"value":""},"Shared chart (share: true)":{"value":{"id":"cq-a1b2c3d4-e5f6-7890-abcd-ef1234567890","view_url":"https://api.chartquery.com/v1/chart/view/cq-a1b2c3d4-e5f6-7890-abcd-ef1234567890","embed_url":"","expires_in":"3 days","render_url":"https://api.chartquery.com/v1/chart/render/cq-a1b2c3d4-e5f6-7890-abcd-ef1234567890"}},"Prompt too long (400)":{"value":{"error":"Prompt must not exceed 1000 characters."}}}}}},"400":{"description":"Bad Request — missing or invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Bad Request"}}}},"401":{"description":"Unauthorized — the API key is missing, invalid, inactive, or expired, or a rate limit was exceeded (`Rate limit exceeded…` message).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"invalidKey":{"value":{"error":"Invalid API Key"}},"planRateLimit":{"value":{"error":"Rate limit exceeded: You've exceeded the per second rate limit on your subscription"}},"keyQuota":{"value":{"error":"Rate limit exceeded for the API key: quota monthly"}}}}}},"402":{"description":"Payment Required — your subscription or credit balance is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Payment required"}}}},"500":{"description":"Internal Server Error — something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Internal Error"}}}}}}},"/v1/diagram":{"post":{"summary":"Diagram (POST)","description":"Render a diagram. POST diagram_type and diagram_source. Do not send type, query, or format. Use output_format png so ChatGPT can display the image. Example: {\"diagram_type\":\"mermaid\",\"diagram_source\":\"graph TD; Start-->Review-->Done\",\"output_format\":\"png\"}\n\n**Credit cost:** 5 credits per call","operationId":"post-diagram","security":[],"parameters":[{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/is_async"},{"$ref":"#/components/parameters/soft_fail"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"diagram_type":{"type":"string","enum":["blockdiag","bpmn","bytefield","seqdiag","actdiag","nwdiag","packetdiag","rackdiag","c4plantuml","d2","dbml","ditaa","erd","excalidraw","graphviz","mermaid","nomnoml","pikchr","plantuml","structurizr","svgbob","symbolator","tikz","umlet","vega","vegalite","wavedrom","wireviz"],"default":"blockdiag","description":"Diagram language. POST field is diagram_type, not type. Example: mermaid."},"diagram_source":{"type":"string","description":"Diagram source code. POST field is diagram_source, not query. Example: graph TD; A-->B"},"output_format":{"type":"string","enum":["png","svg","jpeg","pdf"],"default":"svg","description":"Use png so ChatGPT can display the image. POST field is output_format, not format."},"share":{"type":"boolean","description":"If true, persist the result and return share URLs instead of an image. Leave false to get the image.","default":false}},"required":["diagram_type","diagram_source"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"},"examples":{"SVG image (default)":{"value":""},"PNG image (output_format: \"png\")":{"value":"(binary image/png: display in
or download)"},"Shared diagram (share: true)":{"value":{"id":"cq-a1b2c3d4-e5f6-7890-abcd-ef1234567890","view_url":"https://api.chartquery.com/v1/diagram/view/cq-a1b2c3d4-e5f6-7890-abcd-ef1234567890","embed_url":"","expires_in":"3 days","render_url":"https://api.chartquery.com/v1/diagram/render/cq-a1b2c3d4-e5f6-7890-abcd-ef1234567890"}}}}}},"400":{"description":"Bad Request — missing or invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Bad Request"}}}},"500":{"description":"Internal Server Error — something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Internal Error"}}}}}},"get":{"summary":"Diagram","description":"Render a diagram via GET. Use type (mermaid, d2, …), query (source code), and format=png for ChatGPT. POST uses diagram_type and diagram_source instead.\n\n**Credit cost:** 5 credits per call","operationId":"get-diagram","security":[],"parameters":[{"name":"type","in":"query","required":true,"description":"Diagram language.","schema":{"type":"string","enum":["mermaid","graphviz","plantuml","d2","svgbob","nomnoml","blockdiag","seqdiag","actdiag","nwdiag","bpmn","erd","excalidraw","ditaa","vega","vegalite","wavedrom","wireviz","c4plantuml","structurizr","tikz","pikchr","umlet","symbolator","packetdiag","rackdiag","bytefield","dbml"],"default":"mermaid","description":"Diagram language."}},{"name":"query","in":"query","required":true,"description":"Diagram source code (URL-encoded).\n\n**mermaid**: flowchart:\n`graph TD\\n A[Start] --> B{OK?}\\n B -->|yes| C[End]\\n B -->|no| D[Error]`\n\n**mermaid**: sequence:\n`sequenceDiagram\\n Client->>API: GET /v1/diagram\\n API-->>Client: 200 SVG`\n\n**mermaid**: ER:\n`erDiagram\\n USER ||--o{ ORDER : places\\n ORDER ||--|{ ITEM : contains`\n\n**graphviz**:\n`digraph G { rankdir=LR; A -> B -> C }`\n\n**plantuml**:\n`@startuml\\nA -> B: request\\nB --> A: response\\n@enduml`\n\n**d2**:\n`Client -> API: POST /v1/diagram\\nAPI -> SVG`\n\n**svgbob**:\n`+-------+ +-------+\\n| Box A |-->| Box B |\\n+-------+ +-------+`\n\n**nomnoml**:\n`[Client] -> [API]\\n[API] -> [Handler]`","schema":{"type":"string","description":"Diagram source code (URL-encoded).\n\n**mermaid**: flowchart:\n`graph TD\\n A[Start] --> B{OK?}\\n B -->|yes| C[End]\\n B -->|no| D[Error]`\n\n**mermaid**: sequence:\n`sequenceDiagram\\n Client->>API: GET /v1/diagram\\n API-->>Client: 200 SVG`\n\n**mermaid**: ER:\n`erDiagram\\n USER ||--o{ ORDER : places\\n ORDER ||--|{ ITEM : contains`\n\n**graphviz**:\n`digraph G { rankdir=LR; A -> B -> C }`\n\n**plantuml**:\n`@startuml\\nA -> B: request\\nB --> A: response\\n@enduml`\n\n**d2**:\n`Client -> API: POST /v1/diagram\\nAPI -> SVG`\n\n**svgbob**:\n`+-------+ +-------+\\n| Box A |-->| Box B |\\n+-------+ +-------+`\n\n**nomnoml**:\n`[Client] -> [API]\\n[API] -> [Handler]`"}},{"name":"format","in":"query","required":false,"description":"Use png so ChatGPT can display the image. svg is for download or infinite scale.","schema":{"type":"string","enum":["svg","png","jpeg","pdf"],"default":"svg","description":"Use png so ChatGPT can display the image. svg is for download or infinite scale."}},{"name":"share","in":"query","required":false,"description":"If true, persist the result and return share URLs instead of an image. Leave false to get the image.","schema":{"type":"boolean","description":"If true, persist the result and return share URLs instead of an image. Leave false to get the image."}},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/is_async"},{"$ref":"#/components/parameters/soft_fail"}],"responses":{"200":{"description":"Successful response","content":{"image/svg+xml":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}},"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad Request — missing or invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Bad Request"}}}},"500":{"description":"Internal Server Error — something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Internal Error"}}}}}}},"/v1/chart":{"post":{"summary":"Chart (POST)","description":"Render a Chart.js image. POST type and data with datasets. Do not wrap the config in query. Use format png so ChatGPT can display the image. Example: {\"type\":\"bar\",\"title\":\"Q1 revenue\",\"format\":\"png\",\"data\":{\"labels\":[\"Jan\",\"Feb\",\"Mar\"],\"datasets\":[{\"label\":\"Revenue\",\"data\":[12,15,9]}]}}\n\n**Credit cost:** 5 credits per call","operationId":"post-chart","security":[],"parameters":[{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/is_async"},{"$ref":"#/components/parameters/soft_fail"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["area","bar","bubble","doughnut","pie","line","mixed","polarArea","radar","scatter"],"default":"area","description":"Chart.js type. Required. Example: bar, line, pie. This is not a diagram type."},"data":{"type":"object","required":["datasets"],"properties":{"labels":{"type":"array","items":{"type":"string"}},"datasets":{"type":"array","items":{"type":"object","required":["data"],"properties":{"label":{"type":"string"},"data":{"type":"array"},"type":{"type":"string"},"fill":{},"tension":{"type":"number"},"stepped":{},"borderDash":{"type":"array","items":{"type":"number"}},"backgroundColor":{},"borderColor":{},"borderWidth":{},"pointRadius":{},"pointStyle":{"type":"string"},"pointBackgroundColor":{},"pointBorderColor":{},"yAxisID":{"type":"string"},"xAxisID":{"type":"string"},"stack":{"type":"string"},"order":{"type":"number"},"hidden":{"type":"boolean"}}}}},"description":"Chart.js data. Required. Must include datasets (array of {label, data}). Optional labels."},"title":{"type":"string","description":"Chart title."},"subtitle":{"type":"string","description":"Chart subtitle."},"legend":{"type":"string","enum":["top","bottom","left","right","chartArea","false"],"default":"top","description":"Legend position, or false to hide."},"scales":{"type":"object","description":"Chart.js scales keyed by axis id (y, y2, x, …)."},"options":{"type":"object","description":"Raw Chart.js options. Merged on top of defaults."},"width":{"type":"number","description":"Output width in pixels, 50-4000."},"height":{"type":"number","description":"Output height in pixels, 50-4000."},"format":{"type":"string","enum":["png","svg"],"default":"png","description":"Use png so ChatGPT can display the image. svg is for download or infinite scale."},"background":{"type":"string","description":"Background color."},"device_pixel_ratio":{"type":"number","description":"Device pixel ratio, 0.5-4."},"version":{"type":"string","description":"Chart.js v4 version pin. Alias on GET: v."},"share":{"type":"boolean","description":"If true, persist the result and return share URLs instead of an image. Leave false to get the image.","default":false}},"required":["type","data"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"},"examples":{"PNG image":{"value":"(binary image/png: use directly in
or download)"},"SVG image (format: \"svg\")":{"value":""},"Shared chart (share: true)":{"value":{"id":"cq-a1b2c3d4-e5f6-7890-abcd-ef1234567890","view_url":"https://api.chartquery.com/v1/chart/view/cq-a1b2c3d4-e5f6-7890-abcd-ef1234567890","embed_url":"","expires_in":"3 days","render_url":"https://api.chartquery.com/v1/chart/render/cq-a1b2c3d4-e5f6-7890-abcd-ef1234567890"}}}}}},"400":{"description":"Bad Request — missing or invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Bad Request"}}}},"500":{"description":"Internal Server Error — something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Internal Error"}}}}}},"get":{"summary":"Chart","description":"Render a Chart.js image via GET. Pass the full chart object as URL-encoded JSON in query. Prefer format png for ChatGPT. POST sends the same object as a JSON body, not query.\n\n**Credit cost:** 5 credits per call","operationId":"get-chart","security":[],"parameters":[{"name":"query","in":"query","required":true,"description":"Full chart config as URL-encoded JSON. Pass `?version=` or `?v=` separately to pin the chart version.\n\n**Bar chart** (copy & paste as ?query=):\n`{\"type\":\"bar\",\"title\":\"Monthly Sales\",\"legend\":\"bottom\",\"width\":1200,\"height\":600,\"device_pixel_ratio\":1,\"data\":{\"labels\":[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\"],\"datasets\":[{\"label\":\"2025\",\"data\":[42,58,37,65,49,72],\"backgroundColor\":\"rgba(99,102,241,0.85)\"},{\"label\":\"2026\",\"data\":[51,67,44,71,58,85],\"backgroundColor\":\"rgba(249,115,22,0.85)\"}]},\"scales\":{\"y\":{\"beginAtZero\":true}}}`\n\n**Line chart** (dual Y-axis):\n`{\"type\":\"line\",\"title\":\"Revenue vs Conversion\",\"legend\":\"top\",\"width\":1200,\"height\":600,\"device_pixel_ratio\":1,\"data\":{\"labels\":[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\"],\"datasets\":[{\"label\":\"Revenue (€)\",\"data\":[12000,18500,15200,21800,9300,17400],\"borderColor\":\"#6366f1\",\"tension\":0.4,\"fill\":false,\"yAxisID\":\"y\"},{\"label\":\"Conversion (%)\",\"data\":[3.2,4.1,2.8,5.0,1.9,3.7],\"borderColor\":\"#f97316\",\"tension\":0.4,\"fill\":false,\"yAxisID\":\"y2\"}]},\"scales\":{\"y\":{\"position\":\"left\"},\"y2\":{\"position\":\"right\",\"grid\":{\"display\":false}}}}`\n\n**Stacked area chart**:\n`{\"type\":\"area\",\"title\":\"API Usage by Brand\",\"legend\":\"top\",\"width\":1200,\"height\":600,\"device_pixel_ratio\":1,\"data\":{\"labels\":[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\"],\"datasets\":[{\"label\":\"CaptureKit\",\"data\":[12400,18900,14300,21500,9800,16200],\"borderColor\":\"#6366f1\",\"backgroundColor\":\"rgba(99,102,241,0.35)\",\"tension\":0.4,\"stack\":\"total\"},{\"label\":\"ChartQuery\",\"data\":[3200,6900,11500,8300,14700,9800],\"borderColor\":\"#22c55e\",\"backgroundColor\":\"rgba(34,197,94,0.35)\",\"tension\":0.4,\"stack\":\"total\"}]},\"scales\":{\"y\":{\"stacked\":true,\"beginAtZero\":true}}}`\n\n**Doughnut chart**:\n`{\"type\":\"doughnut\",\"title\":\"Traffic Sources\",\"legend\":\"right\",\"width\":800,\"height\":500,\"device_pixel_ratio\":1,\"data\":{\"labels\":[\"Organic\",\"Paid\",\"Direct\",\"Referral\",\"Social\"],\"datasets\":[{\"data\":[38,24,18,12,8],\"backgroundColor\":[\"#6366f1\",\"#f97316\",\"#22c55e\",\"#ef4444\",\"#eab308\"],\"borderWidth\":2,\"borderColor\":\"#ffffff\"}]}}`\n\n**Radar chart**:\n`{\"type\":\"radar\",\"title\":\"Performance v1 vs v2\",\"legend\":\"top\",\"width\":800,\"height\":700,\"device_pixel_ratio\":1,\"data\":{\"labels\":[\"Speed\",\"Reliability\",\"Security\",\"UX\",\"Scalability\"],\"datasets\":[{\"label\":\"v1\",\"data\":[65,70,80,60,75],\"borderColor\":\"#6366f1\",\"backgroundColor\":\"rgba(99,102,241,0.25)\"},{\"label\":\"v2\",\"data\":[88,92,90,85,95],\"borderColor\":\"#f97316\",\"backgroundColor\":\"rgba(249,115,22,0.25)\"}]}}`\n\n**SVG output** (add `\"format\":\"svg\"` to any example above for infinitely scalable output).","schema":{"type":"string","description":"Full chart config as URL-encoded JSON. Pass `?version=` or `?v=` separately to pin the chart version.\n\n**Bar chart** (copy & paste as ?query=):\n`{\"type\":\"bar\",\"title\":\"Monthly Sales\",\"legend\":\"bottom\",\"width\":1200,\"height\":600,\"device_pixel_ratio\":1,\"data\":{\"labels\":[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\"],\"datasets\":[{\"label\":\"2025\",\"data\":[42,58,37,65,49,72],\"backgroundColor\":\"rgba(99,102,241,0.85)\"},{\"label\":\"2026\",\"data\":[51,67,44,71,58,85],\"backgroundColor\":\"rgba(249,115,22,0.85)\"}]},\"scales\":{\"y\":{\"beginAtZero\":true}}}`\n\n**Line chart** (dual Y-axis):\n`{\"type\":\"line\",\"title\":\"Revenue vs Conversion\",\"legend\":\"top\",\"width\":1200,\"height\":600,\"device_pixel_ratio\":1,\"data\":{\"labels\":[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\"],\"datasets\":[{\"label\":\"Revenue (€)\",\"data\":[12000,18500,15200,21800,9300,17400],\"borderColor\":\"#6366f1\",\"tension\":0.4,\"fill\":false,\"yAxisID\":\"y\"},{\"label\":\"Conversion (%)\",\"data\":[3.2,4.1,2.8,5.0,1.9,3.7],\"borderColor\":\"#f97316\",\"tension\":0.4,\"fill\":false,\"yAxisID\":\"y2\"}]},\"scales\":{\"y\":{\"position\":\"left\"},\"y2\":{\"position\":\"right\",\"grid\":{\"display\":false}}}}`\n\n**Stacked area chart**:\n`{\"type\":\"area\",\"title\":\"API Usage by Brand\",\"legend\":\"top\",\"width\":1200,\"height\":600,\"device_pixel_ratio\":1,\"data\":{\"labels\":[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\"],\"datasets\":[{\"label\":\"CaptureKit\",\"data\":[12400,18900,14300,21500,9800,16200],\"borderColor\":\"#6366f1\",\"backgroundColor\":\"rgba(99,102,241,0.35)\",\"tension\":0.4,\"stack\":\"total\"},{\"label\":\"ChartQuery\",\"data\":[3200,6900,11500,8300,14700,9800],\"borderColor\":\"#22c55e\",\"backgroundColor\":\"rgba(34,197,94,0.35)\",\"tension\":0.4,\"stack\":\"total\"}]},\"scales\":{\"y\":{\"stacked\":true,\"beginAtZero\":true}}}`\n\n**Doughnut chart**:\n`{\"type\":\"doughnut\",\"title\":\"Traffic Sources\",\"legend\":\"right\",\"width\":800,\"height\":500,\"device_pixel_ratio\":1,\"data\":{\"labels\":[\"Organic\",\"Paid\",\"Direct\",\"Referral\",\"Social\"],\"datasets\":[{\"data\":[38,24,18,12,8],\"backgroundColor\":[\"#6366f1\",\"#f97316\",\"#22c55e\",\"#ef4444\",\"#eab308\"],\"borderWidth\":2,\"borderColor\":\"#ffffff\"}]}}`\n\n**Radar chart**:\n`{\"type\":\"radar\",\"title\":\"Performance v1 vs v2\",\"legend\":\"top\",\"width\":800,\"height\":700,\"device_pixel_ratio\":1,\"data\":{\"labels\":[\"Speed\",\"Reliability\",\"Security\",\"UX\",\"Scalability\"],\"datasets\":[{\"label\":\"v1\",\"data\":[65,70,80,60,75],\"borderColor\":\"#6366f1\",\"backgroundColor\":\"rgba(99,102,241,0.25)\"},{\"label\":\"v2\",\"data\":[88,92,90,85,95],\"borderColor\":\"#f97316\",\"backgroundColor\":\"rgba(249,115,22,0.25)\"}]}}`\n\n**SVG output** (add `\"format\":\"svg\"` to any example above for infinitely scalable output)."}},{"name":"version","in":"query","required":false,"description":"Chart.js version to use. Alias: ?v=. Only v4.x is supported. Defaults to the installed version (4.5.1). Example: \"4\", \"4.5\", \"4.5.1\". The installed version is always returned in the X-ChartJS-Version response header.","schema":{"type":"string","default":"4.5.1","description":"Chart.js version to use. Alias: ?v=. Only v4.x is supported. Defaults to the installed version (4.5.1). Example: \"4\", \"4.5\", \"4.5.1\". The installed version is always returned in the X-ChartJS-Version response header."}},{"name":"share","in":"query","required":false,"description":"If true, persist the result and return share URLs instead of an image. Leave false to get the image.","schema":{"type":"boolean","description":"If true, persist the result and return share URLs instead of an image. Leave false to get the image."}},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/is_async"},{"$ref":"#/components/parameters/soft_fail"}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{}}}},"400":{"description":"Bad Request — missing or invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Bad Request"}}}},"500":{"description":"Internal Server Error — something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Internal Error"}}}}}}},"/v1/jobs/{id}":{"get":{"summary":"Jobs","description":"Poll the status, progress (0–100) and result of a job started with `is_async=true`. Polling is free. Poll until `status` is terminal: `CompletedJob`, `Error`, `NotFound` or `BadRequest`.","operationId":"jobs-id","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The `job_id` returned by an endpoint called with `is_async=true`.","schema":{"type":"string"}}],"responses":{"200":{"description":"Job status, with the result once `status` is `CompletedJob`.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"success":{"type":["boolean","null"]},"status":{"type":"string","enum":["Queued","Running","CompletedJob","Error","NotFound","BadRequest"]},"endpoint":{"type":"string"},"created_at":{"type":"string"},"started_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"duration_ms":{"type":["number","null"]},"args":{"type":"object"},"result":{},"progress":{"type":["integer","null"]}}}}}},"400":{"description":"Bad Request — missing or invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Bad Request"}}}},"401":{"description":"Unauthorized — the API key is missing, invalid, inactive, or expired, or a rate limit was exceeded (`Rate limit exceeded…` message).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"invalidKey":{"value":{"error":"Invalid API Key"}},"planRateLimit":{"value":{"error":"Rate limit exceeded: You've exceeded the per second rate limit on your subscription"}},"keyQuota":{"value":{"error":"Rate limit exceeded for the API key: quota monthly"}}}}}},"402":{"description":"Payment Required — your subscription or credit balance is insufficient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Payment required"}}}},"404":{"description":"Not Found — no job with this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Job or content not found"}}}},"500":{"description":"Internal Server Error — something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Internal Error"}}}}}}}},"components":{"parameters":{"fields":{"name":"fields","in":"query","required":false,"description":"Comma-separated list of response fields to return, with dot notation for nested fields (e.g. `name,location.city`).","schema":{"type":"string"}},"is_async":{"name":"is_async","in":"query","required":false,"description":"Run the request as a background job: the API answers `202` with a `job_id` to poll on `GET /v1/jobs/{id}`.","schema":{"type":"boolean","default":false}},"soft_fail":{"name":"soft_fail","in":"query","required":false,"description":"Return HTTP 200 even when the request fails; the error is in the `error` field of the body.","schema":{"type":"boolean","default":false}}},"schemas":{"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable error message."}}}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your API key. Include it in the x-api-key header for every request."}}}}
Domain: app.chartquery.com
IPv4 address: 104.21.95.9
Links:
| Server | cloudflare |
| Content-Type | application/json; charset=utf-8 |