Documentation

API Reference

One endpoint. Send content, get analysis.

Quick Start

curl -X POST https://getvajra.ai/api/analyze \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"content": "https://example.com/article", "type": "url"}'

Authentication

Pass your API key in the Authorization header:

Authorization: Bearer vaj_your_key_here

Get your key at getvajra.ai/dashboard

POST /api/analyze

Analyze a URL, YouTube video, or raw text.

Request
Field
Type
Description
content
string
URL or text to analyze
type
string
"url" or "text" (default: "url")
Response
{
  "success": true,
  "cached": false,
  "credits_used": 1,
  "credits_remaining": 99,
  "processing_time_ms": 8200,
  "analysis": {
    "id": "uuid",
    "title": "Article Title",
    "quality_score": 8,
    "bias_level": "moderate",
    "markdown": "# Full Vajra Report...",
    "html": "<html>...</html>",
    "metadata": {
      "tldr": "...",
      "verdict": "...",
      "key_takeaways": ["..."],
      "warnings": ["..."]
    }
  }
}

Examples

Article
curl -X POST https://getvajra.ai/api/analyze \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"content": "https://paulgraham.com/avg.html", "type": "url"}'
YouTube video
curl -X POST https://getvajra.ai/api/analyze \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"content": "https://youtube.com/watch?v=...", "type": "url"}'
Raw text
curl -X POST https://getvajra.ai/api/analyze \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"content": "Your text here...", "type": "text"}'

Credits

New analysis1 credit
Cached result0 credits
Free tier100/month

If someone already analyzed the same URL, you get the result instantly for free. The more people use Vajra, the more content is cached.

Errors

400Missing or invalid parameters
401Invalid or missing API key
402Out of credits
500Server error

Telegram Bot

No code required. Send URLs directly in Telegram.

  1. 01Get an API key from the dashboard
  2. 02Open @vajra_the_bot on Telegram
  3. 03Send /start YOUR_API_KEY
  4. 04Send any URL to analyze