Ashwagosha APIs

Integrate Jyotisha from a trusted server-side application. Review the Swagger reference and create a test API key for the gated /v1/jyotisha API.

Jyotisha API Swagger reference Base URL: https://api.ashwagosha.com/v1/jyotisha

Quickstart

Make your first API request

Use a read-only test key from a trusted backend. The complete key is shown once when it is created.

  1. Create a test keyOpen the developer console and grant jyotisha:read.
  2. Set the environment variableStore the key in your backend secret manager as ASHWAGOSHA_API_KEY.
  3. Send the requestCall the gated endpoint and treat non-success responses as errors.
cURL
export ASHWAGOSHA_API_KEY='ag_test_<prefix>_<secret>'

curl --fail-with-body \
  --dump-header - \
  -H 'Accept: application/json' \
  -H "X-API-Key: ${ASHWAGOSHA_API_KEY}" \
  https://api.ashwagosha.com/v1/jyotisha/horoscope/rashi-profile/Simha
Python
# pip install requests
import os
import requests

response = requests.get(
    "https://api.ashwagosha.com/v1/jyotisha/horoscope/rashi-profile/Simha",
    headers={
        "Accept": "application/json",
        "X-API-Key": os.environ["ASHWAGOSHA_API_KEY"],
    },
    timeout=15,
)
response.raise_for_status()
print("request_id=", response.headers.get("X-Request-ID"))
print("rate_limit=", response.headers.get("RateLimit"))
print(response.json())
Node.js 18+ (ESM)
const apiKey = process.env.ASHWAGOSHA_API_KEY;
if (!apiKey) throw new Error("ASHWAGOSHA_API_KEY is required");

const response = await fetch(
  "https://api.ashwagosha.com/v1/jyotisha/horoscope/rashi-profile/Simha",
  {
    headers: {
      "Accept": "application/json",
      "X-API-Key": apiKey,
    },
  },
);

if (!response.ok) {
  throw new Error(`${response.status} ${await response.text()}`);
}

console.log("request_id=", response.headers.get("x-request-id"));
console.log("rate_limit=", response.headers.get("ratelimit"));
console.log(await response.json());

Response excerpt

Selected fields are shown below. Use the Swagger response schema as the complete contract.

200 OK application/json
{
  "rashi": 5,
  "sign": "Simha",
  "lord": "Sun",
  "element": "Fire (Agni)",
  "lucky_day": "Sunday"
}

Headers to keep

X-Request-ID

Request tracing

Store this value with application logs and support reports.

RateLimit

Short-term capacity

Use the remaining count and reset time to pace requests.

X-Ashwagosha-Monthly-Credit-Remaining

Monthly usage

Monitor remaining credits before the account reaches its limit.

Common errors

401

API key required

The key is missing, invalid, disabled, expired, or was replaced by rotation.

403

Access not permitted

The key lacks jyotisha:read, or a test key was used for a write operation.

429

Limit reached

Honor Retry-After and retry with bounded exponential backoff and jitter.

401 Unauthorizedapplication/problem+json
{
  "type": "https://api.ashwagosha.com/problems/missing-api-key",
  "title": "API key required",
  "status": 401,
  "detail": "Missing, invalid, inactive, or expired developer API key.",
  "instance": "/v1/jyotisha/horoscope/rashi-profile/Simha",
  "request_id": "4fd7c4f4d2e6470fb7d47a9c72dfe5bb"
}

Developer access

Manage your API key

API access is separate from webapp access. A verified identity can activate the free Developer plan immediately. No administrator approval is required. Manage the credential in the developer console.

One current key per API consumer. The Developer plan issues one test key with jyotisha:read. Live keys and write access are unavailable until commercial activation is enabled.
Create

Save it once

The complete plaintext appears only after creation. Later views show a masked prefix.

Disable · Enable

Pause access

Disabling rejects requests immediately. Enabling restores the same key without changing its secret.

Rotate

Replace the secret

Rotation creates a new key and revokes the previous key immediately. There is no overlap window.

Suspected exposure

Contain first

Disable the key, review security activity and usage, then rotate before restoring access.

Credential handling

  • Store the key in a server-side secret manager or protected environment variable.
  • Never place it in browser JavaScript, mobile or desktop bundles, source control, URLs, or logs.
  • Update every backend instance immediately after rotation; the old key stops working at once.

API reference

Jyotisha API

Jyotisha is the only API currently published for third-party integrations. Review its operation groups below, then open the interactive reference or download the OpenAPI document.

Jyotisha

Charts, Vedic calculations, readings, rituals, and planning endpoints.

Developer scope: jyotisha:read or jyotisha:write
  • Horoscope
  • Panchang
  • Kundali
  • Muhurta
  • Dashas
  • Remedies

Before production

API fundamentals

Apply these rules to every integration. Operation-specific details remain authoritative in the Swagger reference.

https://api.ashwagosha.com/v1/jyotisha

Base URL

Use the gated /v1/jyotisha base from a trusted backend. Every request requires a scoped X-API-Key.

X-Request-ID

Request tracing

You may provide a request ID. The gateway returns the authoritative value; store it with errors and support reports.

ISO 8601 · IANA timezone

Dates and timezones

Send ISO 8601 dates and timestamps. When an operation accepts a timezone, use an IANA identifier such as Asia/Kolkata.

application/problem+json

Error format

Gateway authentication and limit failures use a problem document with type, status, detail, and request_id. Operation validation follows its Swagger schema.

15s · 429 · 502 · 503 · 504

Timeouts and retries

Start ordinary JSON calls with a 15-second client timeout. Retry only transient responses with bounded exponential backoff and jitter, and honor Retry-After.

/v1

Versioning and deprecation

Breaking contract changes require a new major path such as /v2; additive fields may appear within /v1. During preview, no minimum deprecation window is guaranteed, so review published documentation before production releases.

Authentication matrix

CredentialWhen requiredHeaderRepresents
Developer API keyEvery /v1/jyotisha requestX-API-KeyThe API-consuming application or company
User bearer tokenOnly operations marked as user-protected in SwaggerAuthorization: Bearer …The webapp or mobile-app end user

Plans and limits

Preview tiers

Billing is not enabled. Free Developer-plan request and monthly credit limits are enforced on the gated API. Paid plans remain unavailable until Razorpay checkout and verification are enabled.

Developer

Available

1,000 credits · 5 requests/second · 1 current API key

₹0per month

Builder

Preview · unavailable

20,000 credits · 20 requests/second · 1 current API key

₹999preview price

Professional

Preview · unavailable

100,000 credits · 50 requests/second · 1 current API key

₹3,999preview price

Premium

Preview · unavailable

300,000 credits · 100 requests/second · 1 current API key

₹9,999preview price

Enterprise

Unavailable

Contracted capacity, support, data terms, and deployment options

Customnot yet offered

Credit schedule

1 credit

Standard · active

Reference profiles, horoscope, Panchang, Kundali, Muhurta, and most calculations.

5 credits

Enhanced · reserved

Reserved for future published multi-part Jyotisha reports; no current Jyotisha route uses this class.

10 credits

Intelligence · active

AI astrologer, Astro DNA, multi-life, and birth-time rectification families.

25 credits

High compute · reserved

Reserved for future published high-compute operations; no current Jyotisha route uses this class.

Monthly credits reset at 00:00 UTC on the first day of each month. Credits are reserved after credential, scope, and rate checks but before the operation executes, so a downstream 4xx or 5xx response may still consume the operation's credits.

Resources

Continue with the reference

Open the interactive contract, manage credentials, or contact the API team.