Verafy API FAQs
Make sure to check out:
Full Verafy API Documentation
🚀 Get Started
Ready to start building with Verafy? Get your API key and explore our comprehensive documentation.
View API Documentation →General
The Verafy API, maintained by @csjcode at Verafy Technologies, enables you to plug in to our system for fact-checking by querying multiple AI models. It’s in beta, with API keys distributed via @csjcode Telegram DM.
DM @csjcode on Telegram or X with your project’s purpose, UX flow, tech stack, needed endpoints, and estimated daily API calls. Response in 24-48 hours with a key if approved.
POST /broadcast-query: Fact-check with random AIs (queriesRequested) or specific AIs (selectedLLMIds).GET /validators/active: List active AI models with UUIDs forselectedLLMIds.GET /credits: Check your current credit balance and API key status.
Authentication
Use header
X-API-Key: <your-key>. Store key in a .env file, not in code. Missing or invalid keys return errors. Keep keys secret.API Usage & Limits
Start with 500 credits. Each AI query costs 1 credit (e.g., 5 AIs = 5 credits). DM @csjcode for top-ups.
Yes, hourly limits apply. Avoid loops or spam, as Verafy covers query costs.
Using the API
curl -X POST https://api.verafy.ai/api/v1/public/broadcast-query \
-H "Content-Type: application/json" \
-H "X-API-Key: <your-key>" \
-d '{
"queryText": "Earth is bigger than Mars",
"queryMode": "fact-check",
"queriesRequested": 5
}'In Postman: Click Import, select Raw Text, paste cURL, click Continue, verify headers/body, and send.
After sending a request, click the Code icon on the Postman site, choose a language (e.g., Python), and copy/export the snippet. If you need more instructions look at their docs.
interface ValidatorResponse {
id: string;
provider: string;
profileName: string;
vote: string;
rationale: string;
}
interface VotingResult {
yes: number;
no: number;
notVoted: number;
}
interface BroadcastQueryResponse {
id: string;
isConsensusReached: boolean;
consensusValue: boolean;
queryText: string;
validatorResponses: ValidatorResponse[];
votingResult: VotingResult;
timestamp: string;
}
function parseResponse(json: string): BroadcastQueryResponse {
try {
return JSON.parse(json);
} catch {
console.error("Invalid JSON");
throw new Error("Invalid JSON response");
}
}Fetch active AIs:
curl --location 'https://api.verafy.ai/api/v1/public/validators/active' \ --header 'X-API-Key: <your-key>'
Use their UUIDs in selectedLLMIds:
curl -X POST https://api.verafy.ai/api/v1/public/broadcast-query \
-H "Content-Type: application/json" \
-H "X-API-Key: <your-key>" \
-d '{
"queryText": "Earth is bigger than Mars",
"queryMode": "fact-check",
"selectedLLMIds": ["uuid1", "uuid2", "uuid3"]
}'Use Cases
- News Apps: Verify article claims in real-time.
- Educational Tools: Fact-check student submissions or quiz answers.
- Social Media Bots: Flag misinformation in posts or comments.
- Chatbots: Enhance responses with verified facts.
- Research Platforms: Validate claims in academic or market research.
Notes & Best Practices
Endpoints/URLs may change. Some AIs may become inactive. Malformed JSON is rare but possible with 10+ AIs. The URL is temporary.
Recommended: 5 AIs. Max: 20 (slower, uses more credits).
Avoid excessive requests. Monitor credits and request top-ups via DM. Store keys securely.
Assumptions & Gaps
Handle HTTP errors (e.g., 401 for invalid keys, 429 for rate limits) and malformed JSON. Use try-catch for parsing.
Expect 1-5 seconds for 5 AIs, longer for more. Test under load.
Notify @csjcode so can deactivate keys if misused or to refresh your key. Contact for issues.
Test with your use case or ask @csjcode for supported languages.
No. Monitor
GET /validators/active for API availability.🚀 Best Practices Guide
Learn how to build robust, scalable applications with the Verafy API.
View Best Practices Guide →