Developer docs

Integrate Spectare in an afternoon

Two API calls. Your design system. Personalised pages for every visitor.

Quick start

01

Create a workspace

Sign up at spectare.ai. Your workspace is ready in seconds. Copy your QUALIFY_API_KEY from the admin settings page.

02

Write your atoms

In the admin UI, create content atoms — one feature, one FAQ, one pricing block each. Aim for 10 to start. The more atoms you have, the more precisely Spectare can personalise.

03

Qualify the visitor

When a visitor arrives, POST their conversation or a summary to /api/context/qualify with your API key. You get back a token and a landing page URL.

04

Send them to the landing page

Redirect the visitor to the returned URL or pass the token to your own frontend and call /api/assemble to stream the page content directly into your design system.

API reference

POST/api/context/qualify

Classify a visitor's intent. Returns a signed context token and a ready-to-use landing page URL.

Auth: Bearer QUALIFY_API_KEY

Request

{
  "summary": "developer evaluating headless CMS pricing",
  // or
  "conversation": [
    { "role": "user", "text": "How does the API work?" },
    { "role": "assistant", "text": "What are you building?" },
    { "role": "user", "text": "A SaaS product page" }
  ],
  "signals": {
    "pagesVisited": ["/pricing", "/docs"],
    "dwellSeconds": 120
  }
}

Response

{
  "token": "<signed-context-token>",
  "url": "https://spectare.ai/landing?ctx=<token>",
  "intent": {
    "type": "api-evaluation",
    "confidence": 0.92,
    "userContext": { "audience": "developer", "stage": "consideration" },
    "entities": {
      "products": ["Spectare"],
      "features": ["API", "pricing"],
      "useCases": ["SaaS product page"]
    }
  }
}
POST/api/assemble

Assemble a personalised page from a context token. Streams back sections as server-sent events.

Auth: None (rate limited by IP)

Request

{
  "token": "<signed-context-token>",
  "orgSlug": "your-org-slug"  // optional
}

Response

event: status
data: {"step":"Searching content atoms..."}

event: meta
data: {"template":"explainer","pageTitle":"...","pageSummary":"...","action":{...}}

event: section
data: {"slot":"primary","atoms":[{...}]}

event: section
data: {"slot":"supporting","atoms":[{...}]}

event: done
data: {"intent":{...},"cached":false,"assemblyTimeMs":180}

MCP server

Spectare exposes an MCP server at /api/mcp. AI agents can call qualify_visitor directly — no API key needed from the agent side.

MCP server URL

https://spectare.ai/api/mcp

Add this to your Claude Desktop or agent config as a Streamable HTTP MCP server.

Ready to build?

Create your free workspace