{"openapi":"3.1.0","info":{"title":"SearchPipe","version":"0.2.0"},"paths":{"/robots.txt":{"get":{"tags":["seo"],"summary":"Robots Txt","description":"爬虫规则（`text/plain`）。","operationId":"robots_txt_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sitemap.xml":{"get":{"tags":["seo"],"summary":"Sitemap Xml","description":"站点地图（必须是 XML Content-Type，否则爬虫按纯文本忽略）。","operationId":"sitemap_xml_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/llms.txt":{"get":{"tags":["seo"],"summary":"Llms Txt","description":"面向 AI 客户端/问答引擎的站点摘要（llms.txt 约定）。","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/":{"get":{"tags":["site"],"summary":"Landing","description":"营销首页：产品定位 + 在线体验入口 + 特性 + 使用场景 + 定价 + 常见问题。","operationId":"landing__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/terms":{"get":{"tags":["site"],"summary":"Terms Page","description":"Terms of Service page (public, indexable).","operationId":"terms_page_terms_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/privacy":{"get":{"tags":["site"],"summary":"Privacy Page","description":"Privacy Policy page (public, indexable).","operationId":"privacy_page_privacy_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/search-api":{"get":{"tags":["site"],"summary":"Search Api Page","description":"Search API 落地页（长尾关键词页：围绕 \"Search API\" 构建，承载搜索意图）。","operationId":"search_api_page_search_api_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api":{"get":{"tags":["site"],"summary":"Api Overview Page","description":"产品 API 目录；/search-api 保留搜索产品说明，/docs 保留调用参考。","operationId":"api_overview_page_api_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/docs":{"get":{"tags":["site"],"summary":"Public Docs","description":"开发文档（公开可索引；控制台侧的 /dashboard/docs 301 到这里）。","operationId":"public_docs_docs_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/mcp-server":{"get":{"tags":["site"],"summary":"Mcp Server Page","description":"MCP Server 接入指南（长尾落地页：任何 MCP 兼容 Agent/客户端的联网搜索配置）。","operationId":"mcp_server_page_mcp_server_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/agents":{"get":{"tags":["site"],"summary":"Agents Setup Page","description":"Agent MCP 配置指南（长尾落地页：任何 MCP 兼容 Agent —— 常见客户端\nClaude Code / Cursor / Codex / OpenCode / Pi + 自定义 MCP Agent 的配置片段）。","operationId":"agents_setup_page_agents_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/pricing":{"get":{"tags":["site"],"summary":"Pricing Page","description":"定价页（积分充值 + 包月订阅，独立可索引，承载价格类查询）。","operationId":"pricing_page_pricing_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/web-search-mcp":{"get":{"tags":["site"],"summary":"Web Search Mcp Page","description":"品类页：Web Search MCP（MCP 生态入口页）。","operationId":"web_search_mcp_page_web_search_mcp_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/web-search-api-for-ai-agents":{"get":{"tags":["site"],"summary":"Web Search Api For Agents Page","description":"品类页：Web Search API for AI Agents（核心关键词落地页）。","operationId":"web_search_api_for_agents_page_web_search_api_for_ai_agents_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/compare":{"get":{"tags":["site"],"summary":"Compare Page","description":"竞品对照页（长尾 SEO：Tavily / Exa / Brave 的比较类查询）。\n\n基调是可核查的中性对照：竞品数据只来自官方定价页/文档（seo.COMPARE_*，\n页面标注最近核实月份）；SearchPipe 列与站点定价常量同源，不另抄数字。","operationId":"compare_page_compare_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/verify-api":{"get":{"tags":["site"],"summary":"Verify Api Page","description":"证据级搜索产品页（Phase B 上线；Phase C 重定位「Audit your own pipeline」，D4）。\n\n页面只做产品/契约说明——/verify 端点本身仍由 verify_enabled 总闸控制\n（关=404）。契约表与 FAQ 全部走 seo 常量注入（verify/schemas.py 同名）；\nPhase C 起三档形态段（证据原生结果/审计答案/审计自家管线）同源注入。","operationId":"verify_api_page_verify_api_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/faq":{"get":{"tags":["site"],"summary":"Faq Page","description":"常见问题（长尾问答页，输出 FAQPage 结构化数据）。","operationId":"faq_page_faq_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/auth/register":{"post":{"tags":["auth"],"summary":"Register","description":"邮箱+密码注册。注册即签发 token 并赠送免费额度，同时发送邮箱验证邮件。\n\n支持邀请码：填写有效邀请码时，邀请方和被邀请方各获得永久积分奖励。\n注册前过每 IP 发信频控（register_ip_hourly_limit，0=关闭）——注册会对\n任意邮箱真实外发验证邮件，必须防批量假邮箱注册刷外发。","operationId":"register_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"tags":["auth"],"summary":"Login","description":"邮箱+密码登录。登录成功即续发「每月免费额度」（已验证邮箱用户，同月一次）。","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh","description":"refresh token → 新 access + refresh。","operationId":"refresh_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"忘记密码：存在则发重置邮件。无论邮箱是否注册都返回同一话术（防枚举）。","operationId":"forgot_password_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Forgot Password Auth Forgot Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","description":"一次性 token + 新密码 → 重置。token 无效/过期/复用均 400。","operationId":"reset_password_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Reset Password Auth Reset Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/oauth/github":{"get":{"tags":["auth"],"summary":"Oauth Github","description":"跳转到 GitHub 授权页。state 防 CSRF，存 Redis。","operationId":"oauth_github_auth_oauth_github_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/oauth/github/callback":{"get":{"tags":["auth"],"summary":"Oauth Github Callback","description":"GitHub 回调 → 换 token → 建/绑账号 → 签发 JWT → 302 带 token 回 dashboard。","operationId":"oauth_github_callback_auth_oauth_github_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/oauth/google":{"get":{"tags":["auth"],"summary":"Oauth Google","description":"跳转到 Google 授权页。state 防 CSRF，存 Redis。","operationId":"oauth_google_auth_oauth_google_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/oauth/google/callback":{"get":{"tags":["auth"],"summary":"Oauth Google Callback","description":"Google 回调 → 换 token → 建/绑账号 → 签发 JWT → 302 带 token 回 dashboard。","operationId":"oauth_google_callback_auth_oauth_google_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/verify-email":{"get":{"tags":["auth"],"summary":"Verify Email","description":"验证邮箱链接。成功 → 302 到登录页带提示；失败 → 302 到登录页带错误提示。","operationId":"verify_email_auth_verify_email_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/resend-verification":{"post":{"tags":["auth"],"summary":"Resend Verification","description":"重新发送验证邮件（需登录）。","operationId":"resend_verification_auth_resend_verification_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resend Verification Auth Resend Verification Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/me":{"get":{"tags":["auth"],"summary":"Me","description":"返回当前登录用户信息。","operationId":"me_auth_me_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys":{"post":{"tags":["api-keys"],"summary":"Create","description":"创建 API Key。明文同时以密文留存，之后可在控制台点击查看。","operationId":"create_api_keys_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["api-keys"],"summary":"List All","operationId":"list_all_api_keys_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KeyItem"},"title":"Response List All Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys/reveal":{"get":{"tags":["api-keys"],"summary":"Reveal Default","description":"当前用户默认 Key 的明文（没有则自动生成一把默认 Key）。\n\n控制台「一句话配置」复制按钮与概览页 MCP 命令复制按钮都调它，页面本身\n不渲染明文（避免 Key 出现在 HTML 源码里）。","operationId":"reveal_default_api_keys_reveal_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeySecretResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys/{key_id}/reveal":{"get":{"tags":["api-keys"],"summary":"Reveal One","description":"指定 Key 的明文（MCP 配置卡片里选择其它 Key 时使用）。","operationId":"reveal_one_api_keys__key_id__reveal_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeySecretResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys/{key_id}":{"delete":{"tags":["api-keys"],"summary":"Revoke","operationId":"revoke_api_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/balance":{"get":{"tags":["billing"],"summary":"Balance","operationId":"balance_billing_balance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/transactions":{"get":{"tags":["billing"],"summary":"Transactions","operationId":"transactions_billing_transactions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TxListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/plans":{"get":{"tags":["billing"],"summary":"Plans","description":"上架套餐列表（充值档 + 订阅档）。完整购买目录见 /payments/catalog。","operationId":"plans_billing_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PlanItem"},"type":"array","title":"Response Plans Billing Plans Get"}}}}}}},"/v1/account/balance":{"get":{"tags":["account"],"summary":"Account Balance","description":"API Key 查询剩余积分余额（字段与 GET /billing/balance 一致；免费只读）。\n\nbalance=总余额（含未生效续订积分）、permanent=永久积分、expiring=限时\n积分、upcoming=已入账未生效、next_expiry=最近一笔限时积分到期时间、\nfree_tier_credits=每 UTC 月免费额度、unlimited=admin/owner 免扣费标记。","operationId":"account_balance_v1_account_balance_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/catalog":{"get":{"tags":["payments"],"summary":"Catalog","description":"购买目录。登录用户附带当前订阅状态（供前端决定显示订阅/管理入口）。","operationId":"catalog_payments_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogResponse"}}}}}}},"/payments/packages":{"get":{"tags":["payments"],"summary":"Packages","description":"充值套餐列表（兼容旧接口）。","operationId":"packages_payments_packages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PackageItem"},"type":"array","title":"Response Packages Payments Packages Get"}}}}}}},"/payments/orders":{"post":{"tags":["payments"],"summary":"Create Order Route","operationId":"create_order_route_payments_orders_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["payments"],"summary":"List Orders Route","description":"当前用户的订单列表（含 pending），控制台「Your orders」据此渲染。\n\npending 单带 `can_resume` / `can_cancel`，前端据此显示 Continue / Cancel。","operationId":"list_orders_route_payments_orders_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/webhooks/{provider}":{"post":{"tags":["payments"],"summary":"Payment Webhook","description":"支付平台 webhook。验签失败 400；暂时性处理失败 500（平台会重试）。\n\nprovider 路径段对应支付方名（creem/dodo；测试环境为注入的 fake provider 名）。","operationId":"payment_webhook_payments_webhooks__provider__post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Payment Webhook Payments Webhooks  Provider  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/portal":{"get":{"tags":["payments"],"summary":"Customer Portal","description":"生成当前用户订阅的 Customer Portal 链接（取消/改档/换支付方式）。","operationId":"customer_portal_payments_portal_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Customer Portal Payments Portal Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/orders/{order_id}/resume":{"post":{"tags":["payments"],"summary":"Resume Order Route","description":"继续支付 pending 单：同一订单号重新生成托管收银台会话并返回 URL。\n\n邮箱未验证同样拦下（与下单一致）；订单已被支付/取消 → 409。","operationId":"resume_order_route_payments_orders__order_id__resume_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeOrderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/orders/{order_id}/cancel":{"post":{"tags":["payments"],"summary":"Cancel Order Route","description":"取消 pending 单（→ cancelled）。不涉及退款：未扣款、未发积分。","operationId":"cancel_order_route_payments_orders__order_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/orders/{order_id}":{"get":{"tags":["payments"],"summary":"Order Status","operationId":"order_status_payments_orders__order_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/usage":{"get":{"tags":["usage"],"summary":"Usage","operationId":"usage_usage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"}},{"name":"granularity","in":"query","required":false,"schema":{"type":"string","pattern":"^(hour|day)$","default":"day","title":"Granularity"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/usage/logs":{"get":{"tags":["usage"],"summary":"Usage Logs","operationId":"usage_logs_usage_logs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageLogListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/usage/export":{"get":{"tags":["usage"],"summary":"Usage Export","description":"CSV 导出全部用量明细。","operationId":"usage_export_usage_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/feedback":{"post":{"tags":["feedback"],"summary":"Create Feedback","description":"提交工单。频率限制 30 秒/次。","operationId":"create_feedback_feedback_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFeedbackRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Feedback Feedback Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["feedback"],"summary":"List My Feedback","description":"列当前用户的工单列表（按创建时间倒序）。","operationId":"list_my_feedback_feedback_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extract":{"post":{"tags":["extract"],"summary":"Extract","description":"批量抓取 URL 正文：鉴权 → 门禁 → 限流 → 按 URL 扣费 → 并发抓取 → 失败退款。\n\n计费口径：cost = ceil(len(urls) * extract_credit_per_url)，进抓取前扣；\n部分失败按失败 URL 数退款（同口径向上取整），全部失败全额退；admin/owner\n免扣免退。单 URL 失败不影响整批（落 failed_results，HTTP 仍 200）。","operationId":"extract_extract_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/verify":{"post":{"tags":["verify"],"summary":"Verify Claim","description":"核验一条主张：总闸 → 鉴权（DI）→ 商业依赖链（execute_verified_claim，\nE7 起与 MCP searchpipe_verify 共用单一真相源）→ 失败全额退款。","operationId":"verify_claim_verify_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/verify/batch":{"post":{"tags":["verify"],"summary":"Verify Batch","description":"批量核验：审核逐条 → 限流一次 → 按条前扣 → 并发执行（逐条超时）→\n失败按条退款 → 逐条用量日志（search_depth=\"verify\"，admin 卡片口径一致）。\n\n输入审核逐条做：任一条命中违禁 → 400 整批不扣费（与 /search 单条语义一致，\n且发生在扣费前零成本）。","operationId":"verify_batch_verify_batch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyBatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/extract":{"post":{"tags":["extract"],"summary":"Extract","description":"批量抓取 URL 正文：鉴权 → 门禁 → 限流 → 按 URL 扣费 → 并发抓取 → 失败退款。\n\n计费口径：cost = ceil(len(urls) * extract_credit_per_url)，进抓取前扣；\n部分失败按失败 URL 数退款（同口径向上取整），全部失败全额退；admin/owner\n免扣免退。单 URL 失败不影响整批（落 failed_results，HTTP 仍 200）。","operationId":"extract_v1_extract_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/verify":{"post":{"tags":["verify"],"summary":"Verify Claim","description":"核验一条主张：总闸 → 鉴权（DI）→ 商业依赖链（execute_verified_claim，\nE7 起与 MCP searchpipe_verify 共用单一真相源）→ 失败全额退款。","operationId":"verify_claim_v1_verify_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/verify/batch":{"post":{"tags":["verify"],"summary":"Verify Batch","description":"批量核验：审核逐条 → 限流一次 → 按条前扣 → 并发执行（逐条超时）→\n失败按条退款 → 逐条用量日志（search_depth=\"verify\"，admin 卡片口径一致）。\n\n输入审核逐条做：任一条命中违禁 → 400 整批不扣费（与 /search 单条语义一致，\n且发生在扣费前零成本）。","operationId":"verify_batch_v1_verify_batch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyBatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/messages":{"get":{"tags":["messages"],"summary":"List My Messages","description":"列当前用户的站内信（按创建时间倒序），附未读数。","operationId":"list_my_messages_messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/messages/unread-count":{"get":{"tags":["messages"],"summary":"Unread Count","description":"未读数（控制台导航角标轮询用）。","operationId":"unread_count_messages_unread_count_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Unread Count Messages Unread Count Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/messages/{message_id}/read":{"post":{"tags":["messages"],"summary":"Mark Message Read","description":"标记已读。他人消息一律 404（不暴露存在性）。重复标记幂等。","operationId":"mark_message_read_messages__message_id__read_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Mark Message Read Messages  Message Id  Read Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/":{"get":{"tags":["admin"],"summary":"Admin Entry","description":"管理员入口 —— 直达运营监控，无需记忆 /admin/monitor。\n\n- 已登录管理员（role ∈ {owner, admin}）→ 302 /admin/monitor\n- 未登录 → 302 独立管理员登录页（带回跳 next=/admin/monitor）\n- 已登录但不是管理员 → 302 登录页并提示无权限（可换管理员账号登录）","operationId":"admin_entry_admin__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Admin Entry Admin  Get"}}}}}}},"/admin":{"get":{"tags":["admin"],"summary":"Admin Entry","description":"管理员入口 —— 直达运营监控，无需记忆 /admin/monitor。\n\n- 已登录管理员（role ∈ {owner, admin}）→ 302 /admin/monitor\n- 未登录 → 302 独立管理员登录页（带回跳 next=/admin/monitor）\n- 已登录但不是管理员 → 302 登录页并提示无权限（可换管理员账号登录）","operationId":"admin_entry_admin_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Admin Entry Admin Get"}}}}}}},"/admin/login":{"get":{"tags":["admin"],"summary":"Admin Login Page","description":"独立管理员登录页；已登录管理员直接放行到监控页（不重复登录）。","operationId":"admin_login_page_admin_login_get","parameters":[{"name":"next","in":"query","required":false,"schema":{"type":"string","default":"","title":"Next"}},{"name":"denied","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Denied"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Admin Login Page Admin Login Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Admin Login Submit","description":"管理员登录：邮箱密码 + 管理员角色校验 → 设 session cookie → 302 监控页。\n\n非管理员账号（含密码正确但 role 为 user/member）一律拒绝且**不设 cookie**，\n避免顺手把普通账号登进管理端；失败的响应统一重渲染登录页并提示。\n登录成功与用户控制台口径一致：更新 last_login_at + 续发每月免费额度。","operationId":"admin_login_submit_admin_login_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_admin_login_submit_admin_login_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Admin Login Submit Admin Login Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/logout":{"get":{"tags":["admin"],"summary":"Admin Logout","description":"管理端退出：清 session cookie（与控制台共用）→ 302 管理员登录页。","operationId":"admin_logout_admin_logout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/users":{"get":{"tags":["admin"],"summary":"List Users","operationId":"list_users_admin_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}":{"patch":{"tags":["admin"],"summary":"Update User","operationId":"update_user_admin_users__user_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update User Admin Users  User Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits":{"get":{"tags":["admin"],"summary":"Credits Overview","description":"全平台积分总余额 + 账户数。","operationId":"credits_overview_admin_credits_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Credits Overview Admin Credits Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits/grant":{"post":{"tags":["admin"],"summary":"Grant Credits Admin","description":"管理员手动发放额度。","operationId":"grant_credits_admin_admin_credits_grant_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantCreditsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantCreditsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/orders":{"get":{"tags":["admin"],"summary":"List Orders","operationId":"list_orders_admin_orders_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminOrderItem"},"title":"Response List Orders Admin Orders Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/stats":{"get":{"tags":["admin"],"summary":"Stats","description":"概览统计：用户数、总积分、总搜索、收入。","operationId":"stats_admin_stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/feedback":{"get":{"tags":["admin"],"summary":"List Feedback","description":"列全部工单，可按 status 过滤（open/closed）。\n\n浏览器直接访问（Accept: text/html）时渲染工单管理 SSR 页\n（含「通知该用户」入口，跳转 /admin/messages 预填收件人）；\n程序调用（fetch/API）返回 JSON。","operationId":"list_feedback_admin_feedback_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminFeedbackListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/feedback/{ticket_id}/close":{"post":{"tags":["admin"],"summary":"Close Feedback","description":"关闭工单。","operationId":"close_feedback_admin_feedback__ticket_id__close_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","title":"Ticket Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Close Feedback Admin Feedback  Ticket Id  Close Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/messages":{"get":{"tags":["admin"],"summary":"Admin Messages Page","description":"站内信管理页。支持 ?to=邮箱 预填收件人、?ticket=工单ID 预填回复文案。","operationId":"admin_messages_page_admin_messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"to","in":"query","required":false,"schema":{"type":"string","default":"","title":"To"}},{"name":"ticket","in":"query","required":false,"schema":{"type":"string","default":"","title":"Ticket"}},{"name":"sent","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sent"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Admin Messages Page Admin Messages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Admin Send Message","description":"发送站内信：target_type=user 定向（按邮箱）/ broadcast 全局广播。\n\n广播为每个活跃用户写一行（MVP 用户量小，简单可靠）。失败重渲染表单页提示。","operationId":"admin_send_message_admin_messages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_admin_send_message_admin_messages_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Admin Send Message Admin Messages Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/monitor":{"get":{"tags":["admin"],"summary":"Monitor Page","description":"运营监控 SSR 页面：聚合关键指标、近 24h 趋势、最近登录与注册用户列表。","operationId":"monitor_page_admin_monitor_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Monitor Page Admin Monitor Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/perf":{"get":{"tags":["admin"],"summary":"Perf Page","description":"/search 分阶段耗时统计 SSR 页：总体分位 + 分阶段聚合 + 慢请求 Top20。\n\n数据源 search_perf_logs（perf 中间件每请求 fire-and-forget 落一行，含\nstages JSONB，见 utils/perf.py）。时间窗只接受 1h/24h/7d，非法值回落 24h。","operationId":"perf_page_admin_perf_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"hours","in":"query","required":false,"schema":{"type":"integer","default":24,"title":"Hours"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Perf Page Admin Perf Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/behavior":{"get":{"tags":["admin"],"summary":"Behavior Page","description":"用户行为 SSR 页：激活漏斗 + 最近事件流 + 按邮箱钻取单人时间线。\n\n漏斗口径从业务表取（users/api_keys/usage_logs/orders 是权威事实），\n事件流从 user_events 取（埋点上线后的行为明细；存量用户已在迁移中回填）。","operationId":"behavior_page_admin_behavior_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email","in":"query","required":false,"schema":{"type":"string","default":"","title":"Email"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Behavior Page Admin Behavior Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/auth":{"get":{"tags":["dashboard"],"summary":"Auth Landing","description":"OAuth/JWT 登录落地：token（JWT access）→ 校验 → 设 session cookie → /dashboard。","operationId":"auth_landing_dashboard_auth_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/bonus-flash":{"get":{"tags":["dashboard"],"summary":"Bonus Flash","description":"每月免费额度弹窗数据（**读取一次即消费**，同一笔发放只提醒一次）。\n\n控制台页面（base.html）加载时拉取，命中则弹窗提示「+N 积分已到账、X 月 X 日到期」。\n没有待提醒内容返回 {\"bonus\": null}；未登录 401。","operationId":"bonus_flash_dashboard_bonus_flash_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Bonus Flash Dashboard Bonus Flash Get"}}}}}}},"/dashboard/login":{"get":{"tags":["dashboard"],"summary":"Login Page","description":"登录页（仅邮箱密码）。支持多种提示：\n- ?reset=1 密码已重置\n- ?registered=1 注册成功，请查收验证邮件\n- ?verify_success=1 邮箱验证成功\n- ?verify_error=1 验证链接无效或已过期\n- ?verify_already=1 邮箱已验证\n- ?next= 登录后回跳","operationId":"login_page_dashboard_login_get","parameters":[{"name":"reset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Reset"}},{"name":"registered","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Registered"}},{"name":"verify_success","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Verify Success"}},{"name":"verify_error","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Verify Error"}},{"name":"verify_already","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Verify Already"}},{"name":"next","in":"query","required":false,"schema":{"type":"string","default":"","title":"Next"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Login Page Dashboard Login Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["dashboard"],"summary":"Login Submit","description":"邮箱密码登录 → 设 cookie → next（站内）或 /dashboard。失败重渲染登录页并提示。\n\n控制台面向真实用户，显式区分「邮箱未注册」与「密码错误」；\nAPI 层（/auth/login）仍返回统一 401 防脚本枚举。","operationId":"login_submit_dashboard_login_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_submit_dashboard_login_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Login Submit Dashboard Login Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/register":{"get":{"tags":["dashboard"],"summary":"Register Page","description":"注册页（仅邮箱密码）。?next= 注册后回跳；?code= 预填邀请码。","operationId":"register_page_dashboard_register_get","parameters":[{"name":"next","in":"query","required":false,"schema":{"type":"string","default":"","title":"Next"}},{"name":"code","in":"query","required":false,"schema":{"type":"string","default":"","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Register Page Dashboard Register Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["dashboard"],"summary":"Register Submit","description":"邮箱注册 → 送免费额度 → 设 cookie → next（站内）或 /dashboard。失败重渲染注册页并提示。\n\n支持邀请码：填写有效邀请码时，邀请方和被邀请方各获得永久积分奖励。","operationId":"register_submit_dashboard_register_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_register_submit_dashboard_register_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Register Submit Dashboard Register Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/forgot-password":{"get":{"tags":["dashboard"],"summary":"Forgot Password Page","description":"忘记密码页。","operationId":"forgot_password_page_dashboard_forgot_password_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Forgot Password Page Dashboard Forgot Password Get"}}}}}},"post":{"tags":["dashboard"],"summary":"Forgot Password Submit","description":"发重置邮件。无论邮箱是否注册都展示同一话术（防枚举）。","operationId":"forgot_password_submit_dashboard_forgot_password_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_forgot_password_submit_dashboard_forgot_password_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Forgot Password Submit Dashboard Forgot Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/reset-password":{"get":{"tags":["dashboard"],"summary":"Reset Password Page","description":"重置密码页：预检 token 有效性，无效直接提示链接失效。","operationId":"reset_password_page_dashboard_reset_password_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Reset Password Page Dashboard Reset Password Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["dashboard"],"summary":"Reset Password Submit","description":"校验 token 改密 → 302 登录页（带重置成功提示）。","operationId":"reset_password_submit_dashboard_reset_password_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_reset_password_submit_dashboard_reset_password_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Reset Password Submit Dashboard Reset Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/resend-verification":{"post":{"tags":["dashboard"],"summary":"Resend Verification","description":"重发验证邮件（需登录）。","operationId":"resend_verification_dashboard_resend_verification_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Resend Verification Dashboard Resend Verification Post"}}}}}}},"/dashboard/logout":{"get":{"tags":["dashboard"],"summary":"Logout","operationId":"logout_dashboard_logout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/dashboard/":{"get":{"tags":["dashboard"],"summary":"Dashboard Home","description":"主面板：余额 + 用量曲线 + 快速搜索。\n\n?q=xxx：预填快速搜索框并自动触发（落地页「在线体验」入口）。\n未登录时把 /dashboard?q=xxx 整体作为 next 带去登录页，登录后回跳不丢 query。\n?resend_success=1：重发验证邮件成功提示。\n?resend_cooldown=1：重发验证邮件冷却期提示。","operationId":"dashboard_home_dashboard__get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"resend_success","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Resend Success"}},{"name":"resend_cooldown","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Resend Cooldown"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Dashboard Home Dashboard  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard":{"get":{"tags":["dashboard"],"summary":"Dashboard Home","description":"主面板：余额 + 用量曲线 + 快速搜索。\n\n?q=xxx：预填快速搜索框并自动触发（落地页「在线体验」入口）。\n未登录时把 /dashboard?q=xxx 整体作为 next 带去登录页，登录后回跳不丢 query。\n?resend_success=1：重发验证邮件成功提示。\n?resend_cooldown=1：重发验证邮件冷却期提示。","operationId":"dashboard_home_dashboard_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"resend_success","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Resend Success"}},{"name":"resend_cooldown","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Resend Cooldown"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Dashboard Home Dashboard Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/api-keys":{"get":{"tags":["dashboard"],"summary":"Dashboard Api Keys","description":"API Keys 管理页：Key 列表（可点击查看明文）+ MCP 配置卡片（选 Key 生成链接）。","operationId":"dashboard_api_keys_dashboard_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Dashboard Api Keys Dashboard Api Keys Get"}}}}}}},"/dashboard/usage":{"get":{"tags":["dashboard"],"summary":"Dashboard Usage","description":"用量页：图表与明细由浏览器 JS 调 /usage、/usage/logs 拉取。\n\n积分明细（永久/限时/未生效批次）与交易流水从 billing 页迁来，服务端渲染：\n用量消耗与积分账本同页可查，billing 页专注充值/订阅/订单。","operationId":"dashboard_usage_dashboard_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Dashboard Usage Dashboard Usage Get"}}}}}}},"/dashboard/billing":{"get":{"tags":["dashboard"],"summary":"Dashboard Billing","description":"充值/订阅/订单页：余额卡（永久/限时构成）+ 套餐 + 充值 + 订单中心。\n\n积分明细批次卡与交易流水已迁到 /dashboard/usage，这里只留余额汇总。","operationId":"dashboard_billing_dashboard_billing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Dashboard Billing Dashboard Billing Get"}}}}}}},"/dashboard/docs":{"get":{"tags":["dashboard"],"summary":"Dashboard Docs","description":"开发文档已改为公开页面（可被搜索引擎收录）。\n\n这里做 301 永久跳转：老的站内链接、用户书签与已收录 URL 都能落到 /docs，\n同时避免同一份文档出现两个 URL 造成重复内容。","operationId":"dashboard_docs_dashboard_docs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/dashboard/feedback":{"get":{"tags":["dashboard"],"summary":"Dashboard Feedback","description":"反馈工单页：提交表单 + 我的工单列表。","operationId":"dashboard_feedback_dashboard_feedback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Dashboard Feedback Dashboard Feedback Get"}}}}}}},"/dashboard/messages":{"get":{"tags":["dashboard"],"summary":"Dashboard Messages","description":"站内信页：消息列表 + 未读高亮 + 点开标记已读（数据由 JS 调 /messages 拉取）。","operationId":"dashboard_messages_dashboard_messages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Dashboard Messages Dashboard Messages Get"}}}}}}},"/healthz":{"get":{"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Healthz Healthz Get"}}}}}}},"/agent-setup/SKILL.md":{"get":{"summary":"Agent Setup Skill","description":"一句话 MCP 配置指南：AI Agent 自动配置 SearchPipe MCP 的 SKILL.md。","operationId":"agent_setup_skill_agent_setup_SKILL_md_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/search":{"post":{"summary":"Search","description":"搜索 → 抓取 → 重排 → (可选摘要) → 输出审核 → 返回。\n\n依赖链：鉴权 → 输入审核 → 限流 → 扣费 → 搜索 → 输出审核/AI标识。\nadmin/owner 豁免限流与扣费。搜索失败退款（幂等）。","operationId":"search_search_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search":{"post":{"summary":"Search","description":"搜索 → 抓取 → 重排 → (可选摘要) → 输出审核 → 返回。\n\n依赖链：鉴权 → 输入审核 → 限流 → 扣费 → 搜索 → 输出审核/AI标识。\nadmin/owner 豁免限流与扣费。搜索失败退款（幂等）。","operationId":"search_v1_search_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AdminFeedbackItem":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"category":{"type":"string","title":"Category"},"subject":{"type":"string","title":"Subject"},"content":{"type":"string","title":"Content"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","user_id","category","subject","content","status","created_at","updated_at"],"title":"AdminFeedbackItem"},"AdminFeedbackListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminFeedbackItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"AdminFeedbackListResponse"},"AdminOrderItem":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"kind":{"type":"string","title":"Kind"},"pay_channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pay Channel"},"credits":{"type":"number","title":"Credits"},"amount_cents":{"type":"integer","title":"Amount Cents"},"status":{"type":"string","title":"Status"},"provider":{"type":"string","title":"Provider"},"provider_order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Order Id"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","user_id","kind","pay_channel","credits","amount_cents","status","provider","provider_order_id","paid_at","created_at"],"title":"AdminOrderItem"},"AdminStatsResponse":{"properties":{"user_count":{"type":"integer","title":"User Count"},"active_user_count":{"type":"integer","title":"Active User Count"},"total_balance":{"type":"integer","title":"Total Balance"},"total_searches":{"type":"integer","title":"Total Searches"},"total_revenue_cents":{"type":"integer","title":"Total Revenue Cents"},"paid_order_count":{"type":"integer","title":"Paid Order Count"}},"type":"object","required":["user_count","active_user_count","total_balance","total_searches","total_revenue_cents","paid_order_count"],"title":"AdminStatsResponse"},"AdminUserItem":{"properties":{"id":{"type":"string","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"}},"type":"object","required":["id","email","phone","role","status","created_at","last_login_at"],"title":"AdminUserItem"},"AdminUserListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminUserItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"AdminUserListResponse"},"AnswerAudit":{"properties":{"score":{"type":"number","title":"Score","description":"Fraction of judged statements that are supported, 0-1"},"uncited_count":{"type":"integer","title":"Uncited Count","description":"Statements without any [n] citation marker"},"statements":{"items":{"$ref":"#/components/schemas/StatementAudit"},"type":"array","title":"Statements"},"prompt_version":{"type":"string","title":"Prompt Version","description":"Audit judge prompt version"}},"type":"object","required":["score","uncited_count","statements","prompt_version"],"title":"AnswerAudit","description":"tier-2 已审计答案：answer 逐陈述审计报告（E 方向 E-2，2026-10-15）。\n\nadditive 契约：仅 search_depth=\"advanced\" 且 include_answer=true 且\nanswer_audit_enabled 开时产出。score = 系统判 supported 的陈述占比\n（分母=有引文被判定的陈述数；全部 uncited 时为 0.0）。"},"BalanceResponse":{"properties":{"balance":{"type":"number","title":"Balance"},"permanent":{"type":"number","title":"Permanent"},"expiring":{"type":"number","title":"Expiring"},"upcoming":{"type":"number","title":"Upcoming","default":0.0},"next_expiry":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Expiry"},"free_tier_credits":{"type":"integer","title":"Free Tier Credits"},"unlimited":{"type":"boolean","title":"Unlimited","default":false}},"type":"object","required":["balance","permanent","expiring","next_expiry","free_tier_credits"],"title":"BalanceResponse"},"Body_admin_login_submit_admin_login_post":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"next":{"type":"string","title":"Next","default":""}},"type":"object","required":["email","password"],"title":"Body_admin_login_submit_admin_login_post"},"Body_admin_send_message_admin_messages_post":{"properties":{"target_type":{"type":"string","title":"Target Type"},"target_email":{"type":"string","title":"Target Email","default":""},"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"}},"type":"object","required":["target_type","title","content"],"title":"Body_admin_send_message_admin_messages_post"},"Body_forgot_password_submit_dashboard_forgot_password_post":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"Body_forgot_password_submit_dashboard_forgot_password_post"},"Body_login_submit_dashboard_login_post":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"agree_terms":{"type":"string","title":"Agree Terms","default":""},"next":{"type":"string","title":"Next","default":""}},"type":"object","required":["email","password"],"title":"Body_login_submit_dashboard_login_post"},"Body_register_submit_dashboard_register_post":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"password_confirm":{"type":"string","title":"Password Confirm"},"agree_terms":{"type":"string","title":"Agree Terms","default":""},"next":{"type":"string","title":"Next","default":""},"invitation_code":{"type":"string","title":"Invitation Code","default":""}},"type":"object","required":["email","password","password_confirm"],"title":"Body_register_submit_dashboard_register_post"},"Body_reset_password_submit_dashboard_reset_password_post":{"properties":{"token":{"type":"string","title":"Token"},"password":{"type":"string","title":"Password"},"password_confirm":{"type":"string","title":"Password Confirm"}},"type":"object","required":["token","password","password_confirm"],"title":"Body_reset_password_submit_dashboard_reset_password_post"},"CancelOrderResponse":{"properties":{"order_id":{"type":"string","title":"Order Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["order_id","status"],"title":"CancelOrderResponse"},"CatalogResponse":{"properties":{"recharge_plans":{"items":{"$ref":"#/components/schemas/PlanInfo"},"type":"array","title":"Recharge Plans"},"subscription_plans":{"items":{"$ref":"#/components/schemas/PlanInfo"},"type":"array","title":"Subscription Plans"},"credit_price_rate":{"type":"string","title":"Credit Price Rate"},"max_recharge_amount":{"type":"integer","title":"Max Recharge Amount"},"min_recharge_amount":{"type":"integer","title":"Min Recharge Amount"},"currency":{"type":"string","title":"Currency"},"pay_channels":{"items":{"type":"string"},"type":"array","title":"Pay Channels"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionInfo"},{"type":"null"}]}},"type":"object","required":["recharge_plans","subscription_plans","credit_price_rate","max_recharge_amount","min_recharge_amount","currency","pay_channels","subscription"],"title":"CatalogResponse"},"CreateFeedbackRequest":{"properties":{"category":{"type":"string","title":"Category","default":"other"},"subject":{"type":"string","maxLength":255,"title":"Subject"},"content":{"type":"string","maxLength":5000,"title":"Content"}},"type":"object","required":["subject","content"],"title":"CreateFeedbackRequest"},"CreateKeyRequest":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name","description":"Key name for identification"}},"type":"object","required":["name"],"title":"CreateKeyRequest"},"CreateKeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"key":{"type":"string","title":"Key"},"key_prefix":{"type":"string","title":"Key Prefix"},"is_default":{"type":"boolean","title":"Is Default"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","key","key_prefix","is_default","created_at"],"title":"CreateKeyResponse"},"CreateOrderRequest":{"properties":{"kind":{"type":"string","title":"Kind","default":"recharge"},"plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Id"},"amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Cents"},"pay_channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pay Channel"}},"type":"object","title":"CreateOrderRequest"},"CreateOrderResponse":{"properties":{"order_id":{"type":"string","title":"Order Id"},"pay_url":{"type":"string","title":"Pay Url"},"amount_cents":{"type":"integer","title":"Amount Cents"},"credits":{"type":"string","title":"Credits"},"status":{"type":"string","title":"Status"},"pay_channel":{"type":"string","title":"Pay Channel"}},"type":"object","required":["order_id","pay_url","amount_cents","credits","status","pay_channel"],"title":"CreateOrderResponse"},"EvidenceItem":{"properties":{"url":{"type":"string","title":"Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"source_tier":{"type":"string","enum":["official","press","academic","preprint","community","unknown"],"title":"Source Tier","default":"unknown"},"quote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote"},"span_start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Span Start"},"span_end":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Span End"},"per_evidence_verdict":{"anyOf":[{"type":"string","enum":["supported","partial","unsupported","inconclusive"]},{"type":"null"}],"title":"Per Evidence Verdict"},"confidence":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Confidence"},"url_health":{"anyOf":[{"$ref":"#/components/schemas/UrlHealth"},{"type":"null"}]}},"type":"object","required":["url"],"title":"EvidenceItem","description":"单条证据：span 级原文引句 + 逐条判定 + 来源分级 + URL 健康。"},"ExtractFailedItem":{"properties":{"url":{"type":"string","title":"Url"},"error":{"type":"string","title":"Error"}},"type":"object","required":["url","error"],"title":"ExtractFailedItem","description":"抓取失败的单条结果：error 为机器可读原因（invalid_url:/blocked:/timeout/\nhttp_<status>/extraction_empty/fetch_error），英文短语可直接展示给调用方。"},"ExtractRequest":{"properties":{"urls":{"items":{"type":"string","maxLength":2048},"type":"array","maxItems":20,"minItems":1,"title":"Urls","description":"List of URLs to extract content from (1-20)"}},"type":"object","required":["urls"],"title":"ExtractRequest","description":"POST /extract 请求体：urls 必填，1..extract_max_urls 条，单条 ≤2048 字符。"},"ExtractResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ExtractResultItem"},"type":"array","title":"Results"},"failed_results":{"items":{"$ref":"#/components/schemas/ExtractFailedItem"},"type":"array","title":"Failed Results"}},"type":"object","title":"ExtractResponse","description":"响应：results 与 failed_results 恒存在（无失败时 failed_results 为空数组）。"},"ExtractResultItem":{"properties":{"url":{"type":"string","title":"Url"},"raw_content":{"type":"string","title":"Raw Content"}},"type":"object","required":["url","raw_content"],"title":"ExtractResultItem","description":"抓取成功的单条结果（Tavily extract 风格：url + raw_content）。"},"FeedbackItem":{"properties":{"id":{"type":"string","title":"Id"},"category":{"type":"string","title":"Category"},"subject":{"type":"string","title":"Subject"},"content":{"type":"string","title":"Content"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","category","subject","content","status","created_at","updated_at"],"title":"FeedbackItem"},"FeedbackListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FeedbackItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"FeedbackListResponse"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"GrantCreditsRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"amount":{"type":"integer","title":"Amount"},"remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remark","default":"管理员发放"}},"type":"object","required":["user_id","amount"],"title":"GrantCreditsRequest"},"GrantCreditsResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"balance":{"type":"number","title":"Balance"}},"type":"object","required":["user_id","balance"],"title":"GrantCreditsResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageResult":{"properties":{"url":{"type":"string","title":"Url","description":"Image URL"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Short caption/context from the source page, when available"}},"type":"object","required":["url"],"title":"ImageResult","description":"图片检索结果（P1 控制面 T1）：include_images=true 时随响应返回。"},"KeyItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"is_default":{"type":"boolean","title":"Is Default"},"viewable":{"type":"boolean","title":"Viewable"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","key_prefix","is_default","viewable","last_used_at","revoked_at","created_at"],"title":"KeyItem"},"KeySecretResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"key":{"type":"string","title":"Key"},"key_prefix":{"type":"string","title":"Key Prefix"},"is_default":{"type":"boolean","title":"Is Default"},"mcp_url":{"type":"string","title":"Mcp Url"},"agent_prompt":{"type":"string","title":"Agent Prompt"}},"type":"object","required":["id","name","key","key_prefix","is_default","mcp_url","agent_prompt"],"title":"KeySecretResponse","description":"Key 明文包：明文 + 现成 MCP 链接 + 一句话配置（都含 Key，仅登录态可读）。"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"MessageItem":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"kind":{"type":"string","title":"Kind"},"read":{"type":"boolean","title":"Read"},"read_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Read At"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","title","content","kind","read","read_at","created_at"],"title":"MessageItem"},"MessageListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MessageItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"unread_count":{"type":"integer","title":"Unread Count"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","unread_count","page","size"],"title":"MessageListResponse"},"OrderListItem":{"properties":{"order_id":{"type":"string","title":"Order Id"},"kind":{"type":"string","title":"Kind"},"status":{"type":"string","title":"Status"},"amount_cents":{"type":"integer","title":"Amount Cents"},"credits":{"type":"string","title":"Credits"},"pay_channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pay Channel"},"plan_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Name"},"provider_checkout_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Checkout Id"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"can_resume":{"type":"boolean","title":"Can Resume"},"can_cancel":{"type":"boolean","title":"Can Cancel"}},"type":"object","required":["order_id","kind","status","amount_cents","credits","pay_channel","plan_name","provider_checkout_id","paid_at","created_at","can_resume","can_cancel"],"title":"OrderListItem","description":"订单中心列表项（含 pending 单的续付/取消入口）。"},"OrderListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OrderListItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"OrderListResponse"},"OrderStatusResponse":{"properties":{"order_id":{"type":"string","title":"Order Id"},"status":{"type":"string","title":"Status"},"credits":{"type":"string","title":"Credits"},"amount_cents":{"type":"integer","title":"Amount Cents"},"kind":{"type":"string","title":"Kind"},"pay_channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pay Channel"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["order_id","status","credits","amount_cents","kind","pay_channel","paid_at","created_at"],"title":"OrderStatusResponse"},"PackageItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"credits":{"type":"integer","title":"Credits"},"price":{"type":"number","title":"Price"}},"type":"object","required":["id","name","credits","price"],"title":"PackageItem"},"PlanInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"kind":{"type":"string","title":"Kind"},"level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Level"},"credits":{"type":"integer","title":"Credits"},"price_cents":{"type":"integer","title":"Price Cents"},"price":{"type":"number","title":"Price"},"original_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Original Price"},"period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"}},"type":"object","required":["id","name","kind","level","credits","price_cents","price","original_price","period"],"title":"PlanInfo"},"PlanItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"kind":{"type":"string","title":"Kind"},"level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Level"},"credits":{"type":"integer","title":"Credits"},"price_cents":{"type":"integer","title":"Price Cents"},"price":{"type":"number","title":"Price"},"original_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Original Price"},"period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"}},"type":"object","required":["id","name","kind","level","credits","price_cents","price","original_price","period"],"title":"PlanItem"},"RefreshRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshRequest"},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"invitation_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invitation Code","description":"邀请码（可选）"}},"type":"object","required":["email","password"],"title":"RegisterRequest"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest"},"ResultEvidence":{"properties":{"quote":{"type":"string","title":"Quote","description":"Verbatim supporting sentence from the page"},"span_start":{"type":"integer","title":"Span Start","description":"Quote start offset (into raw_content, or content when snippet-fallback)"},"span_end":{"type":"integer","title":"Span End","description":"Quote end offset (exclusive)"},"source_tier":{"type":"string","title":"Source Tier","description":"Source authority tier: official/press/academic/preprint/community/unknown","default":"unknown"},"fetch_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fetch Status","description":"HTTP status of the page fetch (None = not fetched/timeout)"},"redirected":{"type":"boolean","title":"Redirected","description":"Whether the fetch followed redirects","default":false},"final_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final Url","description":"Final URL after redirects"},"fetched_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fetched At","description":"Fetch completion time, ISO-8601 UTC"}},"type":"object","required":["quote","span_start","span_end"],"title":"ResultEvidence","description":"tier-1 证据级结果（E 方向 E-1）：每条 result 自带的逐字证据。\n\nquote/span 来自 locator.best_supporting_span（query 当 claim，对抓取正文\n确定性选句，span 为 raw_content 中的字符偏移）；抓取失败退回 content\nsnippet 兜底（此时 span 相对 content 字段，0 起算）。纯本地计算，零出站。"},"ResumeOrderResponse":{"properties":{"order_id":{"type":"string","title":"Order Id"},"pay_url":{"type":"string","title":"Pay Url"},"status":{"type":"string","title":"Status"}},"type":"object","required":["order_id","pay_url","status"],"title":"ResumeOrderResponse"},"SearchRequest":{"properties":{"query":{"type":"string","maxLength":2000,"title":"Query","description":"The search query"},"max_results":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Max Results","description":"Maximum number of results to return","default":5},"search_depth":{"type":"string","maxLength":16,"title":"Search Depth","description":"Search depth: basic (1 credit) / advanced (2 credits) / fast (0.5 credit; skips all LLM steps — retrieval + rule fusion + fetching only, results keep engine order with engine-provided relevance scores, no answer)","default":"basic"},"include_answer":{"type":"boolean","title":"Include Answer","description":"Deprecated alias for output_type='answer'; kept for backward compatibility. Prefer output_type. Ignored when output_type is explicitly set.","default":false},"include_raw_content":{"type":"boolean","title":"Include Raw Content","description":"Whether to return full fetched page content","default":false},"stream":{"type":"boolean","title":"Stream","description":"Stream the response over Server-Sent Events (requires output_type='answer'/'structured' or include_answer=true).","default":false},"include_domains":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":300},{"type":"null"}],"title":"Include Domains","description":"Restrict results to these domains. 'example.com' matches the domain and any subdomain; '*.example.com' matches subdomains only; 'example.com/docs' also requires the URL path to start with /docs."},"exclude_domains":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":150},{"type":"null"}],"title":"Exclude Domains","description":"Exclude results from these domains (same matching rules as include_domains; wins over include_domains)."},"time_range":{"anyOf":[{"type":"string","enum":["day","week","month","year"]},{"type":"null"}],"title":"Time Range","description":"Limit results to a recency window, passed to upstream engines where supported."},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date","description":"Only keep results published on/after this date (ISO 8601). Results without a known publish date are not filtered."},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date","description":"Only keep results published on/before this date (ISO 8601). Results without a known publish date are not filtered."},"topic":{"type":"string","enum":["general","news"],"title":"Topic","description":"Content topic: general (default) or news. topic='news' always adds a dedicated news channel to retrieval.","default":"general"},"country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2 region bias (e.g. 'US'); combined with language into the upstream market locale (language='en' + country='de' becomes 'en-DE')."},"language":{"anyOf":[{"type":"string","maxLength":5},{"type":"null"}],"title":"Language","description":"Upstream market language, e.g. 'en' or 'zh-CN'; overrides automatic query-language detection."},"safe_search":{"type":"integer","maximum":2.0,"minimum":0.0,"title":"Safe Search","description":"Safe-search level passed upstream: 0 off (default) / 1 moderate / 2 strict.","default":0},"include_images":{"type":"boolean","title":"Include Images","description":"Also run an image search and return an images array alongside results.","default":false},"output_type":{"anyOf":[{"type":"string","enum":["search_results","answer","structured"]},{"type":"null"}],"title":"Output Type","description":"Response shape: search_results (default) / answer (LLM answer with citations, same as include_answer=true) / structured (JSON object per output_schema)."},"output_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Schema","description":"Flat JSON Schema (object whose properties are string/number/integer/boolean; at most 20 properties, 4000 chars). Required when output_type='structured'."},"objective":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Objective","description":"Optional one-line search intent from the calling agent; used to improve reranking. Does not change what the answer covers."}},"type":"object","required":["query"],"title":"SearchRequest"},"SearchResponse":{"properties":{"query":{"type":"string","title":"Query"},"answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answer","description":"LLM-generated answer (optional)"},"results":{"items":{"$ref":"#/components/schemas/SearchResult"},"type":"array","title":"Results"},"ai_generated":{"type":"boolean","title":"Ai Generated","description":"Whether the response contains LLM-generated content","default":false},"images":{"anyOf":[{"items":{"$ref":"#/components/schemas/ImageResult"},"type":"array"},{"type":"null"}],"title":"Images","description":"Image results (present when the request set include_images=true)"},"answer_audit":{"anyOf":[{"$ref":"#/components/schemas/AnswerAudit"},{"type":"null"}],"description":"Per-statement audit of the AI answer (advanced depth only)"},"output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output","description":"Structured JSON object conforming to output_schema (output_type='structured' only; null when conversion failed)"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id","description":"Unique request identifier, also returned as the X-Request-Id response header"},"response_time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Response Time","description":"Server processing time for this request, in seconds"},"usage":{"anyOf":[{"$ref":"#/components/schemas/UsageInfo"},{"type":"null"}],"description":"Billing and cache info for this request"},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Warnings","description":"Parameter-level issues: a requested feature did not take effect (safe to show the developer; do not feed to the model)"},"notices":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Notices","description":"How this response was produced (safe to show to the model)"}},"type":"object","required":["query","results"],"title":"SearchResponse"},"SearchResult":{"properties":{"url":{"type":"string","title":"Url"},"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content","description":"Content snippet","default":""},"score":{"type":"number","title":"Score","description":"Relevance score: 0-1 from the LLM reranker on basic/advanced; raw, unnormalized upstream engine score on fast depth (0 when the source provides none; not comparable across engines)","default":0.0},"raw_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Content","description":"Full page content (optional)"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Stable result identifier (first 16 hex chars of the SHA-256 of the URL)"},"evidence":{"anyOf":[{"$ref":"#/components/schemas/ResultEvidence"},{"type":"null"}],"description":"Verbatim evidence: supporting quote, span, source tier, fetch metadata"},"published_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published Date","description":"Publish date when the source provides one (ISO 8601 string), else null"}},"type":"object","required":["url","title"],"title":"SearchResult"},"StatementAudit":{"properties":{"text":{"type":"string","title":"Text","description":"Answer statement (citation markers stripped)"},"verdict":{"type":"string","title":"Verdict","description":"supported/partial/unsupported/inconclusive (judged) or uncited (no [n] marker, not judged)"},"confidence":{"type":"number","title":"Confidence","description":"Judge confidence 0-1 (0 for uncited)","default":0.0},"citations":{"items":{"$ref":"#/components/schemas/StatementCitation"},"type":"array","title":"Citations"}},"type":"object","required":["text","verdict"],"title":"StatementAudit","description":"单条陈述的审计结果（E 方向 tier-2，四标签契约与 /verify 同名同义）。"},"StatementCitation":{"properties":{"url":{"type":"string","title":"Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"quote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote","description":"Supporting span quoted from the cited page (None = no page text)"},"span_start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Span Start"},"span_end":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Span End"}},"type":"object","required":["url"],"title":"StatementCitation","description":"陈述级引用：该陈述所引结果及其支撑 span（E 方向 tier-2）。"},"SubscriptionInfo":{"properties":{"plan_id":{"type":"string","title":"Plan Id"},"plan_name":{"type":"string","title":"Plan Name"},"level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Level"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"status":{"type":"string","title":"Status","default":"active"}},"type":"object","required":["plan_id","plan_name","level","period_start","period_end"],"title":"SubscriptionInfo"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token","refresh_token"],"title":"TokenResponse"},"TxItem":{"properties":{"id":{"type":"integer","title":"Id"},"delta":{"type":"number","title":"Delta"},"type":{"type":"string","title":"Type"},"balance_after":{"type":"number","title":"Balance After"},"remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remark"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","delta","type","balance_after","remark","created_at"],"title":"TxItem"},"TxListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TxItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"TxListResponse"},"UpdateUserRequest":{"properties":{"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","title":"UpdateUserRequest"},"UrlHealth":{"properties":{"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"redirected":{"type":"boolean","title":"Redirected","default":false},"wayback_snapshot":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Wayback Snapshot"},"fetched_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fetched At"}},"type":"object","title":"UrlHealth","description":"单条证据的 URL 健康信息（E5 接线；E2 骨架恒 None）。"},"UsageInfo":{"properties":{"credits_charged":{"type":"number","title":"Credits Charged","description":"Credits billed for this request. Cache hits are charged; 0 when exempt or refunded.","default":0.0},"cached":{"type":"boolean","title":"Cached","description":"True when the response was served from the result cache","default":false}},"type":"object","title":"UsageInfo","description":"本次请求的计费与缓存信息（P0 响应信封，history/20261020-api-v1-endpoints.md）。"},"UsageLogItem":{"properties":{"id":{"type":"string","title":"Id"},"query":{"type":"string","title":"Query"},"max_results":{"type":"integer","title":"Max Results"},"search_depth":{"type":"string","title":"Search Depth"},"credits_consumed":{"type":"integer","title":"Credits Consumed"},"latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Ms"},"status":{"type":"string","title":"Status"},"error_msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Msg"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","query","max_results","search_depth","credits_consumed","latency_ms","status","error_msg","created_at"],"title":"UsageLogItem"},"UsageLogListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UsageLogItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"UsageLogListResponse"},"UsagePoint":{"properties":{"bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bucket"},"count":{"type":"integer","title":"Count"},"credits":{"type":"integer","title":"Credits"},"free":{"type":"integer","title":"Free","default":0},"avg_latency":{"type":"integer","title":"Avg Latency"}},"type":"object","required":["bucket","count","credits","avg_latency"],"title":"UsagePoint"},"UsageResponse":{"properties":{"points":{"items":{"$ref":"#/components/schemas/UsagePoint"},"type":"array","title":"Points"},"granularity":{"type":"string","title":"Granularity"}},"type":"object","required":["points","granularity"],"title":"UsageResponse"},"UserInfo":{"properties":{"id":{"type":"string","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"role":{"type":"string","title":"Role"},"email_verified":{"type":"boolean","title":"Email Verified","default":false}},"type":"object","required":["id","role"],"title":"UserInfo"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyBatchFailedItem":{"properties":{"index":{"type":"integer","title":"Index"},"error":{"type":"string","title":"Error"}},"type":"object","required":["index","error"],"title":"VerifyBatchFailedItem","description":"批量核验单条失败：index 为请求内下标，error 为机器可读原因。"},"VerifyBatchRequest":{"properties":{"claims":{"items":{"type":"string","minLength":1},"type":"array","maxItems":20,"minItems":1,"title":"Claims","description":"Claims to verify (1-20, each <= verify_max_claim_chars)"},"mode":{"type":"string","enum":["paper","web","auto"],"title":"Mode","default":"auto"},"max_evidence":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Max Evidence","default":5}},"type":"object","required":["claims"],"title":"VerifyBatchRequest","description":"POST /verify/batch 请求体：claims 1..20 条（单条同 VerifyRequest 限长）。"},"VerifyBatchResponse":{"properties":{"results":{"items":{"anyOf":[{"$ref":"#/components/schemas/VerifyResponse"},{"type":"null"}]},"type":"array","title":"Results"},"failed":{"items":{"$ref":"#/components/schemas/VerifyBatchFailedItem"},"type":"array","title":"Failed"}},"type":"object","title":"VerifyBatchResponse","description":"批量响应：results 与 failed 恒存在（results[i]=None 表示该条失败）。\n\nresults 下标与请求 claims 一一对应；verdict 四标签语义与 /verify 一致，\ninconclusive 不退款（诚实输出也是交付物，拍板点③）。"},"VerifyRequest":{"properties":{"claim":{"type":"string","maxLength":2000,"minLength":1,"title":"Claim","description":"The claim (statement or query) to verify"},"mode":{"type":"string","enum":["paper","web","auto"],"title":"Mode","description":"Evidence route: paper / web / auto (DOI or arXiv signal decides)","default":"auto"},"evidence_urls":{"items":{"type":"string","maxLength":2048},"type":"array","maxItems":5,"title":"Evidence Urls","description":"Optional caller-supplied citations to verify (max 5; SSRF-checked)"},"max_evidence":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Max Evidence","description":"Max evidence items to return (1-10)","default":5}},"type":"object","required":["claim"],"title":"VerifyRequest","description":"POST /verify 请求体：claim 必填（≤verify_max_claim_chars，strip），\nmode 默认 auto（DOI/arXiv 信号→paper，复用 search/intent.py 判定逻辑）。"},"VerifyResponse":{"properties":{"verdict":{"type":"string","enum":["supported","partial","unsupported","inconclusive"],"title":"Verdict"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence"},"reason_code":{"type":"string","enum":["doi_match","title_match","quote_span_found","no_supporting_evidence","fetch_failed","paywall","low_authority","conflicting_evidence"],"title":"Reason Code"},"evidences":{"items":{"$ref":"#/components/schemas/EvidenceItem"},"type":"array","title":"Evidences"},"timing":{"additionalProperties":{"type":"number"},"type":"object","title":"Timing","description":"Per-stage wall time in seconds"}},"type":"object","required":["verdict","confidence","reason_code"],"title":"VerifyResponse","description":"响应：四标签 verdict + 置信度 + 模板短语理由 + 证据列表 + 分阶段耗时。\n\n计费口径（拍板点③）：inconclusive 也是交付物，不退款；整体失败（管线\n异常/超时）由端点全额退款并 503，不走本模型。"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}