What shipped
If you have ever built an LLM-powered astrology chatbot, you have hit the same wall: dumping the full natal chart JSON into the prompt blows past token limits, costs extra per turn, and produces sluggish responses. Most teams solve this by writing custom summarization logic. We built it into the API.
What's in the endpoint
- Pre-summarized natal context — planetary placements, aspects, dignities condensed into LLM-friendly prose, typically 500-800 tokens
- Daily transit summary — current transits relevant to the user's chart, refreshed daily, typically 200-400 tokens
- Moon phase, mercury retrograde state, void-of-course status — the "what is the sky doing right now" trio, condensed
- Language selection — output context in any of nine supported languages
- Style controls — tone presets (clinical, conversational, mystical) so the LLM stays on-brand for your bot
Why it matters
The grounded-chatbot pattern requires real astrological data in the prompt. The naive way costs you 3,000+ tokens of natal JSON per turn. The Chat API gives you the same data in 700-1,200 tokens of pre-summarized context. At scale that is the difference between a sustainable inference budget and one that eats your margin.
Three things specifically optimized for LLM consumption:
- Token efficiency. We strip placeholder fields and serialize aspects as natural sentences rather than nested objects.
- Prose, not JSON. LLMs handle prose better than structured data in system prompts. Output reads like an astrologer's notes.
- No hallucination triggers. Every claim in the summary is anchored to a specific placement, so when you instruct the LLM to "use only the provided context" it actually has clean data to anchor on.
How to integrate
1const ctx = await fetch('https://api.astrology-api.io/v1/astrology-chat/context', {2 method: 'POST',3 headers: { 'Authorization': `Bearer ${process.env.ASTROLOGY_API_KEY}` },4 body: JSON.stringify({5 natalChart: user.natalChart,6 date: today(),7 language: 'en',8 tone: 'conversational',9 }),10}).then(r => r.json());11
12const llmResponse = await anthropic.messages.create({13 model: 'claude-opus-4-7',14 system: `You are an astrologer. Use ONLY this context:15
16NATAL: ${ctx.natalSummary}17TRANSITS: ${ctx.transitSummary}18MOON: ${ctx.moonPhase}19`,20 messages: [{ role: 'user', content: userMessage }],21});ctx per user per day. One API call serves an entire day's worth of conversation turns.MCP integration
Where to learn more
- Product page: /p/astrology-chat-api
- MCP server: /p/mcp-astrology
- Case study: Scaling an Astrology Chatbot from Prototype to 10,000 Users
Pricing
Available on Professional ($37/mo) and above. One context fetch per request, same as any other endpoint. Cache aggressively per user per day to stay inside your tier.
What's next
V2 will add streaming context (deliver the summary token-by-token to reduce first-token latency in your LLM call), tool-call schemas for function calling (so the LLM can request narrower context on demand), and a conversation-memory endpoint that lets you store conversation summaries server-side instead of re-sending them every turn.




