You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React SDK for the Vedika Intelligence API -- hooks, provider, and utilities for astrology, tarot, numerology, and 20+ spiritual domains.
Installation
npm install @vedika-io/react @vedika-io/sdk
Quick Start
Wrap your app with VedikaProvider and use hooks anywhere inside:
import{VedikaProvider,useAskVedika,useBirthChart}from'@vedika-io/react';functionApp(){return(<VedikaProviderapiKey="vk_live_..."><AstrologyChat/></VedikaProvider>);}functionAstrologyChat(){const{ data, loading, error, ask }=useAskVedika();consthandleAsk=()=>{ask({question: 'What are my career prospects this year?',birthDetails: {datetime: '1990-06-15T14:30:00+05:30',latitude: 28.6139,longitude: 77.2090,timezone: '+05:30',},});};return(<div><buttononClick={handleAsk}disabled={loading}>
Ask Vedika
</button>{loading&&<p>Thinking...</p>}{error&&<p>Error: {error.message}</p>}{data&&<p>{data.answer}</p>}</div>);}
Provider Options
<VedikaProviderapiKey="vk_live_..."// Required -- your API keybaseUrl="https://api.vedika.io"// Optional -- custom base URLlanguage="en"// Optional -- default response languagetimeout={60000}// Optional -- request timeout in ms>{children}</VedikaProvider>
Available Hooks
Every hook returns { data, loading, error, fetch/ask/draw/cast/send, reset }.
AI Query
Hook
Description
useAskVedika()
Natural language astrology question
useAskVedikaStream()
Streaming response (real-time chunks)
useVoice()
Voice query (audio in, audio/text out)
Vedic Astrology
Hook
Description
useBirthChart()
Generate a complete birth chart (Kundali)
useDasha()
Vimshottari Dasha planetary periods
useDosha()
Dosha analysis (Kaal Sarp, Mangal, Sade Sati)
useYoga()
Detect 300+ astrological yogas
usePanchang()
Hindu calendar data for any date
useMuhurta()
Find auspicious times for events
useTransit()
Planetary transit analysis
useCompatibility()
Ashtakoota marriage compatibility
useHoroscope()
Daily/weekly/monthly horoscope
usePrediction()
Predictions (daily to yearly)
Tarot
Hook
Description
useTarotReading()
Draw a tarot spread
useCardOfTheDay()
Daily tarot card
useTarotSpreads()
List available spreads
Chinese Astrology
Hook
Description
useChineseZodiac()
Chinese zodiac animal by year
useBaZi()
Four Pillars of Destiny chart
useFengShui()
Kua number and directions
I Ching
Hook
Description
useHexagram()
Cast a hexagram with question
useIChingDaily()
Daily hexagram
Numerology
Hook
Description
useNumerologyReport()
Full 37-calculation report
useLifePath()
Life path number
useExpression()
Expression/destiny number
Matrimony
Hook
Description
useGunaMilan()
36-point Ashtakoota matching
useDoshaCancellation()
Dosha cancellation check
useUnifiedMatch()
Combined Vedic + KP matching
Human Design
Hook
Description
useBodyGraph()
Full body graph chart
useHDType()
Type, strategy, and authority
useHDStrategy()
Alias for useHDType
Crystals
Hook
Description
useCrystalByZodiac()
Crystals for a zodiac sign
useCrystalByChakra()
Crystals for a chakra
useCrystalCatalog()
Full crystal catalog
Spiritual
Hook
Description
useMantra()
Personalized mantra recommendation
useDeity()
Recommended deity for worship
usePastLife()
Past life karmic indicators
Health
Hook
Description
useHealthVulnerabilities()
Health analysis from chart
useAyurvedicType()
Ayurvedic constitution type
Career
Hook
Description
useSuitableCareers()
Best career fields from chart
useCareerTiming()
Auspicious periods for career moves
Daily
Hook
Description
useDailyBundle()
All-in-one daily insights
useDailyHoroscope()
Daily horoscope by sign
Accessing the Client Directly
For advanced use cases, access the underlying VedikaClient:
import{useVedikaClient}from'@vedika-io/react';functionAdvanced(){constclient=useVedikaClient();// Use any method from @vedika-io/sdk directlyconstresult=awaitclient.getNavamsa(birthDetails);}