{"name":"The Leo King Business Intelligence API Examples","version":"v1","status":"public-contract","contractVersion":"2026-07-07.enterprise-trust-console-audit-webhook-versioning-limits-examples-support-procurement-conformance-data-processing-launch-readiness-access-control-compliance-map-ai-governance-v1","lastReviewedAt":"2026-07-07","usage":"Use these examples for integration review, SDK smoke tests, generated-client QA, and partner onboarding. Production requests must still use backend-held API keys.","cookbooks":[{"id":"core-chart-compute","title":"Core Chart Compute","audience":"High-volume apps that need first-party astrology facts without AI spend.","goal":"Calculate deterministic chart, transit, lunar, synastry, compatibility, or helio background data and store it for repeated product use.","routes":["/v1/charts/natal","/v1/charts/current-sky","/v1/charts/transits","/v1/lunar/phase","/v1/helio/patterns"],"steps":["Collect the minimum birth or event timing fields for the selected route.","Send x-api-key from backend code and include Idempotency-Key for POST retries.","Persist request_id, usage.credits, and the deterministic data payload.","Use the stored substrate for matching, filters, timing labels, or later AI synthesis."],"proof":["usage.lane is core","tokens are absent","meta reports owned calculation basis where applicable"]},{"id":"commerce-audience-intelligence","title":"Commerce Audience Intelligence","audience":"Shopify, CRM, email, SMS, and funnel teams scoring audiences before campaign sends.","goal":"Score customer fit, message angle, and timing against a product or campaign context.","routes":["/v1/audience/insights","/v1/customer/profile"],"steps":["Batch customers with stable partner-side customer ids.","Include campaign context so the API scores against a concrete offer.","Use returned request_id for support and usage reconciliation.","Inspect campaign_fit before sending or suppressing a customer segment."],"proof":["usage.lane is ai","chart quality metadata is present","fallback-looking output fails instead of billing"]},{"id":"async-world-signals","title":"Async World Signals","audience":"Media, market, geopolitical, insurance, crypto, and research teams that need deeper BTV-style forecasts.","goal":"Create a deep forecast job, poll until complete, and bill only after a quality-gated result is stored.","routes":["/v1/world/signals/jobs","/v1/world/signals/jobs/{jobId}","/v1/world/signals"],"steps":["Create the job with topic, depth, window_days, and a stable Idempotency-Key.","Store job_id and status_url in the partner system.","Poll status_url until complete or failed.","Display result only after the complete envelope contains data.result, usage, and meta."],"proof":["create returns 202","polling does not bill usage","completed jobs include quality-gated forecast envelope"]},{"id":"dating-compatibility-stack","title":"Dating Compatibility Stack","audience":"Dating, wellness, coaching, and relationship apps.","goal":"Run no-AI synastry and compatibility first, then offer premium love products only when the user pays for interpretation.","routes":["/v1/charts/synastry","/v1/compatibility/score","/v1/experiences/love-reveal","/v1/experiences/future-partner-vision"],"steps":["Precompute synastry and compatibility using owned chart math.","Store compatibility score, strengths, and risk flags for ranking.","Use premium experience routes for paid reveals, not every swipe.","Keep generated output quality-gated and tied to request_id."],"proof":["core routes avoid model tokens","premium routes expose AI usage","relationship output includes structured sections"]}],"endpointExamples":[{"name":"Audience Intelligence","slug":"audience-intelligence","group":"intelligence","method":"POST","path":"/v1/audience/insights","localPath":"/api/v1/audience/insights","status":"live","credits":"2 credits per customer","purpose":"Generate customer-level buyer archetypes, campaign fit, timing notes, and message angles from birth data and campaign context.","reference":"/api-docs/reference/audience-intelligence","example":{"label":"Campaign Fit","request":{"customers":[{"id":"cust_123","dob":"1990-07-23","tob":"14:30","pob":"New York, US"}],"campaign_context":{"product_category":"relationship coaching membership","tone":"warm direct","channel":"email"}},"response":{"request_id":"req_...","data":{"results":[{"customer_id":"cust_123","personality":{"sun_sign":"Leo","buyer_archetype":"premium loyalist"},"campaign_fit":{"score":0.86,"send":true,"reasoning":"High receptivity window"}}]},"usage":{"lane":"ai","credits":2,"billableUnits":1},"meta":{"chartQuality":[{"customer_id":"cust_123","quality":"full_chart"}]}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/audience/insights \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: audience-intelligence-subject-123-v1\" \\\n  -d '{\n  \"customers\": [\n    {\n      \"id\": \"cust_123\",\n      \"dob\": \"1990-07-23\",\n      \"tob\": \"14:30\",\n      \"pob\": \"New York, US\"\n    }\n  ],\n  \"campaign_context\": {\n    \"product_category\": \"relationship coaching membership\",\n    \"tone\": \"warm direct\",\n    \"channel\": \"email\"\n  }\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.audienceInsights(\n  {\n  \"customers\": [\n    {\n      \"id\": \"cust_123\",\n      \"dob\": \"1990-07-23\",\n      \"tob\": \"14:30\",\n      \"pob\": \"New York, US\"\n    }\n  ],\n  \"campaign_context\": {\n    \"product_category\": \"relationship coaching membership\",\n    \"tone\": \"warm direct\",\n    \"channel\": \"email\"\n  }\n},\n  \"audience-intelligence-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.audience_insights(\n    {\n        \"customers\": [\n            {\n                \"id\": \"cust_123\",\n                \"dob\": \"1990-07-23\",\n                \"tob\": \"14:30\",\n                \"pob\": \"New York, US\",\n            },\n        ],\n        \"campaign_context\": {\n            \"product_category\": \"relationship coaching membership\",\n            \"tone\": \"warm direct\",\n            \"channel\": \"email\",\n        },\n    },\n    idempotency_key=\"audience-intelligence-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"Future Partner Vision","slug":"future-partner-vision","group":"experiences","method":"POST","path":"/v1/experiences/future-partner-vision","localPath":"/api/v1/experiences/future-partner-vision","status":"alpha","credits":"8 credits per vision","purpose":"Generate a structured future partner profile, relationship scene, attraction pattern, timing window, and optional image prompt from birth data and love context.","reference":"/api-docs/reference/future-partner-vision","example":{"label":"Partner Vision","request":{"subject":{"id":"user_123","dob":"1990-07-23","tob":"14:30","pob":"New York, US"},"intent":"future long-term partner","context":{"relationship_status":"single","desired_tone":"direct, cinematic, grounded"}},"response":{"request_id":"req_...","data":{"partner_archetype":"magnetic builder with public confidence and private loyalty","meeting_scene":{"setting":"a work-adjacent creative event","signal":"conversation starts through a practical offer, then turns intimate"},"timing_windows":[{"start":"2026-08-04","end":"2026-09-12","confidence":0.72}],"image_prompt":"premium cinematic future partner portrait..."},"usage":{"lane":"ai","credits":8,"billableUnits":1},"meta":{"status":"alpha","requiredSystems":["geocentric_tropical","love_5_7_8"]}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/experiences/future-partner-vision \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: future-partner-vision-subject-123-v1\" \\\n  -d '{\n  \"subject\": {\n    \"id\": \"user_123\",\n    \"dob\": \"1990-07-23\",\n    \"tob\": \"14:30\",\n    \"pob\": \"New York, US\"\n  },\n  \"intent\": \"future long-term partner\",\n  \"context\": {\n    \"relationship_status\": \"single\",\n    \"desired_tone\": \"direct, cinematic, grounded\"\n  }\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.futurePartnerVision(\n  {\n  \"subject\": {\n    \"id\": \"user_123\",\n    \"dob\": \"1990-07-23\",\n    \"tob\": \"14:30\",\n    \"pob\": \"New York, US\"\n  },\n  \"intent\": \"future long-term partner\",\n  \"context\": {\n    \"relationship_status\": \"single\",\n    \"desired_tone\": \"direct, cinematic, grounded\"\n  }\n},\n  \"future-partner-vision-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.future_partner_vision(\n    {\n        \"subject\": {\n            \"id\": \"user_123\",\n            \"dob\": \"1990-07-23\",\n            \"tob\": \"14:30\",\n            \"pob\": \"New York, US\",\n        },\n        \"intent\": \"future long-term partner\",\n        \"context\": {\n            \"relationship_status\": \"single\",\n            \"desired_tone\": \"direct, cinematic, grounded\",\n        },\n    },\n    idempotency_key=\"future-partner-vision-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"Love Reveal","slug":"love-reveal","group":"experiences","method":"POST","path":"/v1/experiences/love-reveal","localPath":"/api/v1/experiences/love-reveal","status":"alpha","credits":"5 credits per reveal","purpose":"Generate a high-specificity love reading that can blend psychic interpretation, tarot symbolism, owned astrology context, and 5-7-8 relationship logic.","reference":"/api-docs/reference/love-reveal","example":{"label":"Love Reveal","request":{"question":"Is this connection coming back or should I move on?","subject":{"id":"user_123","dob":"1990-07-23"},"context":{"relationship_status":"separated","desired_tone":"clear and compassionate"}},"response":{"request_id":"req_...","data":{"answer":"This connection is not fully closed, but the return depends on whether accountability replaces silence.","dynamic":"strong chemistry with weak consistency","next_action":"Do not chase. Ask one direct question and watch behavior, not emotion."},"usage":{"lane":"ai","credits":5,"billableUnits":1},"meta":{"status":"alpha","persona":"lady-avalon"}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/experiences/love-reveal \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: love-reveal-subject-123-v1\" \\\n  -d '{\n  \"question\": \"Is this connection coming back or should I move on?\",\n  \"subject\": { \"id\": \"user_123\", \"dob\": \"1990-07-23\" },\n  \"context\": {\n    \"relationship_status\": \"separated\",\n    \"desired_tone\": \"clear and compassionate\"\n  }\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.loveReveal(\n  {\n  \"question\": \"Is this connection coming back or should I move on?\",\n  \"subject\": { \"id\": \"user_123\", \"dob\": \"1990-07-23\" },\n  \"context\": {\n    \"relationship_status\": \"separated\",\n    \"desired_tone\": \"clear and compassionate\"\n  }\n},\n  \"love-reveal-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.love_reveal(\n    {\n        \"question\": \"Is this connection coming back or should I move on?\",\n        \"subject\": {\n            \"id\": \"user_123\",\n            \"dob\": \"1990-07-23\",\n        },\n        \"context\": {\n            \"relationship_status\": \"separated\",\n            \"desired_tone\": \"clear and compassionate\",\n        },\n    },\n    idempotency_key=\"love-reveal-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"Crystal Ball Vision","slug":"crystal-ball-vision","group":"experiences","method":"POST","path":"/v1/experiences/crystal-ball","localPath":"/api/v1/experiences/crystal-ball","status":"alpha","credits":"4 credits per vision","purpose":"Generate a cinematic symbolic vision with concrete interpretation, action guidance, and optional image-generation direction.","reference":"/api-docs/reference/crystal-ball-vision","example":{"label":"Crystal Vision","request":{"question":"What is the hidden opportunity around this career change?","topic":"career","style":"cinematic, concise, grounded"},"response":{"request_id":"req_...","data":{"vision":"A black door opens into a violet-lit room where a desk is already waiting.","meaning":"The opportunity is not more searching. It is accepting a role that asks you to be seen.","action":"Say yes to the serious invitation, not the familiar backup plan."},"usage":{"lane":"ai","credits":4,"billableUnits":1},"meta":{"status":"alpha","knowledge":["psychic","symbols"]}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/experiences/crystal-ball \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: crystal-ball-vision-subject-123-v1\" \\\n  -d '{\n  \"question\": \"What is the hidden opportunity around this career change?\",\n  \"topic\": \"career\",\n  \"style\": \"cinematic, concise, grounded\"\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.crystalBall(\n  {\n  \"question\": \"What is the hidden opportunity around this career change?\",\n  \"topic\": \"career\",\n  \"style\": \"cinematic, concise, grounded\"\n},\n  \"crystal-ball-vision-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.crystal_ball(\n    {\n        \"question\": \"What is the hidden opportunity around this career change?\",\n        \"topic\": \"career\",\n        \"style\": \"cinematic, concise, grounded\",\n    },\n    idempotency_key=\"crystal-ball-vision-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"Oracle Ask","slug":"oracle-ask","group":"experiences","method":"POST","path":"/v1/oracle/ask","localPath":"/api/v1/oracle/ask","status":"alpha","credits":"2 credits per answer","purpose":"Answer a direct spiritual question through the paid Lady Avalon API path with strict JSON output, usage metering, and no legacy MCP dependency.","reference":"/api-docs/reference/oracle-ask","example":{"label":"Oracle Question","request":{"question":"What is the real opportunity in front of me right now?","birth_date":"1990-07-23","topic":"career","context":{"desired_tone":"direct and grounded"}},"response":{"request_id":"req_...","data":{"answer":"The opportunity is to take the visible role instead of staying behind the buildout.","insight":"The pattern is asking for leadership with cleaner boundaries.","next_action":"Make the direct offer this week and remove the backup option."},"usage":{"lane":"ai","credits":2,"billableUnits":1}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/oracle/ask \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: oracle-ask-subject-123-v1\" \\\n  -d '{\n  \"question\": \"What is the real opportunity in front of me right now?\",\n  \"birth_date\": \"1990-07-23\",\n  \"topic\": \"career\",\n  \"context\": { \"desired_tone\": \"direct and grounded\" }\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.oracleAsk(\n  {\n  \"question\": \"What is the real opportunity in front of me right now?\",\n  \"birth_date\": \"1990-07-23\",\n  \"topic\": \"career\",\n  \"context\": { \"desired_tone\": \"direct and grounded\" }\n},\n  \"oracle-ask-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.oracle_ask(\n    {\n        \"question\": \"What is the real opportunity in front of me right now?\",\n        \"birth_date\": \"1990-07-23\",\n        \"topic\": \"career\",\n        \"context\": {\n            \"desired_tone\": \"direct and grounded\",\n        },\n    },\n    idempotency_key=\"oracle-ask-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"Tarot Draw","slug":"tarot-draw","group":"experiences","method":"POST","path":"/v1/tarot/draw","localPath":"/api/v1/tarot/draw","status":"alpha","credits":"2 credits per spread","purpose":"Draw and interpret tarot spreads from the local 78-card Rider-Waite-Smith corpus with deterministic seed support and paid API metering.","reference":"/api-docs/reference/tarot-draw","example":{"label":"Three Card Spread","request":{"question":"What do I need to know about this relationship?","spread_type":"three_card","topic":"love","seed":"partner-reading-001"},"response":{"request_id":"req_...","data":{"spread":{"type":"three_card","cards":[{"name":"The Lovers","position":"situation","orientation":"upright"}]},"answer":"The connection is real, but the choice must become conscious."},"usage":{"lane":"ai","credits":2,"billableUnits":1}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/tarot/draw \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: tarot-draw-subject-123-v1\" \\\n  -d '{\n  \"question\": \"What do I need to know about this relationship?\",\n  \"spread_type\": \"three_card\",\n  \"topic\": \"love\",\n  \"seed\": \"partner-reading-001\"\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.tarotDraw(\n  {\n  \"question\": \"What do I need to know about this relationship?\",\n  \"spread_type\": \"three_card\",\n  \"topic\": \"love\",\n  \"seed\": \"partner-reading-001\"\n},\n  \"tarot-draw-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.tarot_draw(\n    {\n        \"question\": \"What do I need to know about this relationship?\",\n        \"spread_type\": \"three_card\",\n        \"topic\": \"love\",\n        \"seed\": \"partner-reading-001\",\n    },\n    idempotency_key=\"tarot-draw-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"Past-Life Reading","slug":"past-life-reading","group":"experiences","method":"POST","path":"/v1/past-life/reading","localPath":"/api/v1/past-life/reading","status":"alpha","credits":"10 credits per reading","purpose":"Generate an AstraGate-style past-life reading with structured scene, karmic pattern, present-life echo, healing action, and empowerment.","reference":"/api-docs/reference/past-life-reading","example":{"label":"Soul Mission","request":{"subject":{"id":"user_123","dob":"1990-07-23"},"focus":"soul_mission","question":"What old pattern am I here to complete?"},"response":{"request_id":"req_...","data":{"lifetime_theme":"A life of carrying sacred knowledge while hiding your public voice.","healing_action":"Choose one truth and speak it plainly this week."},"usage":{"lane":"ai","credits":10,"billableUnits":1}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/past-life/reading \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: past-life-reading-subject-123-v1\" \\\n  -d '{\n  \"subject\": { \"id\": \"user_123\", \"dob\": \"1990-07-23\" },\n  \"focus\": \"soul_mission\",\n  \"question\": \"What old pattern am I here to complete?\"\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.pastLifeReading(\n  {\n  \"subject\": { \"id\": \"user_123\", \"dob\": \"1990-07-23\" },\n  \"focus\": \"soul_mission\",\n  \"question\": \"What old pattern am I here to complete?\"\n},\n  \"past-life-reading-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.past_life_reading(\n    {\n        \"subject\": {\n            \"id\": \"user_123\",\n            \"dob\": \"1990-07-23\",\n        },\n        \"focus\": \"soul_mission\",\n        \"question\": \"What old pattern am I here to complete?\",\n    },\n    idempotency_key=\"past-life-reading-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"Synastry Chart","slug":"synastry-chart","group":"relationships","method":"POST","path":"/v1/charts/synastry","localPath":"/api/v1/charts/synastry","status":"alpha","credits":"3 credits per pair","purpose":"Return owned geocentric tropical synastry data and relationship aspect overlays without calling an external astrology API.","reference":"/api-docs/reference/synastry-chart","example":{"label":"Synastry Pair","request":{"subject":{"id":"person_a","dob":"1990-07-23","tob":"14:30","pob":"New York, US"},"partner":{"id":"person_b","dob":"1992-11-08","tob":"09:15","pob":"Los Angeles, US"},"max_aspects":40},"response":{"request_id":"req_...","data":{"pair_id":"person_a:person_b","calculation_basis":{"frame":"geocentric","zodiac":"tropical","system":"owned sidecar"},"aspects":[],"relationship_signals":[]},"usage":{"lane":"core","credits":3,"billableUnits":1}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/charts/synastry \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: synastry-chart-subject-123-v1\" \\\n  -d '{\n  \"subject\": {\n    \"id\": \"person_a\",\n    \"dob\": \"1990-07-23\",\n    \"tob\": \"14:30\",\n    \"pob\": \"New York, US\"\n  },\n  \"partner\": {\n    \"id\": \"person_b\",\n    \"dob\": \"1992-11-08\",\n    \"tob\": \"09:15\",\n    \"pob\": \"Los Angeles, US\"\n  },\n  \"max_aspects\": 40\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.synastryChart(\n  {\n  \"subject\": {\n    \"id\": \"person_a\",\n    \"dob\": \"1990-07-23\",\n    \"tob\": \"14:30\",\n    \"pob\": \"New York, US\"\n  },\n  \"partner\": {\n    \"id\": \"person_b\",\n    \"dob\": \"1992-11-08\",\n    \"tob\": \"09:15\",\n    \"pob\": \"Los Angeles, US\"\n  },\n  \"max_aspects\": 40\n},\n  \"synastry-chart-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.synastry_chart(\n    {\n        \"subject\": {\n            \"id\": \"person_a\",\n            \"dob\": \"1990-07-23\",\n            \"tob\": \"14:30\",\n            \"pob\": \"New York, US\",\n        },\n        \"partner\": {\n            \"id\": \"person_b\",\n            \"dob\": \"1992-11-08\",\n            \"tob\": \"09:15\",\n            \"pob\": \"Los Angeles, US\",\n        },\n        \"max_aspects\": 40,\n    },\n    idempotency_key=\"synastry-chart-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"Compatibility Score","slug":"compatibility-score","group":"relationships","method":"POST","path":"/v1/compatibility/score","localPath":"/api/v1/compatibility/score","status":"alpha","credits":"4 credits per pair","purpose":"Score relationship compatibility using synastry, 5-7-8 house activation, love-planet frameworks, and optional StarTypes background comparison.","reference":"/api-docs/reference/compatibility-score","example":{"label":"Compatibility Score","request":{"subject":{"id":"person_a","dob":"1990-07-23","tob":"14:30","pob":"New York, US"},"partner":{"id":"person_b","dob":"1992-11-08","tob":"09:15","pob":"Los Angeles, US"},"context":{"relationship_type":"dating"},"include_helio_background":false},"response":{"request_id":"req_...","data":{"score":87,"tier":"high","subscores":{"romance_5th":0.82,"partnership_7th":0.9,"intimacy_8th":0.78},"risk_flags":["strong attraction requires direct communication"]},"usage":{"lane":"core","credits":4,"billableUnits":1}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/compatibility/score \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: compatibility-score-subject-123-v1\" \\\n  -d '{\n  \"subject\": { \"id\": \"person_a\", \"dob\": \"1990-07-23\", \"tob\": \"14:30\", \"pob\": \"New York, US\" },\n  \"partner\": { \"id\": \"person_b\", \"dob\": \"1992-11-08\", \"tob\": \"09:15\", \"pob\": \"Los Angeles, US\" },\n  \"context\": { \"relationship_type\": \"dating\" },\n  \"include_helio_background\": false\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.compatibilityScore(\n  {\n  \"subject\": { \"id\": \"person_a\", \"dob\": \"1990-07-23\", \"tob\": \"14:30\", \"pob\": \"New York, US\" },\n  \"partner\": { \"id\": \"person_b\", \"dob\": \"1992-11-08\", \"tob\": \"09:15\", \"pob\": \"Los Angeles, US\" },\n  \"context\": { \"relationship_type\": \"dating\" },\n  \"include_helio_background\": false\n},\n  \"compatibility-score-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.compatibility_score(\n    {\n        \"subject\": {\n            \"id\": \"person_a\",\n            \"dob\": \"1990-07-23\",\n            \"tob\": \"14:30\",\n            \"pob\": \"New York, US\",\n        },\n        \"partner\": {\n            \"id\": \"person_b\",\n            \"dob\": \"1992-11-08\",\n            \"tob\": \"09:15\",\n            \"pob\": \"Los Angeles, US\",\n        },\n        \"context\": {\n            \"relationship_type\": \"dating\",\n        },\n        \"include_helio_background\": False,\n    },\n    idempotency_key=\"compatibility-score-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"Natal Chart Calculation","slug":"natal-chart","group":"charts","method":"POST","path":"/v1/charts/natal","localPath":"/api/v1/charts/natal","status":"alpha","credits":"2 credits per chart","purpose":"Return a geocentric tropical natal chart from the Kerykeion/Swiss sidecar for partners that need raw chart data, not generated interpretation.","reference":"/api-docs/reference/natal-chart","example":{"label":"Full Natal Chart","request":{"subject":{"id":"subject_123","dob":"1990-07-23","tob":"14:30","pob":"New York, US"}},"response":{"request_id":"req_...","data":{"subject_id":"subject_123","calculation_basis":{"frame":"geocentric","zodiac":"tropical","system":"Kerykeion sidecar"},"sun_sign":"Leo","chart":{"planets":[],"houses":[],"aspects":[]}},"usage":{"lane":"core","credits":2,"billableUnits":1}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/charts/natal \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: natal-chart-subject-123-v1\" \\\n  -d '{\n  \"subject\": {\n    \"id\": \"subject_123\",\n    \"dob\": \"1990-07-23\",\n    \"tob\": \"14:30\",\n    \"pob\": \"New York, US\"\n  }\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.natalChart(\n  {\n  \"subject\": {\n    \"id\": \"subject_123\",\n    \"dob\": \"1990-07-23\",\n    \"tob\": \"14:30\",\n    \"pob\": \"New York, US\"\n  }\n},\n  \"natal-chart-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.natal_chart(\n    {\n        \"subject\": {\n            \"id\": \"subject_123\",\n            \"dob\": \"1990-07-23\",\n            \"tob\": \"14:30\",\n            \"pob\": \"New York, US\",\n        },\n    },\n    idempotency_key=\"natal-chart-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"Transit Chart Calculation","slug":"transit-chart","group":"charts","method":"POST","path":"/v1/charts/transits","localPath":"/api/v1/charts/transits","status":"alpha","credits":"2 credits per chart","purpose":"Return geocentric tropical transit positions and aspects from the owned sidecar for timing, daily horoscope, and ephemeris workflows.","reference":"/api-docs/reference/transit-chart","example":{"label":"Current Transits","request":{"transit_datetime":"2026-06-17T12:00:00.000Z","transit_location":"Greenwich, GB","max_aspects":30},"response":{"request_id":"req_...","data":{"transit_datetime":"2026-06-17T12:00:00.000Z","transit_location":"Greenwich, GB","calculation_basis":{"frame":"geocentric","zodiac":"tropical","system":"Kerykeion sidecar"},"chart":{"planets":[],"aspects":[]},"aspects":[]},"usage":{"lane":"core","credits":2,"billableUnits":1}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/charts/transits \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: transit-chart-subject-123-v1\" \\\n  -d '{\n  \"transit_datetime\": \"2026-06-17T12:00:00.000Z\",\n  \"transit_location\": \"Greenwich, GB\",\n  \"max_aspects\": 30\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.transitChart(\n  {\n  \"transit_datetime\": \"2026-06-17T12:00:00.000Z\",\n  \"transit_location\": \"Greenwich, GB\",\n  \"max_aspects\": 30\n},\n  \"transit-chart-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.transit_chart(\n    {\n        \"transit_datetime\": \"2026-06-17T12:00:00.000Z\",\n        \"transit_location\": \"Greenwich, GB\",\n        \"max_aspects\": 30,\n    },\n    idempotency_key=\"transit-chart-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"Current Sky","slug":"current-sky","group":"charts","method":"POST","path":"/v1/charts/current-sky","localPath":"/api/v1/charts/current-sky","status":"alpha","credits":"1 credit per lookup","purpose":"Return the owned geocentric tropical current-sky chart for a supplied moment and location without calling external astrology APIs.","reference":"/api-docs/reference/current-sky","example":{"label":"Current Sky","request":{"datetime":"2026-06-17T12:00:00.000Z","location":"Greenwich, GB","options":{"house_system":"placidus","zodiac":"tropical"}},"response":{"request_id":"req_...","data":{"datetime":"2026-06-17T12:00:00.000Z","calculation_basis":{"provider":"owned_western","frame":"geocentric","zodiac":"tropical"},"chart":{"planets":[],"house_cusps":[],"aspects":[]},"lunar_phase":{}},"usage":{"lane":"core","credits":1,"billableUnits":1}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/charts/current-sky \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: current-sky-subject-123-v1\" \\\n  -d '{\n  \"datetime\": \"2026-06-17T12:00:00.000Z\",\n  \"location\": \"Greenwich, GB\",\n  \"options\": {\n    \"house_system\": \"placidus\",\n    \"zodiac\": \"tropical\"\n  }\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.currentSky(\n  {\n  \"datetime\": \"2026-06-17T12:00:00.000Z\",\n  \"location\": \"Greenwich, GB\",\n  \"options\": {\n    \"house_system\": \"placidus\",\n    \"zodiac\": \"tropical\"\n  }\n},\n  \"current-sky-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.current_sky(\n    {\n        \"datetime\": \"2026-06-17T12:00:00.000Z\",\n        \"location\": \"Greenwich, GB\",\n        \"options\": {\n            \"house_system\": \"placidus\",\n            \"zodiac\": \"tropical\",\n        },\n    },\n    idempotency_key=\"current-sky-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"Lunar Phase","slug":"lunar-phase","group":"charts","method":"POST","path":"/v1/lunar/phase","localPath":"/api/v1/lunar/phase","status":"alpha","credits":"1 credit per lookup","purpose":"Return first-party Sun-Moon lunar phase context for a supplied moment and location without horoscope prose or third-party fallback.","reference":"/api-docs/reference/lunar-phase","example":{"label":"Lunar Phase","request":{"datetime":"2026-06-17T12:00:00.000Z","location":"Greenwich, GB"},"response":{"request_id":"req_...","data":{"datetime":"2026-06-17T12:00:00.000Z","calculation_basis":{"provider":"owned_western","frame":"geocentric","zodiac":"tropical"},"lunar_phase":{},"chart":{"sun":{},"moon":{}}},"usage":{"lane":"core","credits":1,"billableUnits":1}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/lunar/phase \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: lunar-phase-subject-123-v1\" \\\n  -d '{\n  \"datetime\": \"2026-06-17T12:00:00.000Z\",\n  \"location\": \"Greenwich, GB\"\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.lunarPhase(\n  {\n  \"datetime\": \"2026-06-17T12:00:00.000Z\",\n  \"location\": \"Greenwich, GB\"\n},\n  \"lunar-phase-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.lunar_phase(\n    {\n        \"datetime\": \"2026-06-17T12:00:00.000Z\",\n        \"location\": \"Greenwich, GB\",\n    },\n    idempotency_key=\"lunar-phase-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"Daily Horoscope","slug":"daily-horoscope","group":"intelligence","method":"POST","path":"/v1/horoscope/daily","localPath":"/api/v1/horoscope/daily","status":"alpha","credits":"1 credit per sign or subject","purpose":"Generate personalized daily horoscope output from owned transit substrate, zodiac knowledge, and optional birth profile context.","reference":"/api-docs/reference/daily-horoscope","example":{"label":"Daily Horoscope","request":{"sign":"leo","date":"2026-06-17","tone":"premium concise","sections":["theme","love","work","action"]},"response":{"request_id":"req_...","data":{"sign":"leo","theme":"Choose the room that lets your confidence become useful.","drivers":["Moon phase","active Venus-Mars relationship tone"],"action":"Make the direct offer instead of waiting for permission."},"usage":{"lane":"ai","credits":1,"billableUnits":1}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/horoscope/daily \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: daily-horoscope-subject-123-v1\" \\\n  -d '{\n  \"sign\": \"leo\",\n  \"date\": \"2026-06-17\",\n  \"tone\": \"premium concise\",\n  \"sections\": [\"theme\", \"love\", \"work\", \"action\"]\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.dailyHoroscope(\n  {\n  \"sign\": \"leo\",\n  \"date\": \"2026-06-17\",\n  \"tone\": \"premium concise\",\n  \"sections\": [\"theme\", \"love\", \"work\", \"action\"]\n},\n  \"daily-horoscope-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.daily_horoscope(\n    {\n        \"sign\": \"leo\",\n        \"date\": \"2026-06-17\",\n        \"tone\": \"premium concise\",\n        \"sections\": [\n            \"theme\",\n            \"love\",\n            \"work\",\n            \"action\",\n        ],\n    },\n    idempotency_key=\"daily-horoscope-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"Timing Windows","slug":"timing-windows","group":"intelligence","method":"POST","path":"/v1/timing/windows","localPath":"/api/v1/timing/windows","status":"alpha","credits":"3 credits per run","purpose":"Generate practical timing windows for launches, love, career, money, content, and spiritual work using owned transit substrate.","reference":"/api-docs/reference/timing-windows","example":{"label":"Launch Windows","request":{"topic":"launch","start_date":"2026-06-17","end_date":"2026-07-17","objective":"Find the best window to announce a paid API beta","max_windows":3},"response":{"request_id":"req_...","data":{"topic":"launch","windows":[{"start":"2026-06-21","end":"2026-06-24","title":"Visibility push","confidence":0.74}],"strategy":"Lead with the strongest proof and keep the offer narrow."},"usage":{"lane":"ai","credits":3,"billableUnits":1}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/timing/windows \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: timing-windows-subject-123-v1\" \\\n  -d '{\n  \"topic\": \"launch\",\n  \"start_date\": \"2026-06-17\",\n  \"end_date\": \"2026-07-17\",\n  \"objective\": \"Find the best window to announce a paid API beta\",\n  \"max_windows\": 3\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.timingWindows(\n  {\n  \"topic\": \"launch\",\n  \"start_date\": \"2026-06-17\",\n  \"end_date\": \"2026-07-17\",\n  \"objective\": \"Find the best window to announce a paid API beta\",\n  \"max_windows\": 3\n},\n  \"timing-windows-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.timing_windows(\n    {\n        \"topic\": \"launch\",\n        \"start_date\": \"2026-06-17\",\n        \"end_date\": \"2026-07-17\",\n        \"objective\": \"Find the best window to announce a paid API beta\",\n        \"max_windows\": 3,\n    },\n    idempotency_key=\"timing-windows-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"World Signals","slug":"world-signals","group":"intelligence","method":"POST","path":"/v1/world/signals","localPath":"/api/v1/world/signals","status":"live","credits":"5 credits per forecast","purpose":"Generate Beyond The Veil style mundane intelligence with deterministic ephemeris context, BTV RAG metadata, and quality controls.","reference":"/api-docs/reference/world-signals","example":{"label":"Markets Forecast","request":{"topic":"markets","window_days":14,"depth":"deep"},"response":{"request_id":"req_...","data":{"forecasts":[{"headline":"Markets hold a volatile repricing window","forecast_window":{"start":"2026-06-17","end":"2026-07-01","specificity":"two-week operational window"},"confidence":8}]},"usage":{"lane":"ai","credits":5,"billableUnits":1},"meta":{"ephemeris":{"enabled":true}}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/world/signals \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: world-signals-subject-123-v1\" \\\n  -d '{\n  \"topic\": \"markets\",\n  \"window_days\": 14,\n  \"depth\": \"deep\"\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.worldSignals(\n  {\n  \"topic\": \"markets\",\n  \"window_days\": 14,\n  \"depth\": \"deep\"\n},\n  \"world-signals-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.world_signals(\n    {\n        \"topic\": \"markets\",\n        \"window_days\": 14,\n        \"depth\": \"deep\",\n    },\n    idempotency_key=\"world-signals-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"World Signals Async Job","slug":"world-signals-job","group":"intelligence","method":"POST","path":"/v1/world/signals/jobs","localPath":"/api/v1/world/signals/jobs","status":"live","credits":"reserves 5 credits; charges only on complete forecast","purpose":"Create an asynchronous Beyond The Veil world signal forecast job for deep production use, then poll the job URL until the quality-gated forecast is complete.","reference":"/api-docs/reference/world-signals-job","example":{"label":"Create Job","request":{"topic":"markets","window_days":14,"depth":"deep"},"response":{"request_id":"req_...","data":{"job_id":"j57...","status":"queued","status_url":"https://api.theleokingai.com/v1/world/signals/jobs/j57...","reserved_credits":5,"poll_after_ms":2000},"usage":{"lane":"ai","credits":0,"billableUnits":0},"meta":{"billing":"reserved_not_charged_until_complete","worker":"scheduled"}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/world/signals/jobs \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: world-signals-job-subject-123-v1\" \\\n  -d '{\n  \"topic\": \"markets\",\n  \"window_days\": 14,\n  \"depth\": \"deep\"\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.createWorldSignalsJob(\n  {\n  \"topic\": \"markets\",\n  \"window_days\": 14,\n  \"depth\": \"deep\"\n},\n  \"world-signals-job-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.create_world_signals_job(\n    {\n        \"topic\": \"markets\",\n        \"window_days\": 14,\n        \"depth\": \"deep\",\n    },\n    idempotency_key=\"world-signals-job-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"Mundane Hot Zones","slug":"mundane-hot-zones","group":"intelligence","method":"POST","path":"/v1/mundane/hot-zones","localPath":"/api/v1/mundane/hot-zones","status":"alpha","credits":"5 credits per run","purpose":"Rank supplied regions as Beyond The Veil style hot zones for a topic and time window using owned transit context and structured generation.","reference":"/api-docs/reference/mundane-hot-zones","example":{"label":"Market Hot Zones","request":{"topic":"markets","regions":["United States","Europe","China","Middle East"],"window_days":30},"response":{"request_id":"req_...","data":{"topic":"markets","hot_zones":[{"region":"United States","score":82,"signal":"Policy and liquidity stress cluster."}]},"usage":{"lane":"ai","credits":5,"billableUnits":1}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/mundane/hot-zones \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: mundane-hot-zones-subject-123-v1\" \\\n  -d '{\n  \"topic\": \"markets\",\n  \"regions\": [\"United States\", \"Europe\", \"China\", \"Middle East\"],\n  \"window_days\": 30\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.mundaneHotZones(\n  {\n  \"topic\": \"markets\",\n  \"regions\": [\"United States\", \"Europe\", \"China\", \"Middle East\"],\n  \"window_days\": 30\n},\n  \"mundane-hot-zones-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.mundane_hot_zones(\n    {\n        \"topic\": \"markets\",\n        \"regions\": [\n            \"United States\",\n            \"Europe\",\n            \"China\",\n            \"Middle East\",\n        ],\n        \"window_days\": 30,\n    },\n    idempotency_key=\"mundane-hot-zones-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"Mundane Event Analysis","slug":"mundane-event-analysis","group":"intelligence","method":"POST","path":"/v1/mundane/analyze-event","localPath":"/api/v1/mundane/analyze-event","status":"alpha","credits":"4 credits per analysis","purpose":"Analyze a supplied world event through mundane astrology and return forward-looking implications, analogs, watch windows, and action guidance.","reference":"/api-docs/reference/mundane-event-analysis","example":{"label":"Policy Shock","request":{"event":"A central bank unexpectedly signals a policy reversal while markets are fragile.","event_date":"2026-06-17","topic":"markets","window_days":30},"response":{"request_id":"req_...","data":{"event_summary":"A policy signal changed market expectations before liquidity stabilized.","confidence":7,"action":"Watch the second reaction, not the first headline."},"usage":{"lane":"ai","credits":4,"billableUnits":1}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/mundane/analyze-event \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: mundane-event-analysis-subject-123-v1\" \\\n  -d '{\n  \"event\": \"A central bank unexpectedly signals a policy reversal while markets are fragile.\",\n  \"event_date\": \"2026-06-17\",\n  \"topic\": \"markets\",\n  \"window_days\": 30\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.mundaneEventAnalysis(\n  {\n  \"event\": \"A central bank unexpectedly signals a policy reversal while markets are fragile.\",\n  \"event_date\": \"2026-06-17\",\n  \"topic\": \"markets\",\n  \"window_days\": 30\n},\n  \"mundane-event-analysis-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.mundane_event_analysis(\n    {\n        \"event\": \"A central bank unexpectedly signals a policy reversal while markets are fragile.\",\n        \"event_date\": \"2026-06-17\",\n        \"topic\": \"markets\",\n        \"window_days\": 30,\n    },\n    idempotency_key=\"mundane-event-analysis-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"Helio Tropical StarTypes","slug":"helio-startypes","group":"helio","method":"POST","path":"/v1/helio/patterns","localPath":"/api/v1/helio/patterns","status":"background","credits":"1 credit per subject","purpose":"Lookup heliocentric tropical StarTypes patterns with attribution to Michael Erlewine's contributions, source work, and interpretations as a background/evaluation signal.","reference":"/api-docs/reference/helio-startypes","example":{"label":"StarTypes Lookup","request":{"subjects":[{"id":"subject_123","dob":"1990-07-23"}],"context":{"use_case":"audience segmentation experiment"}},"response":{"request_id":"req_...","data":{"profiles":[{"subject_id":"subject_123","calculation_basis":{"frame":"heliocentric","zodiac":"tropical","prediction_role":"background_evaluation"},"startype":{"pattern_code":"82","pattern_signature":"8-B-TRINESQUARE/18-G-TRINE"}}]},"usage":{"lane":"core","credits":1,"billableUnits":1}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/helio/patterns \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: helio-startypes-subject-123-v1\" \\\n  -d '{\n  \"subjects\": [\n    { \"id\": \"subject_123\", \"dob\": \"1990-07-23\" }\n  ],\n  \"context\": {\n    \"use_case\": \"audience segmentation experiment\"\n  }\n}'","node":"import { TheLeoKingApi } from \"@theleoking/ai-api\";\n\nconst api = new TheLeoKingApi({\n  apiKey: process.env.LEOKING_API_KEY,\n  baseUrl: \"https://api.theleokingai.com\"\n});\n\nconst result = await api.helioPatterns(\n  {\n  \"subjects\": [\n    { \"id\": \"subject_123\", \"dob\": \"1990-07-23\" }\n  ],\n  \"context\": {\n    \"use_case\": \"audience segmentation experiment\"\n  }\n},\n  \"helio-startypes-subject-123-v1\"\n);\n\nconsole.log(result.request_id);\nconsole.log(result.usage.credits);","python":"import os\nfrom theleoking_ai_api import TheLeoKingApi\n\napi = TheLeoKingApi(\n    api_key=os.environ[\"LEOKING_API_KEY\"],\n    base_url=\"https://api.theleokingai.com\",\n)\n\nresult = api.helio_patterns(\n    {\n        \"subjects\": [\n            {\n                \"id\": \"subject_123\",\n                \"dob\": \"1990-07-23\",\n            },\n        ],\n        \"context\": {\n            \"use_case\": \"audience segmentation experiment\",\n        },\n    },\n    idempotency_key=\"helio-startypes-subject-123-v1\",\n)\n\nprint(result[\"request_id\"])\nprint(result[\"usage\"][\"credits\"])"}},{"name":"Erlewine Context","slug":"erlewine-context","group":"knowledge","method":"POST","path":"/v1/knowledge/erlewine/context","localPath":"/api/v1/knowledge/erlewine/context","status":"planned","credits":"1 credit per retrieval","purpose":"Retrieve rights-cleared Michael Erlewine context for controlled interpretation workflows without exposing raw archive internals.","reference":"/api-docs/reference/erlewine-context","example":{"label":"Context Retrieval","request":{"query":"relationship vocation StarTypes pattern","endpoint_target":"compatibility","top_k":5,"rights_bucket":"approved"},"response":{"request_id":"req_...","data":{"chunks":[],"credit_line":"Includes interpretive context from Michael Erlewine source materials.","use_policy":"supporting context only"},"usage":{"lane":"core","credits":1,"billableUnits":1}}},"snippets":{"curl":"curl https://api.theleokingai.com/v1/knowledge/erlewine/context \\\n  -X POST \\\n  -H \"Accept: application/json\" \\\n  -H \"x-api-key: $LEOKING_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: erlewine-context-subject-123-v1\" \\\n  -d '{\n  \"query\": \"relationship vocation StarTypes pattern\",\n  \"endpoint_target\": \"compatibility\",\n  \"top_k\": 5,\n  \"rights_bucket\": \"approved\"\n}'","node":"// /v1/knowledge/erlewine/context is marked planned and does not have a shipped SDK helper yet.","python":"# /v1/knowledge/erlewine/context is marked planned and does not have a shipped SDK helper yet."}}],"links":{"docs":"/api-docs","openapi":"/api/v1/openapi","postman":"/api/v1/postman","errors":"/api/v1/errors","versioning":"/api/v1/versioning","accessControl":"/api/v1/access-control","onboarding":"/api/v1/onboarding","support":"/api/v1/support","sdks":"/api/v1/sdks","migrations":"/api/v1/migrations","procurement":"/api/v1/procurement","conformance":"/api/v1/conformance","dataProcessing":"/api/v1/data-processing","compliance":"/api/v1/compliance"}}