Wren AI offers powerful visualization capabilities that transform your data into insightful charts through a simple API interface. Generate interactive charts — Apache ECharts on v2 or Vega-Lite on v1 — directly from natural language questions and SQL queries.
Project availability: ✅ Classic projects • ✅ Agentic projects
Chart generation works for both project types. New projects (classic and agentic) render charts as Apache ECharts via /v2/generate_chart; pre-existing projects continue to use Vega-Lite via the legacy /v1/generate_vega_chart.
Endpoint Overview
POST /v2/generate_chart: Generate an Apache EChartsoptionwith the executed rows embedded indataset.sourcefor visualization. Recommended.POST /v1/generate_vega_chart: Generate a complete Vega-Lite specification with embedded data for visualization. (Legacy — v1 only.)
Chart Generation Workflow
The chart generation process follows a simple flow:
- Ask a question via
/v2/generate_sqlto get SQL - Request a visualization with your question and SQL — via
/v2/generate_chart(ECharts) or/v1/generate_vega_chart(Vega-Lite) - Render the returned chart specification in your application
