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.
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.
- Create a test keyOpen the developer console and grant
jyotisha:read. - Set the environment variableStore the key in your backend secret manager as
ASHWAGOSHA_API_KEY. - 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.
{
"rashi": 5,
"sign": "Simha",
"lord": "Sun",
"element": "Fire (Agni)",
"lucky_day": "Sunday"
}
Headers to keep
X-Request-IDRequest tracing
Store this value with application logs and support reports.
RateLimitShort-term capacity
Use the remaining count and reset time to pace requests.
X-Ashwagosha-Monthly-Credit-RemainingMonthly usage
Monitor remaining credits before the account reaches its limit.
Common errors
401API key required
The key is missing, invalid, disabled, expired, or was replaced by rotation.
403Access not permitted
The key lacks jyotisha:read, or a test key was used for a write operation.
429Limit reached
Honor Retry-After and retry with bounded exponential backoff and jitter.
{
"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.
jyotisha:read. Live keys and
write access are unavailable until commercial activation is enabled.
CreateSave it once
The complete plaintext appears only after creation. Later views show a masked prefix.
Disable · EnablePause access
Disabling rejects requests immediately. Enabling restores the same key without changing its secret.
RotateReplace the secret
Rotation creates a new key and revokes the previous key immediately. There is no overlap window.
Suspected exposureContain 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
| Credential | When required | Header | Represents |
|---|---|---|---|
| Developer API key | Every /v1/jyotisha request | X-API-Key | The API-consuming application or company |
| User bearer token | Only operations marked as user-protected in Swagger | Authorization: Bearer … | The webapp or mobile-app end user |
Plans and limits
Preview tiers
Developer
Available1,000 credits · 5 requests/second · 1 current API key
Builder
Preview · unavailable20,000 credits · 20 requests/second · 1 current API key
Professional
Preview · unavailable100,000 credits · 50 requests/second · 1 current API key
Premium
Preview · unavailable300,000 credits · 100 requests/second · 1 current API key
Enterprise
UnavailableContracted capacity, support, data terms, and deployment options
Credit schedule
1 creditStandard · active
Reference profiles, horoscope, Panchang, Kundali, Muhurta, and most calculations.
5 creditsEnhanced · reserved
Reserved for future published multi-part Jyotisha reports; no current Jyotisha route uses this class.
10 creditsIntelligence · active
AI astrologer, Astro DNA, multi-life, and birth-time rectification families.
25 creditsHigh compute · reserved
Reserved for future published high-compute operations; no current Jyotisha route uses this class.
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.