This repo teaches AI coding agents (Cursor, Claude Code, Aider, Codex, Windsurf, RooCode, Gemini CLI) how to use the RoxyAPI compatibility score endpoint.
- Method:
POST - URL:
https://roxyapi.com/api/v2/astrology/compatibility-score - Auth:
X-API-Keyheader - Domain:
astrology(one of 12+ in the RoxyAPI catalog) - Operation ID:
calculateCompatibilitymatches the SDK method name in camelCase - MCP tool:
post_astrology_compatibility_scoreonhttps://roxyapi.com/mcp/astrology
import { createRoxy } from '@roxyapi/sdk';
const roxy = createRoxy(process.env.ROXY_API_KEY!);
const { data, error } = await roxy.astrology.calculateCompatibility({
body: {
person1: {
date: '1990-07-15',
time: '14:30:00',
latitude: 40.7128,
longitude: -74.006,
timezone: 'America/New_York',
},
person2: {
date: '1992-03-20',
time: '09:15:00',
latitude: 34.0522,
longitude: -118.2437,
timezone: 'America/Los_Angeles',
},
},
});import os
from roxy_sdk import create_roxy
roxy = create_roxy(os.environ["ROXY_API_KEY"])
result = roxy.astrology.calculate_compatibility(
person1={
"date": "1990-07-15",
"time": "14:30:00",
"latitude": 40.7128,
"longitude": -74.006,
"timezone": "America/New_York",
},
person2={
"date": "1992-03-20",
"time": "09:15:00",
"latitude": 34.0522,
"longitude": -118.2437,
"timezone": "America/Los_Angeles",
},
)Always call GET /location/search?q={city} TWICE (once per person) before calling compatibility. Take latitude, longitude, timezone from cities[0] and pipe them in. Never ask the user to type coordinates.
const { data: loc1 } = await roxy.location.searchCities({ query: { q: 'New York' } });
const { data: loc2 } = await roxy.location.searchCities({ query: { q: 'Los Angeles' } });person1(object, required):date(YYYY-MM-DD),time(HH:MM:SS),latitude(-90 to 90),longitude(-180 to 180),timezone(decimal UTC offset OR IANA name).person2(object, required): same shape asperson1. Compared against person1 for inter-chart aspects.timezoneaccepts both a decimal offset and an IANA name. Prefer passingcities[0].timezonedirectly. The server resolves the DST-correct offset per birth date independently.
overallScore: 0-100 weighted average across the five categories.categories: romantic, emotional, intellectual, physical, spiritual (each 0-100).persons: Sun, Moon, Venus, Mars sign and degree for each person.signCompatibility: Sun, Moon, Venus, Mars sign pair narratives.elementBalance: fire, earth, air, water counts per chart plussharedElementand a description.archetype:labelplusdescription. One of eight archetypes.strengths,challenges: narrative arrays from harmonious and challenging aspects.summary,interpretation: narrative text.aspectBreakdown: total, harmonious, challenging, neutral counts.keyAspects: top inter-chart aspects with planet1, planet2, type, orb, interpretation, description.
- This endpoint requires two full birth data objects. Both
person1andperson2are required. - Always call
/location/searchTWICE, once per person, before calling compatibility. Never hardcode coordinates. - This is the lightweight scored answer (percent, category breakdown, archetype, sign blocks). For the full practitioner inter-aspect table with orbs and strength use
POST /astrology/synastryinstead. categories.spiritualcan be low even when other categories are high. Each category maps to distinct planetary pairs, so scores diverge by design.elementBalance.sharedElementis null when the two charts have different dominant elements. Do not treat null as an error.- Aspect types in
keyAspects[].type: CONJUNCTION, OPPOSITION, TRINE, SQUARE, SEXTILE, QUINCUNX, SEMISEXTILE, SEMISQUARE, SESQUIQUADRATE.
POST /astrology/synastry(calculateSynastry): full inter-aspect table with orb, strength, and meaningPOST /astrology/natal-chart(generateNatalChart): full natal chart per person with sign, house, interpretationPOST /astrology/composite-chart(generateCompositeChart): midpoint composite chart for the relationship itself
2026-Q3 against https://roxyapi.com/api/v2/openapi.json. Re-fetch the spec for ground truth before changing this file.
- Full catalog: https://roxyapi.com/AGENTS.md
- LLM index: https://roxyapi.com/llms.txt
- Methodology: https://roxyapi.com/methodology