Vectorize each competitor’s homepage and pricing page. The node_id ties chunks back to the source node.
curl -X POST https://api.chatgrid.ai/v1/boards/{boardId}/documents/vectorize \ -H "Authorization: Bearer cgk_live_..." \ -H "Content-Type: application/json" \ -d '{"url": "https://competitor-a.com", "node_id": "{nodeIdA}", "metadata": {"source": "competitor-a", "type": "homepage"}}'# Repeat for /pricing, and for competitors B and C
Create a chat thread and ask a cross-competitor question.
# Create a chat threadcurl -X POST https://api.chatgrid.ai/v1/boards/{boardId}/chats \ -H "Authorization: Bearer cgk_live_..." \ -H "Content-Type: application/json" \ -d '{"title": "Competitive Analysis"}'# Ask the comparison question (use chatId from above)curl -X POST https://api.chatgrid.ai/v1/boards/{boardId}/chats/{chatId}/messages \ -H "Authorization: Bearer cgk_live_..." \ -H "Content-Type: application/json" \ -d '{ "content": "Compare the positioning and pricing of all three competitors. What does each one emphasize? Where are the gaps we could exploit?", "stream": false }'
The AI searches all vectorized content and responds with sourced comparisons.
When you vectorize a URL, ChatGrid fetches the page, splits it into overlapping chunks, and generates embeddings stored in pgvector. Each chunk is tagged with the node_id and metadata you provide, so search results trace back to their source. When AI answers a question, it performs semantic search across all vectorized content on the board and uses the top matches as grounded context. Edges between nodes create a traversable graph from findings back to evidence.