API Reference

Chart generation

Wren AI offers powerful visualization capabilities that transform your data into insightful charts through a simple API interface. Generate beautiful, interactive Vega-Lite charts directly from natural language questions and SQL queries.

Endpoint Overview

  • POST /generate_vega_chart: Generate a complete Vega-Lite specification with embedded data for visualization.

Chart Generation Workflow

The chart generation process follows a simple flow:

  1. Ask a question via /generate_sql to get SQL
  2. Request a visualization via /generate_vega_chart with your question and SQL
  3. Render the returned Vega specification in your application