AI 빌더용 프롬프트
빌더는 여러분보다 빨리 코드를 씁니다. 빌더가 모르는 것은 특정 API에 관한 두 가지입니다: 키를 어디에 둘지, 그리고 왜 브라우저에서 보낸 요청이 통과하지 못하는지. 둘 다 몇 시간의 디버깅을 잡아먹고, 둘 다 프롬프트의 한 단락으로 해결됩니다.
아래에 먼저 그 단락이 있고, 그다음에 레시피 일곱 개가 있습니다.
어떤 레시피보다 먼저 넣어야 할 규칙
섹션 제목: “어떤 레시피보다 먼저 넣어야 할 규칙”이 블록을 레시피 텍스트 앞에 빌더에 붙여 넣으세요. 코드 스타일에 관한 것이 아니라, 이것 없이는 작동하지 않는 부분에 관한 것입니다.
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. 휠이 있는 출생 차트
섹션 제목: “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. 두 차트의 궁합
섹션 제목: “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. 일간 운세, 키가 전혀 필요 없음
섹션 제목: “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
섹션 제목: “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 리포트
섹션 제목: “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.리포트 16종 전체 카탈로그, 각 리포트의 내용과 페이지 수: Reports API.
6. 한 달 트랜짓 캘린더
섹션 제목: “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. 타로 스프레드
섹션 제목: “7. 타로 스프레드”일상적인 상호작용을 더하는 가장 저렴한 방법입니다. /v1/tarot/rider-waite/draw/three-card, 스프레드당 10 크레딧, 오늘의 카드는 0 크레딧.
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.빌더 여덟 개, 차이는 하나
섹션 제목: “빌더 여덟 개, 차이는 하나”위 레시피는 모두에게 같습니다. 차이는 서버 라우트가 어디에 있고 키를 어디에 두는지뿐입니다.
| 빌더 | 서버 호출이 있는 곳 | 키를 두는 곳 |
|---|---|---|
| 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를 가진 진짜 브라우저이며 거기서 CORS를 끌 수 없습니다. 여기서 서버 함수는 “더 나은” 방법이 아니라 호출이 일어나게 하는 유일한 방법입니다.
- v0는 빌드 단계에서
NEXT_PUBLIC_*를 번들에 박아 넣습니다. 대시보드에서 값을 바꾸는 것만으로는 부족합니다. 새 배포가 없으면 앱은 이전 키로 작동합니다. 키 로테이션은 로테이션에 재빌드를 더한 것입니다. - Replit은 작업 공간의 시크릿과 Deployments의 시크릿을 따로 관리합니다. 에디터에서 작동하던 것이 게시 후에는 빈 키로 실패하며, Deployments 패널에 키를 다시 추가해야 해결됩니다.
표의 마지막 네 항목은 플랫폼이 아니라 여러분의 저장소 안에서 일하는 에이전트이며, 각자 자신의 샌드박스에 대한 네트워크 허용 목록이 있습니다. 에이전트가 방금 쓴 코드를 확인하려 할 때 도메인이 추가되기 전까지는 api.astroway.info 호출이 차단될 수 있습니다. 이들에게는 더 짧은 길도 있습니다. 저희 MCP를 연결하면 에이전트가 여러분의 코드 없이 직접 API를 호출합니다. 안내는 에이전트 설정에 있습니다.
에이전트가 MCP가 아니라 function calling을 쓴다면
섹션 제목: “에이전트가 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는 카탈로그를 전체 도구 대신 시작 세트로 좁힙니다.