Quickstart

Make your first grounded AI Query call in a few minutes.

Note
You need a production API key (vk_live_ or vk_ent_). Get one from the dashboard after choosing a wallet plan. Prefer to try first? Use the keyless mock sandbox — no key, no charge.

#1. Set your key

Keep the key server-side and read it from the environment. Never ship a live key in browser code.

export VEDIKA_KEY=vk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

#2. Install a client (optional)

Use the official SDKs, or call the REST endpoint directly with any HTTP client.

pip install vedika-sdk
npm install @vedika-io/sdk

#3. Make your first call

Ask a natural-language question grounded in a birth chart. All four birthDetails fields are required; datetime is local wall-clock time in ISO 8601 with no offset, and timezone is an IANA name (or a fixed offset like +05:30).

curl -s https://api.vedika.io/api/v1/astrology/query \
  -H "x-api-key: $VEDIKA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "Which career field suits me best?",
    "birthDetails": {
      "datetime": "1990-05-15T10:30:00",
      "latitude": 28.6139, "longitude": 77.2090,
      "timezone": "Asia/Kolkata"
    }
  }'
import os, requests

r = requests.post(
    "https://api.vedika.io/api/v1/astrology/query",
    headers={"x-api-key": os.environ["VEDIKA_KEY"]},
    json={
        "question": "Which career field suits me best?",
        "birthDetails": {
            "datetime": "1990-05-15T10:30:00",
            "latitude": 28.6139, "longitude": 77.2090,
            "timezone": "Asia/Kolkata",
        },
    }, timeout=180,
)
data = r.json()
print(data["answer"])
print(data["metadata"]["cost"], data["metadata"]["usage"])
const r = await fetch(
  "https://api.vedika.io/api/v1/astrology/query",
  {
    method: "POST",
    headers: {
      "x-api-key": process.env.VEDIKA_KEY,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      question: "Which career field suits me best?",
      birthDetails: {
        datetime: "1990-05-15T10:30:00",
        latitude: 28.6139, longitude: 77.2090,
        timezone: "Asia/Kolkata",
      },
    }),
  },
);
const data = await r.json();
console.log(data.answer);
console.log(data.metadata.cost, data.metadata.usage);

#4. Read the response

A 200 returns the reading plus a full usage/cost breakdown nested under metadata:

{
  "answer": "Based on your chart, the 10th house lord ...",
  "birthChart": { "...": "computed chart" },
  "conversationId": "1a8cee6b-...",
  "followUps": ["..."],
  "metadata": {
    "cost": { "costUsd": 0.0253, "currency": "USD" },
    "usage": { "input_tokens": 12084, "output_tokens": 291, "total_tokens": 12375 },
    "creditsRemaining": 49.97,
    "speed": "standard", "language": "en"
  },
  "success": true
}
Tip
Billing is fail-closed: a bad request (400) is rejected before any wallet reservation, so malformed calls are never charged. See Error Codes.

#Next steps