Modules
AstroAPI features are organized into modules.
Available Modules
| Module | Description |
|---|---|
natal | Basic natal chart calculations |
transits | Transit calculations and tracking |
synastry | Synastry and composite charts |
content-basic | Basic interpretation library |
content-premium | Extended interpretation library |
charts | SVG/PNG chart rendering |
horoscopes | AI-powered daily horoscopes |
Checking Module Access
bash
curl -X GET "https://api.astroapi.cloud/api/modules" \
-H "X-Api-Key: your-api-key"Response
json
{
"data": [
{
"type": "module",
"id": "natal",
"attributes": {
"name": "Natal Charts",
"enabled": true,
"expiresAt": null
}
},
{
"type": "module",
"id": "transits",
"attributes": {
"name": "Transits",
"enabled": true,
"expiresAt": "2024-12-31T23:59:59Z"
}
}
]
}Module-Gated Endpoints
When accessing an endpoint that requires a module you don't have:
json
{
"errors": [{
"status": "403",
"title": "Module Required",
"detail": "This endpoint requires the 'synastry' module.",
"meta": {
"requiredModule": "synastry"
}
}]
}API Key Permissions
API keys can be restricted to specific modules. Even if your organization has access to a module, individual API keys can be scoped to exclude it:
json
{
"apiKey": {
"modules": ["natal", "content-basic"]
}
}