Skip to main content
POST
/
chat
curl -X POST 'https://api.checkthat-ai.com/chat' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d '{
    "user_query": "The COVID-19 vaccine contains microchips that track people",
    "model": "gpt-4"
  }'
{
  "conversation_id": "conv_456", 
  "response": "Based on current scientific evidence, this claim requires nuance...",
  "claims_identified": [
    {
      "claim": "COVID-19 vaccine contains microchips",
      "confidence": 0.95,
      "category": "health_misinformation"
    }
  ],
  "fact_check_result": {
    "verdict": "false",
    "evidence_sources": ["CDC", "WHO", "peer_reviewed_studies"],
    "explanation": "No credible evidence supports the presence of microchips..."
  }
}
The primary endpoint for normalizing claims and engaging with the CheckThat AI system. This endpoint processes user queries to extract, normalize, and fact-check claims from provided text.
This endpoint requires authentication via API key. Include your API key in the request body or Authorization header.

Primary Use Cases

  • Claim extraction: Identify claims within user-provided text
  • Claim normalization: Standardize and structure extracted claims
  • Fact-checking analysis: Evaluate the veracity of claims
  • Interactive conversations: Maintain context across multiple interactions

Request Parameters

user_query
string
required
The text or query you want to analyze for claims. This is the main input that will be processed for claim extraction and normalization.
model
string
required
The AI model to use for processing. Common values include gpt-4, gpt-3.5-turbo, or other supported models.
api_key
string
Your API key for authentication. Can be provided here or in the Authorization header.
conversation_id
string
Optional identifier to maintain conversation context across multiple requests.
conversation_history
array
Array of previous messages to maintain context. Each message should contain role, content, and optionally timestamp.
max_history_tokens
integer
default:"4000"
Maximum number of tokens to include from conversation history. Helps manage context window limits.

Example Requests

curl -X POST 'https://api.checkthat-ai.com/chat' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d '{
    "user_query": "The COVID-19 vaccine contains microchips that track people",
    "model": "gpt-4"
  }'
const response = await fetch('https://api.checkthat-ai.com/chat', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    user_query: 'Climate change is caused primarily by human activities',
    model: 'gpt-4',
    conversation_id: 'conv_123'
  })
});

const result = await response.json();
import requests

payload = {
    "user_query": "Drinking 8 glasses of water daily is necessary for health",
    "model": "gpt-4",
    "conversation_history": [
        {
            "role": "user",
            "content": "Hello, I want to fact-check some health claims"
        },
        {
            "role": "assistant", 
            "content": "I'd be happy to help you fact-check health claims."
        }
    ]
}

response = requests.post(
    'https://api.checkthat-ai.com/chat',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    json=payload
)

Response Format

The endpoint returns a structured response with the analysis results:
{
  "conversation_id": "conv_456", 
  "response": "Based on current scientific evidence, this claim requires nuance...",
  "claims_identified": [
    {
      "claim": "COVID-19 vaccine contains microchips",
      "confidence": 0.95,
      "category": "health_misinformation"
    }
  ],
  "fact_check_result": {
    "verdict": "false",
    "evidence_sources": ["CDC", "WHO", "peer_reviewed_studies"],
    "explanation": "No credible evidence supports the presence of microchips..."
  }
}
Missing Required Fields (422)
{
  "detail": [
    {
      "loc": ["body", "model"],
      "msg": "field required",
      "type": "value_error.missing"
    }
  ]
}
Authentication Error (401)
{
  "detail": "Invalid or missing API key"
}
For better context retention, include conversation_id and relevant conversation_history in follow-up requests within the same fact-checking session.

Body

application/json
user_query
string
required
model
string
required
conversation_id
string | null
conversation_history
ChatMessage · object[] | null
api_key
string | null
max_history_tokens
integer | null
default:4000

Response

Successful Response

The response is of type any.