astrom8

Built for fortune products everywhere

Real integration patterns — samples plus the endpoints behind them

💬

LINE OA Fortune Bot

LINE Official Account is how Thai users follow fortune tellers — every message a user sends fires a webhook for you to handle.

Use astrom8 to call /api/v3/thai/calendar/day when users ask about today's lucky day. Reply with a flex message in your first 30 minutes of integration.

No need to store daily reuk in your own database — call the API in realtime, even with 1,000 concurrent users.

typescript
// LINE webhook handler (Cloudflare Worker)
export default {
  async fetch(req: Request, env: Env) {
    const event = (await req.json()).events?.[0]
    if (event?.message?.text === 'today') {
      const r = await fetch('https://api.astrom8.com/api/v3/thai/calendar/day', {
        method: 'POST',
        headers: {
          Authorization: `Bearer ${env.ASTROM8_KEY}`,
          'Content-Type': 'application/json',
        },
        body: JSON.stringify({ date: new Date().toISOString().slice(0, 10) }),
      }).then(r => r.json())

      return replyToLine(event.replyToken, {
        type: 'flex',
        altText: `${r.day_quality.label_th} (${r.day_quality.score}/100)`,
        contents: buildFlexCard(r),
      })
    }
  }
}
Endpoints used: /api/v3/thai/calendar/day, /api/v3/tarot/three-card
📅

Auspicious Date Picker App

Customers pick wedding dates, opening days, moving dates, important meetings — every date needs to clear multiple reuk systems.

Our multi-system scoring combines Atthaloka + Dithi + Reuk Bon into a single 0–100 score with Thai-language rationale explaining why a day rates high or low.

Your app shows a 30-day calendar color-coded by score — users click any day and see the explanation immediately.

typescript
// Loop 30 days, color-code by score
const days = []
for (let i = 0; i < 30; i++) {
  const date = addDays(today, i)
  const r = await astrom8.thai.calendar.day({
    date: date.toISOString().slice(0, 10),
    birth_day_of_week: user.birth_day,
  })
  days.push({
    date,
    score: r.day_quality.score,
    label: r.day_quality.label_th,
    color: r.day_quality.score >= 80 ? 'emerald'
         : r.day_quality.score >= 60 ? 'amber' : 'zinc',
  })
}
Endpoints used: /api/v3/thai/calendar/day (looped per day)
🪐

Astrology Chart Platform

Different customer segments want different astrology systems — Vedic for Indian audiences, Western for international, BaZi for Chinese community.

astrom8 unifies all three behind one API key — call them in parallel as needed. No three vendors, no schema mapping.

Wheel Image Generation is the killer differentiator — personalized Maha Thaksa PNG 1024×1024 ready to share on Instagram or Facebook. Boost your viral coefficient.

typescript
// Run all 3 systems in parallel
const [vedic, western, bazi, wheelImg] = await Promise.all([
  astrom8.vedic.panchang({ date, lat, lng }),
  astrom8.western.natal({ date, time, lat, lng }),
  astrom8.chinese.bazi({ birth: { year, month, day, hour } }),
  astrom8.thai.wheel.image({ birth_day_of_week: user.birth_day }),
])

return { vedic, western, bazi, wheel_image_url: wheelImg.url }
Endpoints used: /api/v3/vedic/panchang, /api/v3/western/natal, /api/v3/chinese/bazi, /api/v3/thai/wheel/image
👥

HR talent screening

Structured HR assessment combining BaZi day-master profiling, native Thaksa outlook, bilingual narratives, role-fit scoring, and optional signed PDF output.

Available on the Pro tier today — pair the signal with your standard interviews and skills screens. Contact us for volume or enterprise contracts.

Available · Pro

Shipping in production — reach out for org-wide pricing or custom quotas. Contact us →

Endpoint: POST /api/v3/reports/hr-screening (PDF via include_pdf when enabled)