sdk

Sdk Explain

Generate AI insights about query results.

DEPRECATED: SDK v1 is superseded by SDK v3 (POST /v3/sdk/step).

After executing a query locally, the SDK can send the results (first 50 rows) to get natural language insights about the data.

post/sdk/explain

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/sdk/explain
  • Auth: none declared

Request body

querystring required

Original natural language query

resultsobject[] required

Query results (first 50 rows max)

total_rowsinteger nullable

Total number of rows in the full result set, before the SDK truncated to 50 for transport. When provided and larger than len(results), the LLM is told it is reading a sample of N total rows so its narrative explicitly avoids asserting totals or distributions over rows it never saw. Defaults to len(results) when omitted (assumes the caller is sending the full set).

sqlstring nullable

SQL that was executed

dslobject nullable

DSL that was used

schemaobject nullable

Schema context

general_contextstring nullable

Additional context or instructions for the AI

languagestring nullable

Response language code (e.g., 'en', 'it', 'es')

Response

Successful Response

successboolean

Whether the request was successful

explanationstring required

Natural language insights about the data

Changes

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