API Reference

Complete endpoint documentation for Vedika API

REST API v1.0 | Production Endpoints Available

Quick Start

Base URLs

Choose the server closest to your location for optimal latency:

🌏 Asia-Pacific (Mumbai) Recommended for India
https://api.vedika.io
🌎 North America (US Central) Global Fallback
https://api.vedika.io

Authentication

All API requests require authentication via API key in the header:

X-API-Key: vk_live_your_api_key_here

Get your API key from the Dashboard

Endpoints

Birth Chart Generation

Generate complete Vedic birth chart with planetary positions, houses, and yogas

POST
POST /api/v1/chart

Request Body:

{
  "birthDetails": {
    "date": "1990-01-15",
    "time": "14:30",
    "timezone": "Asia/Kolkata",
    "location": {
      "city": "Mumbai",
      "country": "India",
      "latitude": 19.0760,
      "longitude": 72.8777
    }
  },
  "options": {
    "divisionalCharts": ["D1", "D9", "D10"],
    "yogaDetection": true,
    "doshaAnalysis": true
  }
}

Response (200 OK):

{
  "success": true,
  "data": {
    "planets": [...],
    "houses": [...],
    "yogas": ["Gaja Kesari Yoga", "Budhaditya Yoga"],
    "doshas": {
      "manglik": false,
      "kaal_sarp": false
    },
    "divisionalCharts": {...}
  },
  "credits_used": 2
}

Astrology Query (AI-Powered)

Ask any astrology question and get AI-powered analysis with 97.2% accuracy

POST
POST /api/v1/astrology/query

Request Body:

{
  "question": "What is my career prospects in 2025?",
  "birthDetails": {
    "date": "1990-01-15",
    "time": "14:30",
    "location": "Mumbai, India"
  }
}

Response (200 OK):

{
  "success": true,
  "data": {
    "prediction": "Based on your chart analysis...",
    "confidence": 0.972,
    "agents_consensus": "6/6 agree",
    "followUpSuggestions": [...]
  },
  "credits_used": 1
}

Compatibility Analysis

Calculate Ashtakoota matching score and detailed compatibility report

POST
POST /api/v1/compatibility

Request Body:

{
  "person1": {
    "date": "1990-01-15",
    "time": "14:30",
    "location": "Mumbai, India"
  },
  "person2": {
    "date": "1992-05-20",
    "time": "09:15",
    "location": "Delhi, India"
  }
}

Response (200 OK):

{
  "success": true,
  "data": {
    "totalScore": 28,
    "maxScore": 36,
    "percentage": 77.8,
    "kootaBreakdown": {...},
    "manglikAnalysis": {...},
    "recommendation": "Highly compatible"
  },
  "credits_used": 2
}

Health Check

Verify API availability and server status

GET
GET /api/v1/health

Response (200 OK):

{
  "status": "healthy",
  "uptime": 1234567,
  "version": "1.0.0"
}

API Information

Get API version and capabilities information

GET
GET /api/v1/info

Response (200 OK):

{
  "name": "Vedika API",
  "version": "1.0.0",
  "features": ["birth-chart", "ai-query", "compatibility"],
  "models": ["Vedika Pro 1.0", "Vedika Standard 2.1", "Vedika Lite 0.9", "Vedika Express 1.5"]
}

Error Codes

Code Message Description
400 Bad Request Invalid request parameters
401 Unauthorized Invalid or missing API key
402 Payment Required Insufficient credits
429 Too Many Requests Rate limit exceeded
500 Internal Server Error Server error (we'll fix it!)

Rate Limits

Starter

100

requests per month

Professional

10,000

requests per month

Enterprise

Unlimited

Custom SLA