Official Go client for Kriya — the Insights Astrology API by Insights by Omkar. A commercial astronomy API covering 109+ v1 endpoints across Western, Vedic, Hellenistic, Jaimini, KP, and electional traditions. Computed from first principles on a home-grown VSOP87D + ELP2000 + DOPRI8 engine.
Zero runtime dependencies. Only net/http and encoding/json from the standard library.
go get github.com/insights-by-omkar/kriya-go@latestRequires Go 1.21+. See SETUP.md for publishing internals.
package main
import (
"context"
"errors"
"fmt"
"github.com/insights-by-omkar/kriya-go"
)
func main() {
client := kriya.New("https://kriya.insightsbyomkar.com",
kriya.WithAPIKey("YOUR_JWT_HERE"),
)
chart, err := client.NatalChart(context.Background(), kriya.Person{
Datetime: "1990-06-15T12:00:00Z", // strict ISO-8601, no naive locals
Latitude: 51.5,
Longitude: 0,
})
if err != nil {
var apiErr *kriya.APIError
if errors.As(err, &apiErr) {
fmt.Printf("API %d %s: %s\n", apiErr.Status, apiErr.Code, apiErr.Message)
return
}
panic(err)
}
fmt.Printf("%+v\n", chart)
}Errors surface as *kriya.APIError with Status, Code, Message, Details — safe to unwrap with errors.As.
The API uses stateless HS256 JWTs. Each key encodes its own per-minute + per-day quotas — no round-trip to a key-store, horizontally scalable out of the box. Pass your key once at client construction:
client := kriya.New(baseURL, kriya.WithAPIKey(os.Getenv("KRIYA_API_KEY")))See the API docs for key minting + tier quotas.
109+ v1 endpoints across these domains. Grew from a 43-endpoint v1 launch (2026-04-15) to current scope across nine semver versions of disciplined iteration.
| Domain | Examples |
|---|---|
| Western core | /chart/natal · /chart/wheel · /chart/extended · /transits · /transits/scan · /synastry · /composite · /composite/davison · /progressions · /returns/solar · /returns/lunar · /relocation · /harmonic · /draconic |
| Vedic | /vedic/chart · /vedic/panchanga · /vedic/varshaphala · /vedic/sade-sati · /vedic/yogas · /vargas · /dashas · /ashtakavarga · /shadbala · /chara-karakas |
| Jaimini | /jaimini/arudhas · /jaimini/aspects · /jaimini/chara-dasha · /jaimini/narayana-dasha |
| KP | /kp-sublords · /kp/cuspal-interlinks · /kp/ruling-planets · /kp/significators |
| Hellenistic | /profections · /zodiacal-releasing · /lots · /sensitive-points |
| Points & geometry | /positions · /aspects · /aspect-events · /pattern-events · /midpoints · /antiscia · /declinations · /lunar-mansions · /degrees/analyze |
| Electional / events | /muhurta · /eclipses · /eclipses/prenatal · /voc-moon · /planetary-hours · /stations · /sign-ingresses · /heliacal · /parans · /sun-rise-set |
| Bodies | /asteroids · /asteroids/extended · /fixed-stars · /stars/list · /bodies/extended · /heliocentric · /uranian |
| LLM-grounded | /reading/natal · /reading/transit · /reading/vedic · /ask-chart · /compatibility/narrative |
| Developer / admin | /keys/me · /keys/rotate · /usage/me · /jobs · /jobs/[id] · /webhooks · /accuracy · /calibrate · /openapi.json |
Full live endpoint manifest at /openapi.json or the interactive Scalar docs.
Inputs are typed (Person, NatalChartOpts, AspectPoint); responses currently decode as map[string]any to match the API's rich, endpoint-specific shapes. Typed response structs are on the roadmap as the OpenAPI 3.1 spec stabilizes.
Runnable examples live in examples/:
export KRIYA_API_KEY="eyJ..."
go run ./examples/natal # natal chart with typed error handling
go run ./examples/transits # transits from a natal chart
go run ./examples/positions # stateless body positions- Zero runtime dependencies. Embed this in anything — serverless, edge, CLI, bot — without dragging a graph.
- Context-first. Every method takes
context.Context. Cancel anywhere in the tree. - Errors are data.
*kriya.APIErrorcarries the HTTP status, the machine-readable code, and a human message. - Idiomatic options. Functional options (
WithAPIKey,WithHTTPClient) — swap out the transport for tracing, retries, or testing. - Strict input parsing on the server. ISO-8601 datetimes required — no ambiguous local times. Pair with Go's
time.Time.Format(time.RFC3339)and you're set.
- Case study — architecture, decisions, accuracy, sources
- TypeScript SDK —
npm install kriya-astrology - Python SDK —
pip install kriya-astrology - API docs — interactive Scalar explorer
- Pricing — Free · Kriya Pro ($49/mo) · Kriya Max ($149/mo) · Enterprise (custom)
MIT — see LICENSE. Free to embed in commercial applications.