Skip to main content
ClaudeChatGPT

API Access Overview

Wren AI API access lets you embed agentic analysis, natural-language SQL generation, and chart generation into your own applications.

Agentic Mode is available over the API

Agentic projects can run full agent turns over the API - see Agentic Mode. The SQL generation and chart generation endpoints run in Interactive Mode and work with classic projects.

Plan support

Only in Essential Cloud plan and above

Available API capabilities

Wren AI currently provides three main API capabilities:

Agentic Mode

Run a full agent turn against an agentic project and stream it back. Unlike the endpoints below, you do not tell the agent how to answer - it plans, queries your data, runs SQL, draws charts, writes files, and can pause mid-turn to ask you a clarifying question. This endpoint enables you to:

  • Stream a turn over Server-Sent Events
  • Answer a clarification question mid-turn, or cancel a running turn
  • Read back a thread's files, memory, and history

Learn more about agentic mode in our API Reference, or start from the demo app.

SQL Generation

Convert natural language questions into SQL queries. This endpoint allows you to:

  • Generate SQL from natural language questions
  • Execute queries and get results
  • Maintain conversation context for follow-up questions

Learn more about SQL generation in our API Reference.

Chart Generation

Create beautiful, interactive visualizations from your query results. This endpoint enables you to:

  • Generate Vega-Lite chart specifications
  • Create visualizations from natural language questions
  • Embed interactive charts in your applications

Learn more about chart generation in our API Reference.

Getting Started

To start using Wren AI's API:

  1. Get your API key
  2. Follow our Quick Start guide
  3. Monitor your API usage in the API History

For detailed API documentation, including request/response formats and examples, visit our API Reference.