> ## Documentation Index
> Fetch the complete documentation index at: https://docs.astrom8.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Thai muhurta



## OpenAPI

````yaml /openapi.public.json post /api/v3/thai/muhurta
openapi: 3.1.0
info:
  title: AstroM8 Public API
  version: 1.1.0
  description: >-
    Astrology calculations, reports, customer delivery, and enterprise
    workflows. Each operation declares whether it uses an API key or a customer
    session bearer token.
servers:
  - url: https://api.astrom8.com
    description: Production
security: []
tags:
  - name: Western
    description: Natal, relationship, return, progression, and transit calculations.
  - name: Vedic
    description: Lahiri sidereal Vedic calculations, matching, timing, and remedies.
  - name: Thai Astrology
    description: Thai calendar, auspicious timing, lunar, festival, and wheel tools.
  - name: Chinese & Korean
    description: BaZi, Qi Men Dun Jia, and Saju calculations.
  - name: Horoscopes
    description: Published daily and range horoscope content.
  - name: Reports
    description: Branded report generation and asynchronous job polling.
  - name: Tarot & Numerology
    description: Tarot spreads and Pythagorean numerology.
  - name: Uranian
    description: Uranian charts, midpoints, and planetary pictures.
  - name: Developer workflow
    description: Preflight capability eligibility and credit estimates.
  - name: Customer reports
    description: Session-authenticated report jobs and reusable brand profiles.
  - name: Customer delivery
    description: Session-authenticated webhooks and scheduled horoscope delivery.
  - name: Cultural Intelligence
    description: >-
      Enterprise API-key workflows for encrypted profiles, teams, and campaign
      content.
paths:
  /api/v3/thai/muhurta:
    post:
      tags:
        - Thai Astrology
      summary: Thai muhurta
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - date
                - timezoneOffsetMinutes
                - latitude
                - longitude
                - event_type
              properties:
                date:
                  type: string
                  format: date
                  example: '2026-05-08'
                timezoneOffsetMinutes:
                  type: integer
                  example: 420
                latitude:
                  type: number
                  example: 13.756
                longitude:
                  type: number
                  example: 100.502
                event_type:
                  type: string
                  enum:
                    - wedding
                    - business_open
                    - home_move
                    - ceremony
                    - general
                duration_minutes:
                  type: integer
                  minimum: 30
                  maximum: 480
                  default: 60
                  description: Length of the auspicious window the user needs.
                top_n:
                  type: integer
                  minimum: 1
                  maximum: 20
                  default: 5
                  description: How many best windows to return.
                locale:
                  type: string
                  enum:
                    - th
                    - en
                  default: th
      responses:
        '200':
          description: Ranked best time-of-day windows for the event
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MuhurtaResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          description: Forbidden — endpoint requires a higher tier
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
      security:
        - ApiKeyAuth: []
components:
  schemas:
    MuhurtaResponse:
      type: object
      properties:
        date:
          type: string
          format: date
        buddhist_date:
          type: string
        weekday:
          type: string
          enum:
            - sun
            - mon
            - tue
            - wed
            - thu
            - fri
            - sat
        sunrise:
          type: string
          example: '06:00'
        sunset:
          type: string
          example: '18:00'
        rahu_kalam:
          type: object
          properties:
            start:
              type: string
            end:
              type: string
        best_windows:
          type: array
          items:
            type: object
            properties:
              start_time:
                type: string
                example: '13:00'
              end_time:
                type: string
                example: '14:00'
              score:
                type: number
                minimum: 0
                maximum: 100
              factors:
                type: object
                properties:
                  tithi:
                    type: object
                    properties:
                      number:
                        type: integer
                      class:
                        type: string
                        enum:
                          - Nanda
                          - Bhadra
                          - Jaya
                          - Rikta
                          - Purna
                      score:
                        type: number
                  nakshatra:
                    type: object
                    properties:
                      name_th:
                        type: string
                      class:
                        type: integer
                        minimum: 1
                        maximum: 9
                      score:
                        type: number
                  hora:
                    type: object
                    properties:
                      planet:
                        type: string
                        enum:
                          - sun
                          - moon
                          - mars
                          - mercury
                          - jupiter
                          - venus
                          - saturn
                      score:
                        type: number
                  lagna:
                    type: object
                    properties:
                      sign:
                        type: string
                      sign_th:
                        type: string
                      score:
                        type: number
              in_rahu_kalam:
                type: boolean
              rationale_th:
                type: string
              rationale_en:
                type: string
    JsonError:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: >-
            Stable slug (e.g. unauthorized, payment_required,
            internal_server_error).
        message:
          type: string
          description: Human-readable message safe for clients.
        code:
          type: string
          description: Optional provider-specific code.
        request_id:
          type: string
          description: Correlation id when middleware sets it.
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/JsonError'
          example:
            error: unauthorized
            message: Invalid API key
            code: '401'
            request_id: 01HQXYZ...
    PaymentRequired:
      description: >-
        Insufficient credits (checked before work where applicable; deduction is
        atomic)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/JsonError'
          example:
            error: payment_required
            message: Insufficient credits for this request
            code: '402'
            request_id: 01HQXYZ...
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: Use the raw API key as the Bearer token, or send X-API-Key instead.

````