AI Analysis API

AI-powered analysis tools — sentiment, themes, classification, insights, and more.

AI Analysis API

Tabular Pro's AI analysis endpoints use Claude to analyze survey responses. These operations consume AI credits from your account balance.

All AI endpoints follow the pattern:

POST /api/responses/:surveyId/ai/{operation}

Sentiment Analysis

POST /api/responses/:surveyId/ai/sentiment

Analyzes text responses and classifies each into positive, negative, or neutral sentiment with confidence scores.

Field Type Required Description
question_id integer Yes Question with text responses

Example:

curl -X POST \
  -H "X-API-Key: tp_your_key" \
  -H "Content-Type: application/json" \
  -d '{"question_id": 5}' \
  https://tabularpro.com/api/responses/1/ai/sentiment

Theme Extraction

POST /api/responses/:surveyId/ai/themes

Identifies recurring themes and topics across text responses.

Field Type Required Description
question_id integer Yes Question with text responses

Text Classification

POST /api/responses/:surveyId/ai/classify

Classifies text responses into categories. Provide your own categories or let AI suggest them.

Field Type Required Description
question_id integer Yes Question with text responses
categories string[] No Category labels; AI suggests if omitted

Auto-Categorization

POST /api/responses/:surveyId/ai/suggest-categories

AI automatically identifies and suggests category groupings for open-ended responses.

Field Type Required Description
question_id integer Yes Question to categorize

Summarization

POST /api/responses/:surveyId/ai/summarize

Generates a concise AI summary of all text responses for a question.

Field Type Required Description
question_id integer Yes Question to summarize

Insight Generation

POST /api/responses/:surveyId/ai/insights

Generates actionable insights and key findings from the survey data.

Field Type Required Description
question_ids integer[] No Focus on specific questions

Anomaly Detection

POST /api/responses/:surveyId/ai/anomalies

Detects statistical anomalies, outliers, and unusual patterns in the response data.

Translation

POST /api/responses/:surveyId/ai/translate

Translates text responses to a target language.

Field Type Required Description
question_id integer Yes Question with text responses
target_language string Yes Target language code (e.g., en, pt, es, de)

AI Chat

Create Chat Session

POST /api/ai/sessions

Creates a new AI chat session scoped to your survey data.

List Sessions

GET /api/ai/sessions

Get Session with Messages

GET /api/ai/sessions/:uuid

Chat (Streaming)

POST /api/ai/chat

Sends a message to the AI assistant. Returns a Server-Sent Events (SSE) stream.

Field Type Required Description
message string Yes User message
session_id string No Session UUID for context
survey_id integer No Survey context

Delete Session

DELETE /api/ai/sessions/:uuid

AI Credits

AI operations consume credits based on token usage. Monitor your balance:

GET /api/billing/balance
GET /api/billing/credits
GET /api/billing/usage

Purchase additional credits from the billing page or via:

POST /api/billing/create-credits-checkout