Every endpoint and data type below is generated from the OpenAPI 3.1 spec, which is itself generated from the Zod schemas the server validates against — so this reference can never drift from the real contract.
POST/api/check
Fact-check a response
Extract claims from `response`, verify each against live evidence, and return the final Check. Non-streaming — the connection stays open until every verdict is ready. Use /api/check/stream to render verdicts as they land.
Same input as /api/check, streamed as Server-Sent Events. Each event is a PipelineEvent encoded as `data: <json>\n\n`. The terminal event is either `{ "type": "done", "check": Check }` or `{ "type": "error", ... }`.
# Same body as /api/check, but the response is an SSE stream
# (Content-Type: text/event-stream). Each event is `data: <PipelineEvent JSON>`.
curl -N https://fact-it-web-412159981305.us-central1.run.app/api/check/stream \
-H 'Authorization: Bearer fk_your_token' \
-H 'Content-Type: application/json' \
-d '{ "response": "The Eiffel Tower is 984 feet tall." }'
POST/api/feedback
Rate a check
Submit an anonymous thumbs up/down on a check. Fire-and-forget; returns 202 and stores no account id (see the Feedback schema).
Plan and remaining credits for the authenticated caller. The one /api/account route that accepts an API token (read-only); the others require a session cookie.
Auth: Required — Bearer token
Responses
Status
Description
200
Current usage summary.
401
Missing or invalid credential.
503
Temporarily unavailable; retry.
200 body — UsageSummary
Field
Type
Required
Details
plan
string
required
Plan identifier, e.g. "free" or "pro".
monthlyCreditAllowance
integer
required
Credits included with the plan each period. NOT the usable total on its own — add bonusCredits, or just read creditsRemaining.
bonusCredits
integer
optional
One-off credits granted on top of the plan allowance for the current period (e.g. an approved top-up request). Cleared when the period rolls over. Absent on older servers.
creditsUsed
integer
required
—
creditsRemaining
integer
required
monthlyCreditAllowance + bonusCredits - creditsUsed, floored at 0.
periodStart
string (date-time)
required
—
byokEnabled
boolean
required
Whether the caller has a bring-your-own-key verifier configured.
general | medical | legal | scientific | financial | news | personaldefault: general
span
Field
Type
Required
Details
start
integer
required
min: 0
end
integer
required
min: 0
CostSummary
Field
Type
Required
Details
usd
number
required
min: 0
inputTokens
integer
required
min: 0
outputTokens
integer
required
min: 0
cacheReadTokens
integer
required
min: 0
cacheWriteTokens
integer
required
min: 0
searchCalls
integer
required
min: 0
UsageSummary
Field
Type
Required
Details
plan
string
required
Plan identifier, e.g. "free" or "pro".
monthlyCreditAllowance
integer
required
Credits included with the plan each period. NOT the usable total on its own — add bonusCredits, or just read creditsRemaining.
bonusCredits
integer
optional
One-off credits granted on top of the plan allowance for the current period (e.g. an approved top-up request). Cleared when the period rolls over. Absent on older servers.
creditsUsed
integer
required
—
creditsRemaining
integer
required
monthlyCreditAllowance + bonusCredits - creditsUsed, floored at 0.
periodStart
string (date-time)
required
—
byokEnabled
boolean
required
Whether the caller has a bring-your-own-key verifier configured.