
Verafy API, Getting Started: Trust-Powered Apps
A developer's guide to building trustworthy apps with AI-powered fact-checking
As misinformation spreads faster than ever, developers face a critical challenge: building apps and platforms that users can trust.
Whether you're crafting a social media app, a Web3 platform, an educational tool, or an enterprise solution, the accuracy of information is paramount.
Enter Verafy Swarm API—a powerful, developer-friendly API designed to deliver AI-powered fact-checking with a consensus-driven approach.
By using Verafy's API you can create transparent, trust-driven applications that stand out in a crowded digital landscape.
In this article, we'll explore Verafy's core endpoints, walk through a compelling Web3 use case, and show you how to make your first API call, all while leveraging Solana for decentralized trust.
What is the Verafy API?
You can view the complete documentation of the Verafy API here: Verafy API Hub
See over 44 use cases for the Verafy API here: Verafy Use Cases
Explore API recipes for common and advanced tasks here: Verafy API Recipes
See the FAQ for more information: Verafy API FAQ
Verafy's API empowers developers to verify fact claims in real time using a swarm of AI LLMs and, in the future, custom validators, for robust and reliable fact-checking.
Currently in beta, the API suite offers three key endpoints:
POST /broadcast-query
: Submit a claim to be fact-checked by multiple AI validators, returning a consensus result with detailed validator responses.GET /validators/active
: Retrieve a list of available AI validators, each with a unique UUID for targeted queries.GET /credits
: Monitor your API key status and credit balance to manage usage effectively.
Although it is expected that custom AIs will evolve the Verafy network as it grows, currently the focus is on leveraging existing either user-selected or automatically chosen mainstream AI validators for fact-checking.
So is this just a deluxe OpenRouter? No, it still has specialized fact-checking features and a special consensus mechanism for decisions and confidence values, which makes it unique and best-suited for fact-checking claims.
The magic of Verafy lies in its consensus-based approach.
When you submit a claim via /broadcast-query
, multiple AI validators assess it, and the response includes fields like isConsensusReached
(true/false) and votingResult
(e.g., yes: 4
, no: 1
). This ensures reliable verification, even in contentious domains. To get started, you'll need a private API key, obtainable by contacting @csjcode on Telegram with your project details, expected usage, and desired endpoints.
(note: the confidence value will be included in the coming days, as it is a recently added feature!)
Why Developers Should Care About Verafy
Verafy's API is a game-changer for developers across industries.
We use RESTful design principles and JSON responses with a lot of code examples to make integration a breeze, whether you're building with Node.js, Python, or another stack. The API is versatile, supporting applications in social media, news, education, and Web3. For example, you can fact-check user posts, verify news headlines, validate educational content, or ensure compliance in enterprise platforms.
What sets Verafy AI Swarm Explorer apart is its synergy with Solana, a high-performance blockchain capable of processing over 65,000 transactions per second1.
- Solana's fast and low-cost blockchain to make Verafy AI credit payments.
- A vibrant Solana community excited about truth-maximizing applications.
- Staking to the Verafy validator helps fund our operations.
- In the future, we see potential for more Solana on-chain activities.
- For example, storing fact-check results on Solana, you can create transparent, immutable records that users can trust.
- Combine this with token-based incentives, and you have a recipe for building applications that reward accuracy and foster credibility.
- Also incentivizing custom AI validators with Solana rewards.
Use Case: A Web3 App with Verified Content
Imagine a decentralized content platform—think a Web3 version of Twitter—where creators stake Solana tokens on the accuracy of their posts. Users submit claims, such as "Solana's transaction fees are under $0.01," which are sent to Verafy's /broadcast-query
endpoint with queriesRequested: 5
. The API queries five AI validators, returning a JSON response with isConsensusReached: true
, consensusValue: true
, and detailed validatorResponses
explaining why the claim is accurate. The platform displays a "Verified by AI Swarm" badge next to the post, complete with a confidence score derived from the votingResult
.
Technical Primer: Your First Verafy API Call
Let's walk through making your first Verafy API call to fact-check a claim. Follow these steps to get started:
Step 1: Request an API Key
Contact @csjcode on Telegram, providing your project details (e.g., a Web3 app), user flow, tech stack, desired endpoints, and estimated daily API calls. If approved, you'll receive a unique API key within 24–48 hours, along with 500 free Verafy credits for testing.
Step 2: Explore Available Validators
Use the GET /validators/active
endpoint to retrieve a list of active AI validators. Here's a sample cURL request:
curl --location 'https://api.verafy.ai/api/v1/public/validators/active' \
--header 'X-API-Key: <your-api-key>'
The response might look like:
[
{
"id": "2be6d724-a525-483f-ad68-bf023bcac613",
"name": "Llama 3.1 8B Validator",
"provider": "OpenRouter",
"modelName": "meta-llama/llama-3.1-8b-instruct",
"active": true
},
{
"id": "1192bc8f-32d9-406d-ba33-673d8996ada4",
"name": "GROK-1 Validator",
"provider": "Grok",
"modelName": "grok-1",
"active": true
}
]
This helps you identify validator UUIDs for targeted queries.
Step 3: Fact-Check a Claim
Use POST /broadcast-query
to verify a claim, such as "Solana processes 65,000 TPS." Here's a cURL example:
curl -X POST https://api.verafy.ai/api/v1/public/broadcast-query \
-H "Content-Type: application/json" \
-H "X-API-Key: <your-api-key>" \
-d '{
"queryText": "Solana processes 65,000 TPS",
"queryMode": "fact-check",
"queriesRequested": 5
}'
The response might be:
{
"id": "7c258853-e374-4a4a-8fb8-a9fde3663608",
"isConsensusReached": true,
"consensusValue": true,
"queryText": "Solana processes 65,000 TPS",
"validatorResponses": [
{
"id": "65462fc9-04f8-4a31-9d97-181812e3dcac",
"provider": "OpenRouter",
"profileName": "Claude 3 Sonnet Validator",
"vote": "YES",
"rationale": "Solana's architecture supports up to 65,000 TPS under optimal conditions, as per its official documentation."
}
],
"votingResult": {
"yes": 5,
"no": 0,
"notVoted": 0
},
"timestamp": "2025-08-25T12:30:24.458Z"
}
Step 4: Parse the Response
Extract isConsensusReached
, consensusValue
, and validatorResponses
to display in your app. For example, show a trust badge with a confidence score based on the yes
and no
votes. Use try-catch blocks to handle occasional malformed JSON, as some AIs may return irregular responses when querying many validators.
Step 5: Monitor Credits
Check your credit balance with GET /credits
to ensure you stay within limits:
curl -X GET https://api.verafy.ai/api/v1/public/credits \
-H "X-API-Key: <your-api-key>"
Response:
{
"apiKeyId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"credits": 450,
"lastUsed": "2025-08-24T21:00:00.000Z",
"isActive": true,
"timestamp": "2025-08-24T21:15:00.000Z"
}
Each validator query consumes one credit, so optimize by selecting specific validators with selectedLLMIds
when possible.
Solana Integration (future roadmap): Building Trust on the Blockchain
Solana's high-throughput blockchain is a perfect complement to Verafy's APIs. In the future, we aim to add more Solana activities, like storing fact-check results on-chain, you ensure transparency and immutability, critical for user trust. For example, in a Web3 content platform, a Solana smart contract can:
- Record Results: Store
isConsensusReached
andconsensusValue
for each claim, creating an auditable trail. - Manage Stakes: Use Solana tokens to incentivize accurate content, rewarding creators whose claims are verified.
- Update Trust Scores: Calculate creator trust scores based on their history of verified claims, stored immutably on-chain.
For instance, a Solana program could increment a creator's trust score by 1 for each verified claim, slashing tokens for false ones. Solana's low transaction fees (often under $0.01) and high speed make this scalable, even for platforms with millions of users1. This integration not only enhances trust but also opens doors to tokenized economies where accuracy is rewarded.
Getting Started: Tips and Best Practices
To build robust applications with Verafy, follow these best practices:
- Secure API Keys: Store your API key in a
.env
file (e.g.,VERAFY_API_KEY=<your-api-key>
), never hard-code it in your codebase to prevent leaks. - Handle Errors: Use try-catch blocks to manage occasional malformed JSON responses, especially when querying multiple validators (over 10).
- Optimize Credit Usage: Select specific validators with
selectedLLMIds
for targeted queries, and cacheGET /validators/active
results to reduce API calls. - Monitor Rate Limits: Avoid accidental loops or spam by implementing rate-limiting logic, as Verafy enforces hourly limits to ensure responsible usage.
These practices ensure your application is efficient, secure, and user-friendly while maximizing your 500 free credits.
Conclusion: Start Building with Verafy Today
Verafy's API offer a powerful way to add trust to your applications, whether you're building a social media platform, a news aggregator, an educational tool, or a Web3 app.
With its consensus-based fact-checking and easy-to-use endpoints, Verafy empowers developers to combat misinformation effectively. By integrating with Solana, you can take trust to the next level, leveraging blockchain for transparency and incentives. The potential is vast—72% of people worldwide see misinformation as a major threat, and Verafy gives you the tools to address it2.
Ready to get started? Contact @csjcode on Telegram to request your API key, explore the Verafy documentation, and start building applications that users can trust. Whether it's a decentralized content platform or an enterprise compliance tool, Verafy and Solana have you covered.
You can view the complete documentation of Verafy API here: Verafy API Hub
See over 44 use cases for the Verafy API here: Verafy Use Cases
Explore API recipes for common and advanced tasks here: Verafy API Recipes
See the FAQ for more information: Verafy API FAQ
References
Footnotes
-
Solana's blockchain supports over 65,000 transactions per second, enabling scalable, cost-effective storage of verification results for trust systems. https://solana.com/ ↩ ↩2
-
72% of respondents in a 2025 Pew Research survey view online misinformation as a major threat, highlighting the need for trust across digital platforms. https://www.pewresearch.org/global/2024/03/12/majorities-in-most-countries-see-social-media-as-a-good-thing-despite-concerns-about-misinformation-and-privacy/ ↩