The Assistant API lets you interact with PG:AI’s AI-powered research assistant programmatically. Ask questions about a company’s strategy, competitive landscape, technology stack, and more - and receive contextual, intelligence-backed answers.
Send Chat Message
Send a message to the assistant in the context of a specific company. You can start a new conversation or continue an existing one by providing a conversation_id.
The unique identifier (UUID) of the company to ask about.
The message to send to the assistant.
An existing conversation ID to continue a multi-turn conversation. Omit to start a new conversation.
Permission: insights:read
curl -X POST "https://api.pipelinegeneration.ai/v1/companies/{company_id}/assistant/chat" \
-H "x-api-key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"message": "What are the main strategic priorities for this company?"
}'
{
"conversation_id": "conv_abc123",
"message": {
"role": "assistant",
"content": "Based on my analysis of Acme Corporation, their main strategic priorities include:\n\n1. **Cloud Migration** - Acme is actively migrating their on-premise infrastructure to cloud-native solutions...\n\n2. **AI Integration** - They've announced plans to embed AI capabilities across their product suite...\n\n3. **APAC Expansion** - Recent job postings and press releases indicate a push into the Asia-Pacific market...",
"sources": [
{ "title": "Acme Q4 Earnings Call", "url": "https://..." },
{ "title": "Acme Careers Page", "url": "https://acme.com/careers" }
]
},
"created_at": "2026-03-12T10:00:00Z"
}
Continuing a Conversation
To continue a multi-turn conversation, pass the conversation_id from a previous response:
curl -X POST "https://api.pipelinegeneration.ai/v1/companies/{company_id}/assistant/chat" \
-H "x-api-key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"message": "How does this compare to their competitors?",
"conversation_id": "conv_abc123"
}'
Assistant responses may take up to 2 minutes as the AI processes your question against the company’s intelligence data. Set your HTTP client timeout to at least 120 seconds.
List Conversations
Retrieve a paginated list of assistant conversations for a specific company.
The unique identifier (UUID) of the company.
Page number for pagination.
Number of conversations per page.
Permission: insights:read
curl -X GET "https://api.pipelinegeneration.ai/v1/companies/{company_id}/assistant/conversations?page=1&per_page=10" \
-H "x-api-key: your_api_key"
{
"data": [
{
"id": "conv_abc123",
"title": "Strategic priorities analysis",
"message_count": 4,
"created_at": "2026-03-12T10:00:00Z",
"updated_at": "2026-03-12T10:15:00Z"
},
{
"id": "conv_def456",
"title": "Competitive landscape review",
"message_count": 2,
"created_at": "2026-03-11T14:00:00Z",
"updated_at": "2026-03-11T14:10:00Z"
}
],
"pagination": {
"page": 1,
"per_page": 10,
"total": 2
}
}
Get Conversation
Retrieve a specific conversation with its full message history.
The unique identifier (UUID) of the company.
The unique identifier of the conversation.
Permission: insights:read
curl -X GET "https://api.pipelinegeneration.ai/v1/companies/{company_id}/assistant/conversations/{conversation_id}" \
-H "x-api-key: your_api_key"
{
"id": "conv_abc123",
"company_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"title": "Strategic priorities analysis",
"messages": [
{
"role": "user",
"content": "What are the main strategic priorities for this company?",
"created_at": "2026-03-12T10:00:00Z"
},
{
"role": "assistant",
"content": "Based on my analysis of Acme Corporation, their main strategic priorities include...",
"sources": [
{ "title": "Acme Q4 Earnings Call", "url": "https://..." }
],
"created_at": "2026-03-12T10:00:30Z"
},
{
"role": "user",
"content": "How does this compare to their competitors?",
"created_at": "2026-03-12T10:05:00Z"
},
{
"role": "assistant",
"content": "Comparing Acme's strategic priorities with key competitors...",
"created_at": "2026-03-12T10:05:45Z"
}
],
"created_at": "2026-03-12T10:00:00Z",
"updated_at": "2026-03-12T10:05:45Z"
}