RTFC API

Quickstart

A working fact-check, start to finish. You need an API token - create one in the dashboard under Settings → API Tokens.

bash
export RTFC=https://api.faktolumo.eu/v1
export TOKEN=rtfc_your_token_here

1. Create a debate

A debate holds a transcript and the claims found in it.

bash
curl -sX POST $RTFC/debates \
  -H "X-Auth-Token: $TOKEN" \
  -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
        "title": "My first check",
        "research_modes": ["two_step"],
        "language": "en",
        "country": "us"
      }'
json
{"id": "3f2b…", "title": "My first check", "research_modes": ["two_step"], …}

Keep that id. research_modes controls how hard claims get checked; country steers which sources are preferred.

2. Start a session

This spins up claim detection for the debate. Because you are supplying text yourself, use client-start - no audio, no transcription cost.

bash
curl -sX POST $RTFC/session/client-start \
  -H "X-Auth-Token: $TOKEN" -H 'Content-Type: application/json' \
  -d "{\"debate_id\": \"$DEBATE\", \"language\": \"en\"}"

Starting is asynchronous. Poll until it reports active:

bash
curl -s $RTFC/session/spawn-status/$DEBATE -H "X-Auth-Token: $TOKEN"
# {"status": "active"}

3. Send text

bash
curl -sX POST $RTFC/debates/$DEBATE/transcript-segment \
  -H "X-Auth-Token: $TOKEN" -H 'Content-Type: application/json' \
  -d '{"segments": [
        {"text": "The Eiffel Tower has stood in Berlin since 1889.", "language": "en"}
      ]}'
# {"published": 1}

Claims are extracted automatically. You do not tell the API what the claims are - that is its job.

4. Read the results

Claim detection and research take a few seconds to a few minutes depending on the research mode. List what was found:

bash
curl -s $RTFC/debates/$DEBATE/claims -H "X-Auth-Token: $TOKEN"

Then, for a claim id:

bash
curl -s $RTFC/claims/$CLAIM/best -H "X-Auth-Token: $TOKEN"
json
{
  "verdict": "false",
  "confidence": 0.97,
  "explanation": "The Eiffel Tower is in Paris, France...",
  "sources": [{"url": "...", "domain": "britannica.com", "trust_score": 0.9}],
  "rubric_version": "1.0",
  "rubric_hash": "23e236503a8bc415e2f11e1e8eff87cbfcaeaade12aeacf87e4c721c6d485a06",
  "election_method": "math"
}

rubric_version and rubric_hash identify the exact verdict rubric the verdict was produced under. Every released version stays published at https://faktolumo.eu/en/methodology/verdict-rubric (open ?h= followed by the first 12 characters of the hash to see that version). Both are null for verdicts that predate rubric versioning.

Rather than polling, you can subscribe to results as they land or receive a webhook.

5. See what it cost

bash
curl -s $RTFC/claims/$CLAIM/cost -H "X-Auth-Token: $TOKEN"
json
{"detector_cost_usd": 0.0002, "worker_cost_usd": 0.0018,
 "search_cost_usd": 0.0, "elector_cost_usd": 0.0, "total_cost_usd": 0.002}

6. Clean up

bash
curl -sX POST $RTFC/session/stop -H "X-Auth-Token: $TOKEN" \
  -H 'Content-Type: application/json' -d "{\"debate_id\": \"$DEBATE\"}"

Next: build a multi-tenant app, or check a video by URL instead of typing text.