FireSiteChat
โ† Docs

API

Ask a website questions from your own code, and get back the answer plus the pages it came from.

1. Get a key

Sign in, then open Profile & settings โ†’ API & MCP and create one. The key is shown once: we store a one-way hash of it and cannot show it again. If you lose it, revoke it and create another.

Each key carries scopes, and can be restricted to particular websites. A key never widens what your account can do - it is a way to sign in, not extra authority.

ScopeWhat it allows
readList websites, read an indexed page, read your usage
searchRetrieve passages from a website's index
answerAsk a grounded question (spends AI credits)
writeAdd, remove and re-index websites (starts a crawl)

Send it as a bearer token, or as X-API-Key if your client only offers a custom header:

Authorization: Bearer fsc_sk_...

2. Ask a question

curl -X POST https://firesitechat.com/api/v1/answer \
  -H "Authorization: Bearer $FSC_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{"domain":"example.com","message":"What are your opening hours?"}
JSON
{
  "answer": "We're open 9am-5pm Monday to Friday...",
  "grounded": null,
  "engine": "lite",
  "model": "...",
  "sources": [{"url": "https://example.com/contact", "title": "Contact us"}],
  "usage": {"input": 1840, "output": 96, "total": 1936, "llm_calls": 1},
  "creditsSpentMc": 2104,
  "chatId": "api-9f2c..."
}

What the fields mean

FieldMeaning
verificationpassed, failed, or not_attempted. Read this one. The fast engine runs no checking agent at all, so "not verified" and "not checked" are different facts and this names which.
groundedThe same fact as a tri-state boolean: true/false/null. null is not_attempted - kept for callers already reading it.
sourcesThe pages the answer was built from. An empty list means nothing grounded the answer - trust this over any "Sources:" line in the text.
creditsSpentMcWhat this answer cost, in milli-credits (1,000 = 1 credit).
chatIdPass it back as chat_id to ask a follow-up with the previous turns in context. One conversation is bound to one website.

Your history

API and MCP answers are saved to your account's chat history by default and appear in the dashboard sidebar, marked { } (API) or ๐Ÿค– (a connected assistant), so you can see what your integrations asked. Send "save": false for a one-shot that leaves no trace.

Verified answers

Add "engine":"agentic" to run the checking agent. It is slower and roughly three times the cost, and it is the only way grounded becomes true.

Streaming

POST /api/v1/answer/stream returns the same answer as Server-Sent Events, so the first words arrive in well under a second. Event types: start, notice, answer_delta, draft, verdict, answer, done, error.

3. Search and read the content yourself

curl -X POST https://firesitechat.com/api/v1/search \
  -H "Authorization: Bearer $FSC_KEY" -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{"domain":"example.com","query":"opening hours","k":6}
JSON

Returns the passages with their source URLs and scores - no model in the loop. GET /api/v1/sites/{domain}/pages lists what we hold, and GET /api/v1/sites/{domain}/pages/{pageId} returns one page's text.

That page response reports chunkCount (what the page claims) and chunksHeld (what actually came back), so a half-failed indexing run shows as a mismatch rather than as an innocent-looking short page.

Which websites you can search and read

The two calls answer to different rules, on purpose.

If you run a website and would rather it were not readable this way, the opt-out in your console removes it from the public directory, which closes the page-level calls to everyone but you. It does not close search: passages from an indexed website stay retrievable by any key. Content we index is content your website already serves publicly, and we crawl only what robots.txt allows.

4. Manage websites

CallWhat it does
GET /api/v1/sitesYour websites, each with its live index status
GET /api/v1/sites/{domain}Status, coverage, page and chunk counts
POST /api/v1/sitesAdd a website and start its first crawl (write)
POST /api/v1/sites/{domain}/reindexRe-crawl and re-embed now (write, owner only)
DELETE /api/v1/sites/{domain}Remove it from your list (write)

Indexing runs in the background - poll GET /api/v1/sites/{domain} until status is ready. Removing a website does not delete its index: it is shared with everyone else asking about that domain, and re-adding would pay for the crawl again.

Errors

StatusMeaning
401No key, or the key is unknown or revoked
403The key lacks the scope, or is restricted to other websites
404That website is not indexed (the body says what to do)
402Out of AI credits, or a spend ceiling was hit. The body carries a reason and a sentence
422The body did not validate
429Rate limited - honour Retry-After

"Field required" for fields you did send

Your shell received typographic quotes (โ€œ โ€) instead of ", which happens when a command is copied out of a rendered document. The JSON still parses, but into a single field name, so the fields really are missing. On macOS, turn off System Settings โ†’ Keyboard โ†’ Text Input โ†’ Input Sources โ†’ Edit โ†’ Use smart quotes and dashes. The heredoc form used above is immune to the shell, and this check is definitive:

grep -q $'[โ€˜โ€™โ€œโ€]' body.json && echo "BAD: curly quotes" || echo "OK"

Reference

The complete, always-current reference is generated from the server itself: interactive docs ยท OpenAPI document.

Trying calls from the browser: open the interactive docs, click Authorize (top right), paste your key, then Try it out โ†’ Execute on any endpoint. The key is remembered while the tab is open, and the panel shows you the exact curl for whatever you just ran.

Guide ยท MCP & ChatGPT ยท Get a key