LLM Provider APIs
This page explains how Vantage integrates with each AI provider's API, covering authentication, request methods, and the technical details of how data flows between Vantage and the LLM providers.
Architecture
When you use any AI feature in Vantage, the platform:
- Assembles context — gathers relevant data (tile data, context snippets, custom instructions)
- Constructs a prompt — builds a structured message array with system and user messages
- Sends the request — calls the selected provider's API with your credentials
- Processes the response — parses the result and renders it in the UI or workflow
Vantage Client → Vantage API → Provider API → LLM
↑ │
└────────────── Response ◄────────────────────────┘
All communication between Vantage and LLM providers happens server-side. Your API keys and data never pass through the user's browser.
Authentication
Each provider uses API key-based authentication. Vantage stores your credentials encrypted and includes them in the Authorization header when making API requests.
| Provider | Auth Header Format |
|---|---|
| OpenAI | Authorization: Bearer sk-... |
| Claude | x-api-key: sk-ant-... |
| Gemini | API key as query parameter |
| DeepSeek | Authorization: Bearer sk-... |
| Grok | Authorization: Bearer xai-... |
| Mistral | Authorization: Bearer ... |
| Intuidy AI | Managed internally — no user credentials needed |
API Methods
Chat Completion
The primary API method used by the Global AI Assistant, Popup AI Chat, and most workflow nodes.
How it works:
- Vantage constructs a message array (system prompt + user message + conversation history)
- The request is sent to the provider's chat completion endpoint
- The response is parsed and returned to the user
Key parameters sent:
| Parameter | Description | Default |
|---|---|---|
model | The selected model ID | Varies by provider |
messages | Array of {role, content} message objects | Required |
max_tokens | Maximum response length | 500–1000 depending on use |
temperature | Randomness control (0 = deterministic, 1 = creative) | 0.7 |
Streaming Chat Completion
Used by the AI Assistant and Popup AI Chat for real-time, token-by-token responses. The response streams back as Server-Sent Events (SSE), displayed incrementally in the UI.
Benefits:
- Faster perceived response time
- Users can read partial results while generation continues
- Can be cancelled mid-stream
Summary Generation
Used by Tile Summaries. A specialized request format that includes tile metadata:
- Tile title and type (bar, line, table, waterfall, etc.)
- The tile's dataset (or a sample if large)
- Visualization configuration (axes, groupings, filters)
- Organization context snippets
The provider returns a concise, plain-language summary of what the data shows.
Provider-Specific Endpoints
| Provider | Base URL | Chat Endpoint |
|---|---|---|
| OpenAI | https://api.openai.com/v1 | /chat/completions |
| Claude | https://api.anthropic.com/v1 | /messages |
| Gemini | https://generativelanguage.googleapis.com | /v1beta/models/{model}:generateContent |
| DeepSeek | https://api.deepseek.com/v1 | /chat/completions |
| Grok | https://api.x.ai/v1 | /chat/completions |
| Mistral | https://api.mistral.ai/v1 | /chat/completions |
Most providers follow the OpenAI-compatible API format, making it straightforward for Vantage to support them with minimal differences in request construction.
Data Sent to Providers
When Vantage makes an API request, the following data may be included:
| Data Type | When Included | Purpose |
|---|---|---|
| User message | Always | The question or instruction |
| System prompt | Always | Establishes AI's role and behavior |
| Context snippets | When enabled | Company overview, industry, custom instructions |
| Tile data | Tile summaries, popup chat | The dataset being analyzed |
| Tile metadata | Tile summaries, popup chat | Title, chart type, axis configuration |
| Conversation history | Multi-turn conversations | Previous messages for continuity |
| Workflow row data | Workflow AI nodes | The data rows being processed |
Important: Only the minimum data necessary is sent. Vantage does not send your full database, account information, or credentials to AI providers.
Error Handling
Common API errors and how Vantage handles them:
| Error | Cause | Vantage Behavior |
|---|---|---|
401 Unauthorized | Invalid or expired API key | Displays error message prompting re-authentication |
429 Rate Limited | Too many requests per minute | Retries with exponential backoff |
500 Server Error | Provider outage | Displays error with option to retry |
Timeout | Provider took too long to respond | Displays timeout message; suggests reducing data volume |
Context Length Exceeded | Request too large for model | Automatically truncates and retries, or suggests enabling data sampling |
Model Listing
Vantage automatically fetches available models from each connected provider. You can refresh the model list at any time from Settings → AI Features → Intuidy AI by clicking the refresh icon next to the provider.