Download the PHP package roxyapi/sdk without Composer

On this page you can find all versions of the php package roxyapi/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sdk

RoxyAPI PHP SDK, ship in an afternoon. The Spiritual OS layer for agentic AI. One key, flat pricing.

roxyapi/sdk

Packagist PHP Version

PHP SDK for astrology, Vedic astrology, numerology, tarot, and more.

One API key. Named arguments in, arrays out. Verified against NASA JPL Horizons.

The fastest way to add natal charts, daily horoscopes, synastry, Vedic kundli, tarot spreads, numerology, human design bodygraphs, and transit forecasts to PHP apps, Laravel and Symfony backends, and AI agents. 18+ domains behind a single Roxy subscription, interpretations in 10+ languages.

Install

Requires PHP 8.2+.

Start with one call

Get real product value with a single call. No setup beyond your API key.

Then expand into charts, compatibility, numerology, tarot, and more.

Quick start

createRoxy sets the base URL (https://roxyapi.com/api/v2) and injects the auth header and SDK identification header on every request. Every method returns array<string, mixed> decoded from JSON, or throws RoxyAPI\Sdk\RoxyApiException on 4xx / 5xx (see Error handling).

Domains

createRoxy($apiKey) returns a Roxy connector that lazy-loads one resource per OpenAPI tag:

Property What it covers
$roxy->astrology Western astrology API for natal birth charts, daily, weekly, monthly, and yearly horoscopes with unique content per s...
$roxy->vedicAstrology Vedic astrology (Jyotish) and KP API for kundli generation with the sixteen Shodasavarga divisional charts (D1 to D60...
$roxy->forecast Astrology forecast API that merges upcoming transit aspects, sign ingresses, retrograde stations, new and full moons,...
$roxy->humanDesign Human Design API that generates the full bodygraph from a birth moment: type, strategy, inner authority, profile, def...
$roxy->chineseAstrology Chinese zodiac and BaZi astrology API: Four Pillars charts, Chinese zodiac signs and the Chinese lunisolar calendar f...
$roxy->fengShui Compute classical feng shui from one API: Xuan Kong flying star natal charts for any of the nine periods and 24 mount...
$roxy->mesoamericanAstrology Calculate Mayan astrology day signs, the Tzolkin sacred round, the Haab year, the full Long Count and the Aztec tonal...
$roxy->vastu Vastu Shastra API for directional home and plot analysis: entrance padas with the classical effect of each of the 32...
$roxy->numerology Numerology API for life path numbers, complete numerology charts and compatibility, in both Pythagorean and Chaldean...
$roxy->kabbalah Kabbalah API for gematria, the 72 names, the Tree of Life and the Hebrew birthday
$roxy->tarot Tarot reading API with the complete 78-card Rider-Waite-Smith deck and card meanings for love, career, health, and sp...
$roxy->biorhythm Biorhythm API for entertainment and reflection, with 10 model cycle types across 3 primary (physical, emotional, inte...
$roxy->ayurveda Ayurveda API for dosha profiles, the dinacharya daily routine and the ritucharya seasonal regimen, with a verse cited...
$roxy->iching I-Ching oracle API with all 64 hexagrams, 384 changing lines, 8 trigrams, and modern interpretations for love, career...
$roxy->crystals Crystal healing API covering the most popular and widely-searched healing crystals and gemstones, from Amethyst and R...
$roxy->dreams Dream interpretation API with a 2,200+ symbol dream dictionary and psychological meanings covering animals, objects,...
$roxy->angelNumbers Angel numbers API with meanings for 111, 222, 333, 444, 555, 666, 777, 888, 999, 1111, and 75+ sequences covering eve...
$roxy->location Timezone and location API with city search and geocoding across 235,000+ cities in 240+ countries, returning latitude...
$roxy->usage Monitor your API usage, check rate limits, and track request consumption
$roxy->languages List the response languages accepted by the lang query parameter on every i18n-aware endpoint

The table above covers every endpoint and auto-syncs from the OpenAPI spec at release time.

Most-used endpoints

The highest-demand endpoints by domain, in the order you are most likely to ship them. Every example below reads the same birth through a different domain, and every coordinate comes from one location lookup at the top: one API key, one lookup, and eighteen domains that compose into a single product instead of eighteen separate ones. Full catalog in the API reference.

Location first: one lookup feeds every chart

Every chart, horoscope, panchang, dasha, dosha, synastry and compatibility endpoint needs latitude, longitude and timezone. Never ask users to type coordinates. Look the city up once and reuse the result in every domain below.

1. Western astrology API (natal chart, daily horoscope, synastry)

Natal chart products, daily horoscope features, dating and compatibility apps, and lunar-cycle wellness apps start here.

2. Vedic astrology API (kundli, panchang, dasha, Guna Milan, KP)

Kundli generators, matrimonial matching, muhurta and panchang apps, and KP practitioners. The same $birth array, read sidereally.

3. Astrology forecast API (transit forecast, cross-domain timeline)

Forecast feeds, transit alerts and timing tools. One call returns a dated, significance-scored event list; the timeline variant merges Vedic dasha boundaries and biorhythm critical days into the same list, which no single-domain API can do.

4. Human Design API (bodygraph, connection)

Self-discovery apps, coaching bots and compatibility products. The full bodygraph is one call, and the Design side is solved on the exact 88-degree solar arc rather than approximated as calendar days.

5. Chinese zodiac API (BaZi four pillars, zodiac animal, almanac)

BaZi readings, zodiac content and Tong Shu date pages. The school splits that make two calculators disagree (dayBoundary, yearBoundary, hourClock) are typed request parameters with named defaults.

6. Feng shui API (Kua number, flying star chart)

Kua numbers with the Eight Mansions map, Xuan Kong flying star charts for any of the nine periods and 24 mountains, annual and monthly star plates, and the annual afflictions.

7. Mayan astrology API (Tzolkin day sign, full Maya chart)

Maya day signs, the Haab and Long Count, and the Aztec tonalpohualli, every value a function of the date under a typed correlation convention echoed back in conventions.

8. Vastu Shastra API (entrance analysis, room compliance)

Home and plot analysis from typed geometry. Every verdict carries a source object naming the text, chapter and verse it rests on, or a convention label where the texts are silent.

9. Numerology API (life path, full chart, personal year)

Works from the birth date and name alone, no coordinates, which makes it the easiest domain to integrate.

10. Kabbalah API (gematria, birth profile)

Gematria of a Latin name under a declared transliteration convention, the 72 names, the Tree of Life, and a Hebrew birthday computed from the same birth instant as every chart above.

11. Tarot API (daily card, three-card, Celtic Cross, yes or no)

The complete 78-card deck with meanings for love, career, health and spirit. Pass a seed per user for deterministic once-per-day draws.

12. Biorhythm API (reading, forecast)

Ten cycle types across primary, secondary and extended cycles, for wellness, productivity, sports and couples apps.

13. Ayurveda API (dosha constitution, dinacharya)

The dosha profile read from a verified sidereal chart with the verse on each factor, a daily routine anchored on the local sunrise, and the six seasons from real solar ingresses. Every response carries meta.disclaimer.

14. I Ching API (cast a reading, hexagram catalog)

All 64 hexagrams, 384 changing lines and 8 trigrams, for meditation apps, decision tools and wisdom chatbots.

15. Crystal healing API (by zodiac, by chakra, birthstone)

Crystal retail and metaphysical content: "crystals for [sign]" and "[chakra] chakra stones" pages, plus the birthstone for each month.

16. Dream interpretation API (symbol dictionary, search)

A 2,000+ symbol dream dictionary for journal apps, AI companions and self-discovery products.

17. Angel numbers API (1111, 222, 333 meanings plus universal lookup)

Meanings for every common sequence, and a lookup that answers any positive integer through its digit root.

Built for AI agents (Cursor, Claude Code, Copilot, Codex, Gemini CLI)

Your coding agent already knows the API. Built for AI agents, Remote MCP, no local setup.

This package ships with AGENTS.md, a quick start, patterns, gotchas and common-tasks reference that AI coding agents read directly from vendor/.

Agents supporting AGENTS.md (Claude Code, Cursor, GitHub Copilot, OpenAI Codex, Gemini CLI) will pick it up automatically. For other tools, point your agent to vendor/roxyapi/sdk/AGENTS.md.

Prefer MCP? Every domain has a Remote MCP server at https://roxyapi.com/mcp/{domain} (Streamable HTTP, no stdio, no self-hosting). One-line Claude Code setup:

Authentication

Get your API key at roxyapi.com/pricing. Instant delivery after checkout.

Never expose your API key client-side. Call Roxy from server code only.

Multi-language responses

Interpretations and editorial text are available in 10 languages: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Pass lang: as a named argument on any supported method. Defaults to en. Supported: astrology, vedicAstrology, forecast, humanDesign, chineseAstrology, fengShui, mesoamericanAstrology, vastu, numerology, kabbalah, tarot, biorhythm, ayurveda, iching, crystals, angelNumbers, languages. English-only: dreams, location, usage. Languages without translations yet fall back to English.

The two Chinese scripts (zh-Hans, zh-Hant) currently ship on Chinese astrology and feng shui; every other domain answers those codes in English per field. $roxy->languages->listLanguages() returns the canonical list at runtime.

Error handling

Every method throws RoxyAPI\Sdk\RoxyApiException on 4xx / 5xx, so a successful return is always the decoded payload. The exception carries statusCode, errorCode (machine-readable, stable: switch on this), error (human-readable, may change wording), docUrl (the page documenting the code, or null) and retryAfter (whole seconds from the Retry-After header, or null). $e->code() returns the RoxyAPI\Sdk\ErrorCode enum case for errorCode, or null for a code newer than your installed SDK. A validation_error also carries issues, and $e->response is the raw Saloon response. $e->getCode() is the HTTP status, not the API code.

Every error returns { error, code, doc_url }. Switch on code; error is readable text and may change. Each meaning below says whether and when to retry, and Retry-After carries the wait when the response sends it. Every code is documented at https://roxyapi.com/docs/errors.

Status Code Meaning
400 validation_error A field is missing or invalid. The body lists every failing field at once in issues, each with its path and the expected shape.
400 bad_request The request was rejected as a whole, for example a body that is not valid JSON or a date range that ends before it starts.
400 date_out_of_range A date lies outside the span the planetary positions are served for. The error names the supported dates.
401 api_key_required No API key was sent.
401 invalid_api_key The key sent is malformed or cannot be verified.
401 api_key_revoked The key was valid once and has since been revoked from the account page.
401 subscription_not_found The key verifies, but the subscription behind it no longer exists.
401 subscription_inactive The subscription behind the key is cancelled, expired or suspended, or a trial is past its end date.
401 publishable_key_not_allowed_on_mcp A publishable key was used on a Remote MCP server, which takes a secret key.
401 invalid_client_ip A keyless request could not be attributed to a caller.
401 unauthorized Authentication failed with no more specific reason to give.
403 forbidden The key is valid, but this request is not permitted.
403 origin_required A publishable key with an origin allowlist was used with no Origin header, as from a server or a native app.
403 origin_not_allowed The calling site is not on the origin allowlist of this publishable key.
404 not_found Nothing is served at this path, or the identifier in it does not exist. A path miss adds suggestions, the closest real endpoints.
405 method_not_allowed The path exists for a different HTTP method. The body lists the accepted methods in allow, as does the Allow header.
409 conflict The request cannot be applied in the current state.
410 gone The path was removed permanently.
413 payload_too_large The request body is larger than the API accepts. A body far over the cap is refused before it reaches the API and returns a bare 413 with no JSON body.
415 unsupported_media_type A request with a body was sent without Content-Type: application/json.
422 unprocessable_entity Every field is valid, but the combination cannot be computed.
429 rate_limit_exceeded The monthly request allowance is used up. Retry-After gives the seconds to the reset.
429 rate_limit_per_minute The per-minute limit of the plan was reached. Retry-After gives the seconds to the next minute, and the monthly allowance is not charged.
429 rate_limited A rate limit was reached, reported without the plan detail.
429 free_tier_exhausted A keyless request has used up its trial allowance.
500 internal_error The request failed inside our service. Retry with exponential backoff.
503 compute_saturated Heavy calculations are briefly at capacity. Send the same request again after Retry-After seconds.
Any error A fallback for a status with no more specific code. The status and the error field carry the signal.

A validation_error lists every failing field in issues, each with path (a dot-separated field path), message and code:

Retries

The client retries twice by default (a persistent failure sends 3 requests in total, and maxRetries: 0 sends exactly one): HTTP 429, 500, 502, 503 and 504, plus connection failures where the request was never sent. A Retry-After header is honoured, with jitter added. A wait longer than maxDelayMs is not retried: the error is thrown with retryAfter set. Read timeouts are never retried. Pass a RetryPolicy to tune it, or new RetryPolicy(maxRetries: 0) to turn retries off.

Rendering with @roxyapi/ui

This SDK fetches JSON. For HTML rendering, hand the JSON to @roxyapi/ui web components in the browser.

examples/render-with-ui.html shows the full pattern: a PHP endpoint backed by the SDK (examples/natal-chart.php), the browser fetches JSON and assigns it to a <roxy-natal-chart> element. No PHP-side templating.

Testing your integration

Saloon MockClient lets you mock requests by class:

Links

License

MIT


All versions of sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
saloonphp/saloon Version ^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package roxyapi/sdk contains the following files

Loading the files please wait ...