# QuickChart Agent Notes QuickChart is an HTTP API for generating static images of Chart.js charts, QR codes, and barcodes. It is commonly used in email, SMS, PDFs, chatbots, automation tools, and reports where client-side rendering is not available. ## Request guidance - Prefer POST JSON for generated chart configs. GET URLs are useful for small hand-written examples, but agents often produce configs that are too long or need URL encoding. - Validate before retrying. Use /api/validate-chart for chart configs and /api/validate-qr for QR payloads to get structured JSON errors. - Use /openapi.json for parameter names, response types, and limits. - For charts, send Chart.js config in the chart field. If the config contains Javascript functions, send chart as a string. - Set version to "4" for Chart.js v4 syntax. The default is Chart.js v2. - Set format to png unless the caller asks for svg, webp, jpg, pdf, or base64. - Include width and height explicitly when output dimensions matter. - Use Authorization: Bearer YOUR_API_KEY or the key field for authenticated requests. ## Chart examples POST https://quickchart.io/api/validate-chart ```json { "version": "4", "width": 700, "height": 360, "format": "png", "chart": { "type": "bar", "data": { "labels": ["Jan", "Feb", "Mar"], "datasets": [{ "label": "Revenue", "data": [120, 150, 180] }] } } } ``` POST https://quickchart.io/chart with the same body to receive image bytes. ## QR examples POST https://quickchart.io/api/validate-qr ```json { "text": "https://example.com", "format": "png", "size": 300, "margin": 4 } ``` POST https://quickchart.io/qr with the same body to receive image bytes. ## Natural-language chart generation POST https://quickchart.io/natural/config ```json { "description": "bar chart showing revenue Jan-Mar with values 120, 150, 180", "width": 700, "height": 360, "backgroundColor": "white" } ``` The response includes a generated Chart.js config string, a saved chart image URL, and a chart editor URL. Treat generated configs as drafts and validate them before embedding in production workflows.