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
- Choose a stable id per user session (any string you control, e.g.
u123-sess1). - Pass it as
conversationIdon the first turn. The response echoes aconversationId— you can adopt the server's id instead. - Send the same id on each following turn. Prior context is applied automatically.
- Optionally set
saveConversation: trueto 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:
| Method | Path | Purpose |
|---|---|---|
| GET | /api/v1/conversations | List your conversations. |
| GET | /api/v1/conversations/{conversationId} | Fetch one conversation. |
| POST | /api/v1/conversations/{conversationId}/extend | Extend 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).