API Reference

The IntegerAI REST API gives you programmatic access to the full Credibility Suite — fact-checking, bias detection, summarisation, headline analysis, and readability scoring. Submit text; receive structured JSON.

Base URL: https://api.integerai.org

Authentication

All API requests require a bearer token in the Authorization header. Generate API keys from your dashboard.

Authorization: Bearer ia_live_your_api_key
Security: Your raw API key is shown exactly once at creation. We store only a SHA-256 hash. Keep it secret and never expose it in client-side code.
Plan requirement: The public REST API (everything under /v1/*) is only available on Pay-as-you-go and Enterprise plans. The Base plan is dashboard-only — keys created on a Base account will authenticate but receive a 403 plan_upgrade_required response from every /v1/* endpoint. See Rate limits & plan access.

Billing model

IntegerAI uses word credits: 1 credit = 100 words of submitted text, rounded up. This applies to fact-check, bias detector, summariser, and headline analyser. PAYG rate: $0.012 per 100 words. Enterprise: $0.008. The readability endpoint is purely algorithmic and is always free — it never charges credits.

Document sizeWord creditsPAYG cost ($0.012)
100 words1$0.012
500 words5$0.060
1,000 words10$0.120
3,000 words30$0.360

Every response includes word_credits_charged so you can reconcile usage in your own system.

Endpoints

POST/v1/fact-check

Fact-check a full document

Submit a document; receive a credibility score, an overall verdict, and a per-claim breakdown with supporting/contradicting evidence.

⚠️
Latency NoticeThis endpoint performs real-time web searches and cross-claims reasoning. Average latency is 8–25 seconds (up to 45 seconds under heavy load). Ensure client read timeouts are configured to at least 60 seconds.

Request fields

FieldTypeRequiredDescription
documentstringYesThe full text to fact-check. Must be 10–5,000 words.
source_regionstringNoOverride your dashboard's default source region. Allowed values: "GLOBAL", "INDIA", "US_CA", "UK_EU", "MIDDLE_EAST", "SEA", "LATAM". Defaults to the user account's dashboard setting, falling back to "GLOBAL" if unset.
doc_typestringNoOverride your dashboard's default document type. Allowed values: "NEWS", "RESEARCH", "BLOG", "SOCIAL", "PRESS_RELEASE", "SPEECH", "HEALTH", "LEGAL". Defaults to the user account's dashboard setting, falling back to "NEWS" if unset.

Response — 200 OK

{
  "id": "cm3x7k2p40001abc123def456",
  "document_word_count": 312,
  "word_credits_charged": 4,
  "source_region": "GLOBAL",
  "doc_type": "NEWS",
  "credibility_score": 0.84,
  "overall_verdict": "mostly_true",
  "summary": "The article's core climate claims are accurate and supported by NASA and NOAA data.",
  "claims": [
    {
      "claim": "2023 was the hottest year on record globally",
      "verdict": "true",
      "confidence": 0.99,
      "explanation": "Confirmed by NASA, NOAA, and Copernicus.",
      "evidence": [
        { "point": "NASA confirmed +1.17°C global temperature anomaly", "supports_claim": true }
      ],
      "category": "scientific"
    }
  ],
  "usage": { "input_tokens": 892, "output_tokens": 1247, "cost_usd": 0.000571 },
  "latency_ms": 3241,
  "created_at": "2026-06-29T12:34:56.789Z"
}

cURL

curl -X POST https://api.integerai.org/v1/fact-check \
  -H "Authorization: Bearer ia_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "document": "Scientists confirmed that 2023 was the hottest year on record, with average global temperatures reaching 1.45°C above pre-industrial levels."
  }'

Fact-check verdict values

VerdictMeaning
trueClaim is accurate and well-supported by evidence
mostly_trueCore claim is accurate but missing context or has minor inaccuracies
falseClaim is demonstrably inaccurate
mostly_falseCore claim is inaccurate but contains a kernel of truth
disputedGenuine expert disagreement exists
unverifiableCannot be verified with available information
POST/v1/bias-detector

Detect political bias, tone, and loaded language

Submit a document; receive a political-lean score, a tone classification, loaded phrases, and concrete bias indicators with explanations.

Request fields

FieldTypeRequiredDescription
textstringYesThe text to analyse for bias. Must be 20–5,000 words.

Response — 200 OK

{
  "document_word_count": 84,
  "word_credits_charged": 1,
  "bias_direction": "left",
  "bias_score": -42,
  "tone": "alarmist",
  "tone_score": 71,
  "loaded_phrases": ["crippling inflation", "out-of-touch elites"],
  "indicators": [
    {
      "type": "political",
      "example": "radical left-wing government",
      "explanation": "Loaded political framing rather than neutral description."
    }
  ],
  "summary": "The text uses emotionally charged language and one-sided framing typical of left-leaning opinion writing.",
  "usage": { "input_tokens": 410, "output_tokens": 312, "cost_usd": 0.000156 },
  "latency_ms": 1840
}

cURL

curl -X POST https://api.integerai.org/v1/bias-detector \
  -H "Authorization: Bearer ia_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "The radical left-wing government today unveiled yet another bloated spending package..."
  }'
POST/v1/summariser

Summarise an article into a chosen format

Submit a document and a target format; receive a ready-to-publish summary tailored to that format's conventions.

Request fields

FieldTypeRequiredDescription
textstringYesThe article text to summarise. Must be 50–10,000 words.
formatstringYesOne of: executive, twitter, linkedin, newsletter.

Response — 200 OK

{
  "document_word_count": 218,
  "word_credits_charged": 3,
  "format": "executive",
  "content": "- 2023 was confirmed as the hottest year on record\n- Arctic sea ice hit a near-record low\n- CO2 levels reached 422ppm, highest in 3 million years",
  "word_count": 28,
  "usage": { "input_tokens": 340, "output_tokens": 96, "cost_usd": 0.000114 },
  "latency_ms": 1520
}

cURL

curl -X POST https://api.integerai.org/v1/summariser \
  -H "Authorization: Bearer ia_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Scientists have confirmed that 2023 was the hottest year on record globally...",
    "format": "executive"
  }'
POST/v1/headline-analyser

Score a headline for clarity, SEO, engagement, and clickbait

Submit a headline (and optionally the article body, for accuracy scoring); receive per-dimension scores, a letter grade, issues, strengths, and 5 alternative headlines.

Request fields

FieldTypeRequiredDescription
headlinestringYesThe headline to analyse. Must be 300 characters or fewer.
article_bodystringNoThe article body, used to score headline accuracy against the content.

Response — 200 OK

{
  "word_credits_charged": 1,
  "original": "You won't believe what scientists just discovered!",
  "scores": { "clarity": 3, "seo_friendliness": 2, "engagement": 8, "clickbait_level": 9, "accuracy": -1, "overall": 4.1 },
  "grade": "D",
  "issues": ["Vague — doesn't say what was discovered", "High clickbait language"],
  "strengths": ["Creates curiosity"],
  "alternatives": [
    "Scientists confirm 2023 was the hottest year on record",
    "New climate data reveals record-breaking 2023 temperatures"
  ],
  "latency_ms": 1310
}

cURL

curl -X POST https://api.integerai.org/v1/headline-analyser \
  -H "Authorization: Bearer ia_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "headline": "You won'"'"'t believe what scientists just discovered!"
  }'
POST/v1/readability

Flesch-Kincaid readability scoring

Submit any text; receive Flesch Reading Ease and Flesch-Kincaid Grade scores along with detailed document statistics. Purely algorithmic — no model call.

Readability is computed locally and is always free — word_credits_charged is always 0.

Request fields

FieldTypeRequiredDescription
textstringYesThe text to analyse. Must be 10–20,000 words.

Response — 200 OK

{
  "word_credits_charged": 0,
  "flesch_reading_ease": 78.4,
  "flesch_kincaid_grade": 6.2,
  "reading_level": "Easy — 6th grade",
  "reading_time_minutes": 0.3,
  "avg_sentence_length": 12.7,
  "avg_word_length": 4.3,
  "word_count": 38,
  "sentence_count": 3,
  "paragraph_count": 1,
  "syllable_count": 54,
  "complex_word_count": 2,
  "complex_word_percentage": 5
}

cURL

curl -X POST https://api.integerai.org/v1/readability \
  -H "Authorization: Bearer ia_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "The city council met on Tuesday to discuss the new park plan."
  }'

Error codes

These error codes apply uniformly across all five endpoints.

401invalid_api_key
The Authorization header is missing, malformed, or the key has been revoked.
403plan_upgrade_required
Your API key belongs to an account without API access. The public REST API is only available on Pay-as-you-go and Enterprise plans — Free and Base plans are dashboard-only.
Additional fields: "plan": "BASE"
402quota_exceeded
Monthly word credit quota exhausted. Upgrade your plan or wait for the next billing cycle.
Additional fields: "credits_used": 5000, "credits_limit": 5000, "credits_needed": 5, "plan": "PAYG"
422invalid_request
A required field is missing, empty, or out of the allowed length/word-count range for that endpoint.
429rate_limit_exceeded
Too many requests. Respect the Retry-After header.
Additional fields: "retry_after": 60
500service_error
An internal error occurred. Retry with exponential backoff.

Rate limits & plan access

Free and Base plans do not include public API access. API keys work only for IntegerAI's own dashboard tools (Playground, in-app history). Calling any /v1/* endpoint with a Free or Base-plan key returns 403 plan_upgrade_required. Upgrade to Pay-as-you-go or Enterprise to unlock programmatic access.
PlanPublic API accessRate limitMonthly word credits
FreeDashboard only10 credits (1k words/mo)
BaseDashboard only1,500 credits (150k words/mo)
Pay-as-you-goFull /v1/* access120 req/minPre-purchased balance (2-yr expiry)
EnterpriseFull /v1/* access1,000 req/minCustom

Code examples

Full JavaScript and Python examples for fact-check below — the same request/response pattern (fetch or requests, bearer auth, JSON body) applies to all five endpoints; see each endpoint's cURL example above for its specific payload shape.

cURL
curl -X POST https://api.integerai.org/v1/fact-check \
  -H "Authorization: Bearer ia_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "document": "Scientists confirmed that 2023 was the hottest year on record, with average global temperatures reaching 1.45°C above pre-industrial levels."
  }'
JavaScript
const response = await fetch('https://api.integerai.org/v1/fact-check', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ia_live_your_api_key',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    document: articleText,  // full news article text, 10–5,000 words
  }),
});

const result = await response.json();
console.log(result.overall_verdict);     // "mostly_true"
console.log(result.credibility_score);   // 0.84
console.log(result.claims.length);       // 4
result.claims.forEach(c => {
  console.log(c.claim, c.verdict, c.confidence);
});
Python
import requests

response = requests.post(
    'https://api.integerai.org/v1/fact-check',
    headers={
        'Authorization': 'Bearer ia_live_your_api_key',
        'Content-Type': 'application/json',
    },
    json={
        'document': article_text,  # full news article text, 10–5,000 words
    }
)

result = response.json()
print(result['overall_verdict'])    # mostly_true
print(result['credibility_score'])  # 0.84
for claim in result['claims']:
    print(claim['claim'], '->', claim['verdict'])