Multi-turn & Conversations

Carry context across turns with a stable conversationId — consistent, memory-aware readings.

Send the same conversationId across requests and later turns automatically include the earlier ones. The engine reconciles user-stated life facts (for example, “I am already married”) so the reading stays consistent across the whole conversation. Each turn is billed independently.

#How it works

  1. Choose a stable id per user session (any string you control, e.g. u123-sess1).
  2. Pass it as conversationId on the first turn. The response echoes a conversationId — you can adopt the server's id instead.
  3. Send the same id on each following turn. Prior context is applied automatically.
  4. Optionally set saveConversation: true to persist the thread for later retrieval.

#Two turns

# Turn 1
curl -s https://api.vedika.io/api/v1/astrology/query \
  -H "x-api-key: $VEDIKA_KEY" -H "Content-Type: application/json" \
  -d '{"question":"What is my ascendant and Moon sign?",
       "conversationId":"u123-s1",
       "birthDetails":{"datetime":"1990-05-15T10:30:00","latitude":28.6,
                        "longitude":77.2,"timezone":"Asia/Kolkata"}}'

# Turn 2 — remembers turn 1
curl -s https://api.vedika.io/api/v1/astrology/query \
  -H "x-api-key: $VEDIKA_KEY" -H "Content-Type: application/json" \
  -d '{"question":"Based on that, which career suits me?",
       "conversationId":"u123-s1",
       "birthDetails":{"datetime":"1990-05-15T10:30:00","latitude":28.6,
                        "longitude":77.2,"timezone":"Asia/Kolkata"}}'

#Managing conversations

Persisted conversations can be listed, fetched and removed:

MethodPathPurpose
GET/api/v1/conversationsList your conversations.
GET/api/v1/conversations/{conversationId}Fetch one conversation.
POST/api/v1/conversations/{conversationId}/extendExtend a conversation's retention.
DELETE/api/v1/conversations/{conversationId}Delete a conversation.
Tip
Follow-up quality is highest when birthDetails stay identical across turns — it also maximises cache hits (see Prompt Caching).