HomeBooksAI ChatShopMe
Server-to-Server · Tool Registry

Developer API

Server-to-server structured calculation and retrieval, sharing one Registry with MCP.

Open ConsoleOpenAPI specificationMCP access
Open tools
37
LingXi Skill
5
Default quota
200 / day
Burst limit
30 / min

Reading /api/v1/public/mcp; currently showing defaults 37 / 5

POST /api/v1/tools/bazi.calculate_chart
Bearer key auth · JSON request · read-only calculation
curl -sS -X POST \
  "https://www.ancientechoes.ai/api/v1/tools/bazi.calculate_chart" \
  -H "Authorization: Bearer ae_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{ "input_mode": "birth", "cast_time_source": "birth", "is_male": true, "calendar_type": "solar", "year": 1990, "month": 1, "day": 1, "hour": 8, "minute": 0, "is_leap_month": false, "split_zi_hour": true, "use_true_time": false, "apply_dst": false, "timezone_id": "Asia/Shanghai" }'

Successful responses return both api_version (transport contract) and calculation.version (per-tool calculation version).

Three credentials. Do not mix them.

Devices, the developer API, and legacy keys each have their own page.

CredentialPrefixWhereUse
LingXi devicelxd_My LingXi devicesPair your own bot or computer and call authorized MCP / Skill tools. This is not a REST API key.
Developer APIae_live_ / ae_test_Developer consoleCall POST /api/v1/tools from code. Cannot pair a device.
Legacy keysk-Developer consoleLegacy Web API and MCP. New integrations should use ae_*.

Quickstart

Send your first request in three steps

No SDK to install. Sign in, create a key in the Console, copy the plaintext once, then call it with any HTTP client.

1Sign in and create a key

Open the Console and choose scopes (tools:read, tools:invoke, rag:search, rag:query), then set an expiry and limits.

The plaintext key is shown only once, at creation or rotation, in the form ae_live_xxx; use ae_test_xxx for the test environment.

Go to Console
2Call bazi.calculate_chart
curl
curl -sS -X POST \
  "https://www.ancientechoes.ai/api/v1/tools/bazi.calculate_chart" \
  -H "Authorization: Bearer ae_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{ "input_mode": "birth", "cast_time_source": "birth", "is_male": true, "calendar_type": "solar", "year": 1990, "month": 1, "day": 1, "hour": 8, "minute": 0, "is_leap_month": false, "split_zi_hour": true, "use_true_time": false, "apply_dst": false, "timezone_id": "Asia/Shanghai" }'
3Read the calculation version
response
{
  "success": true,
  "api_version": "<当前契约版本>",
  "data": { "...": "领域结果" },
  "calculation": {
    "capability": "bazi.chart",
    "version": "<单工具计算版本>"
  }
}

Capabilities

Capability matrix and billing rules

37 tools and 5 LingXi Skills are currently open; the same Registry serves the Developer API, MCP and in-site agents.

BaZi
bazi.*

Natal chart, luck cycles, chain palaces, lu-ming, synastry, wealth analysis and naming context. Input must be an explicit civil timestamp or explicit four pillars.

Tool quota
Zi Wei Dou Shu
ziwei.*

Produces reproducible charts from a valid placement code and an explicit target time; it never reads the server's current time.

Tool quota
Qimen Dunjia
qimen.*

Hourly rotating-plate charts, the three-yuan layout from the 24 solar terms, and explicit time/place semantics.

Tool quota
Astrology · Seven Governors · Vedic
astrology.* · qizheng.* · vedic.*

House system, coordinates, timezone and transit times are all passed explicitly; output includes calculation provenance.

Tool quota
Divination
divination.*

Preview casts such as Liu Yao, Mei Hua, tarot, Xiao Liu Ren, Da Liu Ren and He Luo; results are read-only.

Tool quota
Almanac & Election
almanac.* · election.*

Lunar conversion, solar terms, daily almanac entries, and election evidence such as jian-chu, day officer, Tai Sui and Rahu killer-teacher days.

Tool quota
RAG Search
lingxi.rag_search

Returns traceable snippets and hit metadata without calling a generation model.

Tool quota
RAG Query (generative Q&A)
lingxi.rag_query

Retrieves then calls a model to produce non-streaming JSON; a missing dataset_key / source_persona_id fails immediately.

Tool quota + AI plan
Billing rules: All domain tools (including lingxi.rag_search) only consume tool-call quota; lingxi.rag_query consumes both tool quota and the account/organization AI plan allowance. Generated content is billed against the AI plan, so do not treat it as a pure retrieval endpoint.

Limits & Quotas

Limits, quotas and key types

Quotas are stored per account/key; every value can be overridden by an administrator or per-key configuration.

Default allowance
Free personal accounts can view live usage in the Console.

Calls per day

200

Burst per minute

