AI बिल्डर्स के लिए प्रॉम्प्ट
बिल्डर आपसे तेज़ कोड लिखेगा। उसे किसी ख़ास API के बारे में दो बातें नहीं पता: कुंजी कहाँ रखनी है और ब्राउज़र से अनुरोध क्यों नहीं जाता। दोनों में घंटों की डीबगिंग लगती है, और दोनों प्रॉम्प्ट में एक पैराग्राफ़ से हल हो जाती हैं।
नीचे पहले यह पैराग्राफ़ है, फिर सात रेसिपी।
वह नियम जिसे किसी भी रेसिपी से पहले डालना है
Section titled “वह नियम जिसे किसी भी रेसिपी से पहले डालना है”इस ब्लॉक को रेसिपी के टेक्स्ट से पहले बिल्डर में कॉपी करें। यह कोड स्टाइल के बारे में नहीं है, यह उस बारे में है जो इसके बिना काम नहीं करेगा।
AstroWay API house rules. Apply these to every request you generate.
1. The API key is a server secret. Never put aw_live_* or aw_test_* into client code, into a VITE_* or NEXT_PUBLIC_* variable, or into a fetch that runs in the browser. Create a server route and call the API from there.2. The browser cannot call https://api.astroway.info/v1/* with that key. The one exception is a publishable pk_live_* key created for your app's origin: responses to that origin carry access-control-allow-origin, and the key works only from origins on its own list. Two prefixes answer any browser with no key: /v1/public/* returns JSON you can use, and /v1/embed/* returns a finished HTML page meant for an iframe, not for fetch.3. The auth header is exactly "X-Api-Key: <key>". Authorization: Bearer is rejected with 401, and so is an api_key query parameter.4. Send the birth time zone as an IANA name: "timezone": "Europe/Kyiv". Do not compute a UTC offset yourself. Kyiv in May 1990 was UTC+4, not the +3 it is today, and a wrong offset moves every house cusp.5. Every response is {"ok": true, "data": {...}} or {"ok": false, "error": {"code": "...", "message": "..."}}. Read data on success and show error.message to the user on failure. Do not assume a bare object.6. Planet positions arrive as ecliptic longitude in degrees, with no sign name. Derive it: SIGNS[Math.floor(longitude / 30)] where SIGNS runs Aries, Taurus, Gemini, Cancer, Leo, Virgo, Libra, Scorpio, Sagittarius, Capricorn, Aquarius, Pisces. Degrees inside the sign are longitude % 30.7. Responses carry X-Credits-Used and X-Credits-Remaining. Log both on the server so the cost of a feature is visible before the bill is.8. Ask for the fields you will render. Every endpoint takes ?fields= as a comma-separated list of dotted paths and ?precision= as decimal places: POST /v1/chart?fields=planets.name,planets.longitude,houses.cusp&precision=2 answers in 559 bytes where the full response is 32,410. Same credits, and the tokens are yours to pay either way.9. Get a free key at https://api.astroway.info/dashboard/sign-up and use an aw_test_* sandbox key while building: it spends no credits.1. व्हील के साथ जन्म कुंडली
Section titled “1. व्हील के साथ जन्म कुंडली”उपयोगकर्ता की एक कार्रवाई पर दो रिस्पॉन्स: चार्ट का डेटा और तैयार SVG।
| एंडपॉइंट | क्रेडिट |
|---|---|
/v1/chart | 20 |
/v1/render/wheel-western | 10 |
Build a single-page app: a birth data form (date, time, city with latitude andlongitude, IANA time zone) that renders a natal chart.
Server route POST /api/chart does two calls to AstroWay, in parallel: POST https://api.astroway.info/v1/chart POST https://api.astroway.info/v1/render/wheel-westernBoth take the same body: { "date": "1990-05-15", "time": "14:30:00", "timezone": "Europe/Kyiv", "latitude": 50.45, "longitude": 30.52 }Both need the X-Api-Key header.
/v1/chart returns data.planets (array with name, longitude, isRetrograde),data.houses.cusps (array of 12 longitudes) and data.aspects (array withplanet1, planet2 and a type object carrying name, symbol and color)./v1/render/wheel-western returns data.svg as a string.
The page shows the SVG at the top, then a table of planets with sign anddegree derived from longitude, then the aspect list using type.symbol andtype.color. Mark retrograde planets with an R.
Do not call AstroWay from the browser. The page calls /api/chart only.जेनरेशन के बाद जाँचें: SVG मार्कअप के रूप में डाला गया है, <img src> में नहीं; समय HH:mm:ss स्ट्रिंग के रूप में भेजा गया है; कुंजी बंडल में नहीं पहुँची (बिल्ड की गई फ़ाइलों में aw_ खोजने पर कुछ नहीं मिलना चाहिए)।
2. दो चार्ट की अनुकूलता
Section titled “2. दो चार्ट की अनुकूलता”एक संख्या और उसके घटक, बिना व्याख्यात्मक टेक्स्ट के। /v1/synastry/attraction-score, प्रति जोड़ी 50 क्रेडिट।
Build a compatibility page: two birth-data forms side by side, one button.
Server route POST /api/compat calls POST https://api.astroway.info/v1/synastry/attraction-scorewith body { "chart1": {...}, "chart2": {...} }, where each chart is { "date", "time", "timezone", "latitude", "longitude" }.
The response has data.score (a number), data.components (the parts that madeit) and data.notes. Render score as a large number with a progress ring, thencomponents as labelled bars, then notes as a list.
Never show the score without the components: a single number with no reasonbehind it is the thing users distrust.3. दैनिक राशिफल, बिल्कुल बिना कुंजी के
Section titled “3. दैनिक राशिफल, बिल्कुल बिना कुंजी के”एकमात्र रेसिपी जिसमें सर्वर रूट की ज़रूरत नहीं: यह एंडपॉइंट ब्राउज़र को जवाब देता है और क्रेडिट नहीं लेता।
Add a daily horoscope block to the page. Call this directly from the browser,no key and no server route needed:
GET https://api.astroway.info/v1/public/horoscope/daily?sign=leo&lang=en
Response: data.sign, data.date, data.period, data.horoscope (the text),data.disclaimer and data.language. Render a sign picker with the twelve signs,remember the choice in localStorage, and always show data.disclaimer under thetext.
The first request for a date that has not been generated yet can take a while,so show a skeleton, not a spinner that looks stuck.4. Human Design
Section titled “4. Human Design”टाइप, स्ट्रैटेजी, अथॉरिटी, प्रोफ़ाइल, सेंटर और चैनल एक ही कॉल /v1/human-design से, 50 क्रेडिट।
Build a Human Design page: birth data form, then the chart summary.
Server route POST /api/hd calls POST https://api.astroway.info/v1/human-designwith { "date", "time", "timezone", "latitude", "longitude" }.
The response has data.type, data.strategy, data.notSelfTheme, data.authority,data.profile, data.definition, data.cross, data.centers, and the activationarrays data.personalityActivations and data.designActivations.
Lay it out as: type and strategy as the headline, authority and profile as twocards, centers as a list with defined ones filled and undefined ones outlined,activations in a collapsible table. Birth time matters here more than anywhereelse, so refuse to submit without it and say why.5. उपयोगकर्ता के ब्रांड वाली PDF रिपोर्ट
Section titled “5. उपयोगकर्ता के ब्रांड वाली PDF रिपोर्ट”उनके लिए जो स्क्रीन दिखाते नहीं, बल्कि रिपोर्ट बेचते हैं। /v1/reports/natal, प्रति डॉक्यूमेंट 5000 क्रेडिट, और लिंक 24 घंटे तक चलता है।
Build a report generator: birth data form plus a branding form (company name,report title, accent colour), and a Generate button.
Server route POST /api/report calls POST https://api.astroway.info/v1/reports/natalwith { "chart": { "date", "time", "timezone", "latitude", "longitude" }, "whitelabel": { "companyName": "...", "reportName": "...", "themeColor": "#7c3aed", "footerText": "..." } }
The response has data.url, data.page_count, data.byte_length anddata.expires_at. The URL is valid for 24 hours only, so the server mustdownload the PDF immediately and store it on your side, then hand the useryour own link. Never give the AstroWay URL to the end user.
Show page_count and a download button. One report costs 5000 credits: put aconfirmation step before the call, not after.सोलह रिपोर्टों का पूरा कैटलॉग, हर एक में क्या है और कितने पेज: Reports API।
6. एक महीने का गोचर कैलेंडर
Section titled “6. एक महीने का गोचर कैलेंडर”तारीख़ों की विंडो में इवेंट्स की सूची, जिससे फ़ीड और कैलेंडर दोनों बनते हैं। /v1/transit-calendar, प्रति विंडो 100 क्रेडिट।
Build a month view of transits.
Server route POST /api/transits calls POST https://api.astroway.info/v1/transit-calendarwith { "natal": { "date", "time", "timezone", "latitude", "longitude" }, "startDate": "2026-10-01", "endDate": "2026-10-31" }
The response has data.count and data.events, plus the echoed startDate,endDate and maxOrb. Render events on a month grid, one dot per day withevents, and a day panel listing that day's events.
One call covers the whole window, so fetch the month once and filter in theclient. Do not call the API per day: that is thirty-one calls and thirty-onetimes the credits for the same answer.7. टैरो स्प्रेड
Section titled “7. टैरो स्प्रेड”रोज़ाना इंटरैक्शन जोड़ने का सबसे सस्ता तरीक़ा। /v1/tarot/rider-waite/draw/three-card, प्रति स्प्रेड 10 क्रेडिट, या दैनिक कार्ड के लिए शून्य।
Add a three-card tarot spread.
Server route POST /api/tarot calls POST https://api.astroway.info/v1/tarot/rider-waite/draw/three-cardwith an optional { "seed": 7 }. The response has data.spread, data.seed anddata.drawn.
Pass a seed derived from the user id and today's date, so the same person getsthe same spread all day and a new one tomorrow. Without a seed every reloaddeals a new hand, which reads as a slot machine.
For a zero-cost daily card the browser can call GET https://api.astroway.info/v1/public/tarot/dailydirectly, no key.आठ बिल्डर, एक अंतर
Section titled “आठ बिल्डर, एक अंतर”ऊपर की रेसिपी सबके लिए एक जैसी हैं। अंतर सिर्फ़ इसमें है कि सर्वर रूट कहाँ रहता है और कुंजी कहाँ रखनी है।
| बिल्डर | सर्वर कॉल कहाँ रहती है | कुंजी कहाँ रखें |
|---|---|---|
| Lovable | Supabase में edge function | Supabase प्रोजेक्ट के Secrets |
| Bolt | server function | Bolt में Secrets पैनल |
| v0 | Vercel Functions पर Next.js route handler | Vercel में environment variable, Secret टाइप के साथ |
| Replit | सामान्य सर्वर प्रोसेस | Replit Secrets, और Deployments में अलग से एक बार फिर |
| Cursor, Claude Code, Devin Desktop, Copilot | जो आपके स्टैक में है | git से बाहर .env और आपकी होस्टिंग का स्टोरेज |
चार अलग जाल, हर एक एक शाम ले लेता है।
- Lovable और Bolt फ़्रंटएंड Vite से बिल्ड करते हैं, और Vite
VITE_प्रीफ़िक्स वाला कोई भी वेरिएबल ब्राउज़र को दे देता है। कुंजी वहाँ अस्थायी रूप से भी नहीं रखी जाती: वह उस बंडल में पहुँच जाएगी जो सबको बाँटा जाता है। - Bolt प्रीव्यू WebContainer के अंदर दिखाता है, और यह असली CORS वाला असली ब्राउज़र है, जिसे वहाँ बंद नहीं किया जा सकता। यहाँ सर्वर फ़ंक्शन “बेहतर” नहीं, बल्कि कॉल होने का एकमात्र तरीक़ा है।
- v0 बिल्ड के समय
NEXT_PUBLIC_*को बंडल में डाल देता है। डैशबोर्ड में मान बदलना काफ़ी नहीं: जब तक नया डिप्लॉय नहीं होता, ऐप पुरानी कुंजी से चलता है। कुंजी का रोटेशन मतलब रोटेशन और रीबिल्ड। - Replit वर्कस्पेस के सीक्रेट्स और Deployments के सीक्रेट्स अलग रखता है। जो एडिटर में काम कर रहा था, वह पब्लिश करने के बाद ख़ाली कुंजी के साथ फ़ेल होता है, जब तक आप उसे Deployments पैनल में फिर से नहीं जोड़ते।
तालिका की आख़िरी चार पंक्तियाँ प्लेटफ़ॉर्म नहीं, बल्कि आपकी रिपॉज़िटरी में एजेंट हैं, और हर एक की अपने सैंडबॉक्स के लिए अपनी नेटवर्क allowlist है। जब एजेंट अभी लिखे कोड को जाँचना चाहेगा, तो api.astroway.info की कॉल तब तक ब्लॉक हो सकती है जब तक डोमेन जोड़ा न जाए। इनके लिए छोटा रास्ता भी है: हमारा MCP जोड़ें और एजेंट आपके कोड के बिना ख़ुद API को कॉल करेगा। निर्देश एजेंट सेटअप पर हैं।
अगर आपका एजेंट MCP नहीं, function calling बोलता है
Section titled “अगर आपका एजेंट MCP नहीं, function calling बोलता है”तैयार टूल डेफ़िनिशन लें और उन्हें सीधे मॉडल को दें। ये OpenAPI डॉक्यूमेंट से जेनरेट होती हैं, इसलिए मॉडल जो स्कीमा भरता है, वही एंडपॉइंट जाँचता है।
curl "https://api.astroway.info/v1/agent/tools?format=openai&select=starter" \-H "X-Api-Key: aw_live_YOUR_KEY"format openai और anthropic स्वीकार करता है, select सभी टूल्स की जगह कैटलॉग को स्टार्टर सेट तक सीमित करता है।