--- name: quaesto-accounting version: 1.3.0 description: AI 原生会计基础设施。任何 Agent 通过 X-API-Key 即可记账 / 出三本账 / 风控巡检 / 政策升级回放,不用懂 CAS、所得税法、四层证据链。 auth: type: apiKey header: X-API-Key register_url: https://accountingllm.site/app/connect base_url: https://accountingllm.site/api/skill openapi: https://accountingllm.site/api/skill/openapi.json manual_full: https://accountingllm.site/api/skill/manual ruleset_default: CAS moat: policy_dsl: v1 evidence_layers: 4 books: [financial, tax, management] standards: [CAS-14, CAS-9, CAS-4, CAS-18, CAS-1] rate_limit: per_agent_per_minute: 30 idempotency: key: [source, trade_no] --- # 账面 Skill 速查 > ⚠️ **A7 关键**: query / path 中的中文 (counterpart=智行科技) **必须 URL 编码**, 否则 uvicorn > protocol 层会直接 400 "Invalid HTTP request" — 这层在 FastAPI 之前, 无法返回结构化 JSON. > Python: `urllib.parse.quote("智行科技")` → `%E6%99%BA%E8%A1%8C%E7%A7%91%E6%8A%80` > Node: `encodeURIComponent("智行科技")` → 同上 > requests/httpx/axios 自动编码; 仅手写 curl / fetch + URL 拼接的场景需注意. - 类目 → GET /skill/categories (接入前先拉合法 canonical + aliases, 别瞎猜 category) - 准则 → GET /skill/standards (CAS 准则版图: 反查某 rule 依据 CAS X + 42 项准则覆盖状态 + 三层适配决策树 + okf_index 决策程序索引) - 决策程序 → GET /skill/standards/{ref} (取某准则 OKF 判断决策程序正文 + Citations, 据此为公司构造规则) - 记账 → POST /skill/event (单条; **必填 event_type+category+amount+description**; 支持 source+trade_no 幂等) - 预演 → POST /skill/event/preview (0 副作用; 看 confidence 再决定是否落库) - 查事件 → GET /skill/events (筛选 event_type/category/日期) - 查报表 → GET /skill/{summary,income-statement,balance-sheet,cash-flow,trial-balance} - 凭证 → GET /skill/vouchers | /skill/vouchers/{id} | POST /skill/vouchers/{id}/void - 应收应付 → GET /skill/{receivables,payables,counterparty-flow} - 风控 → GET /skill/risk-inspect - 归因 → GET /skill/attribute?metric=profit&period_a=2026-01&period_b=2026-02 - 合规 → GET /skill/compliance-reminders | /skill/tax-profile - 汇算预演 → GET /skill/tax/annual-reconciliation?year=2026 (广告费15%/招待费5‰ 年度限额纳税调整预演; advisory 不改记账/不写台账, 须 CPA 复核) - 证据链 → GET /skill/trace | /skill/verify - 全文手册 → GET /skill/manual - OpenAPI → GET /skill/openapi.json 接入: 浏览器到 https://accountingllm.site/app/connect 一次性复制 X-API-Key, 然后所有请求带 `X-API-Key: qs_live_xxx` header 即可. 鉴权失败统一返 401, 限流返 429 + Retry-After.