30

  • All quotas are configurable; 0 = unlimited. Organizations, service accounts and individual keys can each have their own quota pool.
  • Keys can set daily/monthly hard caps so one key cannot exhaust the whole site's allowance.
  • Responses carry X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and X-RateLimit-Burst-Limit headers; exceeding the limit returns 429 with Retry-After.
Test keys and live keys
The prefix selects the data plane, not the permission level.

ae_live_… Live Key

Calls the real Registry and data plane and counts against the account/key's real quota; suited to production server code.

ae_test_… Test Key

Isolated from production data and returns limited or fixed sample results for request-shape and error-handling integration. Test keys cannot run generative RAG (calling lingxi.rag_query returns test_key_rag_disabled). Never draw real conclusions from test key results.

Non-expiring keys are only issued when explicitly selected at creation and do not expire on their own after a leak. In production, prefer a 90-day expiry and rotate regularly.

Error model

Error codes and troubleshooting

Failure responses share the structure { success:false, code, message, request_id, docs_url }; include the request_id when reporting issues.

429 responses also include Retry-After; do not busy-wait with a fixed sleep.
Error codeHTTPMeaningWhat to do
tool_not_found404The tool name is not in the Registry or is misspelledRead the exact tool name and input_schema from GET /api/v1/tools first
tool_authentication_required401No valid key was supplied, or the browser session expiredCheck Authorization: Bearer; sign in again in the browser and retry
tool_scope_required403The key's scopes do not permit this operationIssue a new key in the Console that includes tools:invoke / rag:query
tool_entitlement_required403The account plan does not include this tool's entitlementUpgrade the plan or switch to the freely available read-only tools
tool_quota_exceeded429Daily/monthly quota or per-minute burst exceededRead Retry-After and X-RateLimit-*; reduce concurrency or request a higher quota
rag_dataset_required400Generative RAG is missing dataset_key / source_persona_idPass the dataset or persona ID explicitly; use lingxi.rag_search for pure retrieval
rag_service_unavailable502The retrieval service is unreachable and this retrieval did not runRetry later; do not interpret the result as "the library has nothing relevant"
test_key_rag_disabled403Sandbox keys cannot run generative RAGUse a live key for lingxi.rag_query, or use the test key only for retrieval integration
tool_invocation_failed400Other parameter or execution error (including schema validation failures)Fix the request body against the input_schema from GET /api/v1/tools and report with the request_id

Examples

Thin wrapper examples

These samples only illustrate auth, request shape and error handling; they are not a published official SDK.

Sample code · curl
curl -sS -X POST \
  "https://www.ancientechoes.ai/api/v1/tools/bazi.calculate_chart" \
  -H "Authorization: Bearer ae_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{ "input_mode": "birth", "cast_time_source": "birth", "is_male": true, "calendar_type": "solar", "year": 1990, "month": 1, "day": 1, "hour": 8, "minute": 0, "is_leap_month": false, "split_zi_hour": true, "use_true_time": false, "apply_dst": false, "timezone_id": "Asia/Shanghai" }'

In the samples, ae_live_xxx, AE_API_KEY and similar values are placeholders. Never commit real keys, and never embed a key in browser code — only server-to-server calls are safe.

Versioning

Versioning and deprecation policy

Transport contract, calculation semantics, Skill packages and the MCP protocol are versioned independently and cannot substitute for one another.

Contract version

X-Tool-API-Version marks the transport and error-model contract version; URIs use semantic /v1. Breaking changes go through a new version and a deprecation window, while new optional fields only bump the minor version.

Every tool also carries calculation_capability and calculation_version; when reproducing results you must check both the contract version and the calculation version.

  • OpenAPI: /api/v1/tools/openapi.json
  • Version policy: docs/usage/mcp-versioning-policy.md
  • Calculation version rules: docs/usage/calculation-api-version-policy.md
How this differs from MCP / Skills

The Developer API is a REST tool interface for programs; MCP is a tool protocol for agents that additionally carries resources and MCP Apps; a Skill is only a distribution and prompt layer and defines no capability or permission boundary of its own.

All three share the same Registry, entitlements, quotas and calculation versions; only transport and presentation differ.

View MCP / LingXi access

Ancient Echoes New Word

古韵新声 - 融合东方智慧与现代科技的平台

Learn

  • BaZi Guides
  • Day Master
  • Five Elements
  • Ten Gods
  • Luck Pillars

Legal

  • Terms of Service
  • Privacy Policy
  • Refund Policy

Support

  • Contact Us
  • [email protected]

Important Notice

Some paid features are powered by third-party AI models, including DeepSeek, Claude, and ChatGPT.

Cultural analysis and AI answers are for entertainment, self-reflection, and educational purposes only and may be inaccurate or incomplete.

© 2026 Ancient Echoes. All rights reserved.