Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.chatgrid.ai/llms.txt

Use this file to discover all available pages before exploring further.

What you’ll build

A board that ingests competitor websites, makes them searchable, and lets you ask AI to compare positioning across all competitors at once.
  • Add competitor websites as visual nodes
  • Vectorize content for semantic search
  • Ask AI to compare positioning and pricing
  • Create summary sticky notes linked to sources

Prerequisites

  • ChatGrid API key (get one here)
  • Node.js 18+ or Python 3.10+

Step 1: Create a board

curl -X POST https://api.chatgrid.ai/v1/boards \
  -H "Authorization: Bearer cgk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "Competitive Intel — Q1 2026"}'
Save the board_id from the response.

Step 2: Add competitor website nodes

Batch-create a node for each competitor in one request.
cURL
curl -X POST https://api.chatgrid.ai/v1/boards/{boardId}/nodes/batch \
  -H "Authorization: Bearer cgk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "operations": [
      {"action": "create", "data": {"type": "website", "position": {"x": 0, "y": 0}, "data": {"url": "https://competitor-a.com", "label": "Competitor A"}}},
      {"action": "create", "data": {"type": "website", "position": {"x": 400, "y": 0}, "data": {"url": "https://competitor-b.com", "label": "Competitor B"}}},
      {"action": "create", "data": {"type": "website", "position": {"x": 800, "y": 0}, "data": {"url": "https://competitor-c.com", "label": "Competitor C"}}}
    ]
  }'
Save the returned node IDs — you need them to link vectorized content.

Step 3: Vectorize competitor content

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

Step 4: Ask AI to compare positioning

Create a chat thread and ask a cross-competitor question.
# Create a chat thread
curl -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.

Step 5: Create summary sticky notes

Turn findings into visual sticky notes on the canvas.
cURL
curl -X POST https://api.chatgrid.ai/v1/boards/{boardId}/nodes/batch \
  -H "Authorization: Bearer cgk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "operations": [
      {"action": "create", "data": {"type": "sticky_note", "position": {"x": 200, "y": 400}, "data": {"label": "Key Finding", "content": "A targets enterprise, B targets SMBs, C is developer-first. Gap: mid-market team leads."}}},
      {"action": "create", "data": {"type": "sticky_note", "position": {"x": 600, "y": 400}, "data": {"label": "Pricing Insight", "content": "A: per-seat $49/mo. B: usage-based. C: generous free tier. Our opportunity: flat team pricing."}}}
    ]
  }'

Step 6: Connect findings to sources

Link summary nodes back to the competitors they reference.
cURL
curl -X POST https://api.chatgrid.ai/v1/boards/{boardId}/edges \
  -H "Authorization: Bearer cgk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"source_node_id": "{findingNodeId}", "target_node_id": "{competitorANodeId}", "data": {"label": "references"}}'

Step 7: Search across competitors

Run semantic searches to answer specific questions at any time.
cURL
curl -X POST https://api.chatgrid.ai/v1/boards/{boardId}/documents/search \
  -H "Authorization: Bearer cgk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"query": "which competitor offers an API?", "limit": 5}'

What’s happening under the hood

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.

Next steps

Synthesize Documents

Combine PDFs and reports into visual findings

Streaming Responses

Stream AI analysis in real time