ai

Generate Insight

Generate configuration from natural language prompt.

This endpoint converts a user's natural language description into a structured configuration with query_config (source and steps).

Mode determines the output optimization:

  • 'insight': Optimized for visualization, includes chart_type
  • 'data_model': Optimized for data transformation, no chart_type
post/ai/generate-insight

Request

  • Base URL: https://api.pandas-ai.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.pandas-ai.com/ai/generate-insight
  • Auth: none declared

Request body

modestring required

Generation mode: 'insight' for charts, 'data_model' for transformations

source_idstring required

Source ID for schema lookup

promptstring required

User's natural language request

Response

Successful Response

namestring

Internal snake_case identifier

titlestring

Display title (sentence case)

chart_typestring nullable

Chart type (only for insight mode): kpi, bar, line, pie, etc.

query_configobject

Query configuration with source and steps

iconstring nullable

FontAwesome icon class (for KPIs)

rejectedboolean

True if the request was rejected by guardrail (not data-related)

messagestring nullable

AI message when rejected (explains why and suggests alternatives)

Changes

No recorded changes to this operation across all 1 revision of this API.