Citation API
Detect fabricated academic citations and check citation relevance. Verify citations against CrossRef, Semantic Scholar, and OpenAlex. Check if cited papers are actually relevant to the citing context.
/v1/citation/verifyVerify Citation
/v1/citation/verifyVerify one or more academic citations against CrossRef, Semantic Scholar, and OpenAlex. Detects fabricated or hallucinated references. Supports single and batch verification (up to 50 citations).
Parameters
Request body is a JSON object with a citations array (1-50 items). Each item:
| Parameter | Type | Required | Description |
|---|---|---|---|
citation_text | string | Optional | Raw citation string (min 10 chars). At least one of citation_text or structured is required. |
structured | object | Optional | Structured metadata: title, authors, year, journal, doi, etc. |
format_hint | string | Optional (default: auto) | 'apa', 'mla', 'chicago', 'ieee', 'gbt7714', or 'auto' |
Batch Verification
Pass multiple items in the citations array to verify up to 50 citations in a single request. The response includes aggregate counts (verified_count, uncertain_count, fabricated_count).
Citation Relevance
/v1/citation/relevanceCheck if a cited paper is actually relevant to the citing context. Uses a cascade of BM25, NLI, and LLM evaluation to determine relevance. Supports auto-fetching abstracts via DOI.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
citing_context | string | Required | The sentence or paragraph where the citation appears (min 10 chars) |
cited_paper_title | string | Optional | Title of the cited paper |
cited_paper_abstract | string | Optional | Abstract of the cited paper (auto-fetched if DOI provided) |
cited_doi | string | Optional | DOI of the cited paper (used to auto-fetch abstract) |
check_depth | string | Optional (default: auto) | 'fast', 'standard', 'deep', or 'auto' |
At least one of cited_paper_title, cited_paper_abstract, or cited_doi must be provided.
Response
{
"result": {
"relevance_verdict": "RELEVANT",
"relevance_score": 85.2,
"citation_intent": "supporting",
"nli_label": "entailment",
"explanation": "The cited paper directly introduces the transformer architecture...",
"tier_used": 2,
"processing_time_ms": 450.3
}
}Verdict Types
Verification Verdicts
VERIFIED — Citation matches a real publication with high confidence
UNCERTAIN — Partial match found, manual review recommended
FABRICATED — No matching publication found, likely hallucinated
Relevance Verdicts
RELEVANT — Cited paper is clearly relevant to the citing context
WEAKLY_RELEVANT — Some topical overlap but not a strong match
IRRELEVANT — No meaningful relevance to the citing context
CONTRADICTORY — Cited paper contradicts the citing claim
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
citation_text | string | Optional | Raw citation string (min 10 chars). At least one of citation_text or structured is required. |
structured | object | Optional | Structured citation metadata with fields: title, authors (string[]), year (int), journal, volume, issue, pages, doi. |
format_hint | string | Optional (default: auto) | Citation format hint: 'apa', 'mla', 'chicago', 'ieee', 'gbt7714', or 'auto' (auto-detect) |
Response
{
"result": {
"parsed_metadata": {
"title": "Attention Is All You Need",
"authors": [
"Vaswani, A.",
"Shazeer, N.",
"Parmar, N."
],
"year": 2017,
"journal": "Advances in Neural Information Processing Systems",
"doi": null
},
"verdict": "VERIFIED",
"confidence": 92.5,
"best_match": {
"source": "crossref",
"title": "Attention is all you need",
"authors": [
"Vaswani, Ashish",
"Shazeer, Noam",
"Parmar, Niki"
],
"year": 2017,
"doi": "10.5555/3295222.3295349",
"overall_similarity": 100
},
"sources_queried": [
"crossref"
],
"hallucination_signals": [],
"processing_time_ms": 320.5
}
}Examples
import requests
API_KEY = "your_api_key_here"
BASE_URL = "https://api.qinyanai.com"
# --- Verify a single citation ---
response = requests.post(
f"{BASE_URL}/v1/citation/verify",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"citations": [{
"citation_text": "Vaswani, A., Shazeer, N. et al. (2017). Attention Is All You Need. NeurIPS, 30."
}]
}
)
results = response.json()["results"]
for r in results:
print(f"Verdict: {r['verdict']} Confidence: {r['confidence']}%")
# --- Batch verification (up to 50) ---
response = requests.post(
f"{BASE_URL}/v1/citation/verify",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"citations": [
{"citation_text": "Vaswani, A. et al. (2017). Attention Is All You Need. NeurIPS."},
{"citation_text": "Devlin, J. et al. (2019). BERT: Pre-training of Deep Bidirectional Transformers. NAACL."},
]
}
)
batch = response.json()
print(f"Verified: {batch['verified_count']}, Fabricated: {batch['fabricated_count']}")
# --- Check citation relevance ---
response = requests.post(
f"{BASE_URL}/v1/citation/relevance",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"citing_context": "Transformer models have achieved state-of-the-art results in NLP tasks [1].",
"cited_paper_title": "Attention Is All You Need",
"check_depth": "auto"
}
)
result = response.json()["result"]
print(f"Relevance: {result['relevance_verdict']} Score: {result['relevance_score']}")