import"./chunk-B3pr0VN8.js";import{n as e,t}from"./jsx-runtime-wTfS3W87.js";import{a as n,c as r,o as i,r as a,s as o,t as s}from"./docComponents-DMapxRRB.js";e();var c=`https://api2.bysjob.com`,l={"resumes-parse":{slug:`resumes-parse`,method:`POST`,path:`/api/open/v1/resumes/parse`,title:`简历解析`,eyebrow:`API REFERENCE`,description:`将 PDF 简历解析为结构化纯文本，按页计费。适合 ATS、校招系统与人才库做入库前预处理。`,params:[{name:`fileDataUrl`,type:`string`,required:!0,description:`PDF 的 base64 data URL，形如 data:application/pdf;base64,...，最长 25,000,000 字符。`},{name:`fileName`,type:`string`,required:!1,description:`文件名，最长 240 字符，仅用于审计展示。`},{name:`pages`,type:`integer`,required:!1,description:`显式指定页数（1–10000）。不传则按 PDF 内部 /Type /Page 估算。`},{name:`timeoutMs`,type:`integer`,required:!1,description:`单次解析超时（10000–660000 毫秒）。不传走默认。`}],curl:`curl -X POST ${c}/api/open/v1/resumes/parse \\
  -H "Authorization: Bearer hecn_live_xxx" \\
  -H "Idempotency-Key: parse-resume-001" \\
  -H "Content-Type: application/json" \\
  -d '{
    "fileDataUrl": "data:application/pdf;base64,JVBERi0xLjQK...",
    "fileName": "张三_前端工程师.pdf",
    "pages": 3
  }'`,responseExample:`{
  "ok": true,
  "request_id": "8f3c...e21",
  "data": {
    "text": "张三 | 前端工程师\\n联系方式：...\\n教育背景：...",
    "pages": 3
  },
  "usage": { "pages": 3, "provider": "textin", "model": "xparse-document-parse" },
  "billing": {
    "billed_point_cents": 15,
    "billed_points": 0.15,
    "balance_point_cents": 9985,
    "resource_point_cents": 0
  }
}`,billing:`按页计费：TextIn xParse 0.05 积分/页（5 point_cents/页），不向上取整。3 页 = 0.15 积分。`,notes:[`解析走 B 端 TextIn xParse，原文不长期存储，批量任务入库时以占位符替代明文。`,`data URL 过大（超 25M 字符）直接返回 413；全局请求体上限 75MB。`]},"matches-resume-jd":{slug:`matches-resume-jd`,method:`POST`,path:`/api/open/v1/matches/resume-jd`,title:`人岗匹配`,eyebrow:`API REFERENCE`,description:`输入 JD 与简历文本，返回匹配分、优势、差距、关键词覆盖与下一步复核建议。`,params:[{name:`resume_text`,type:`string`,required:!0,description:`简历正文，最长 12,000 字符。也接受 camelCase resumeText。`},{name:`jd_text`,type:`string`,required:!0,description:`岗位描述正文，10–8,000 字符。也接受 camelCase jdText。`},{name:`job_title`,type:`string`,required:!1,description:`岗位名称，最长 200 字符，辅助匹配定向。也接受 camelCase jobTitle。`}],curl:`curl -X POST ${c}/api/open/v1/matches/resume-jd \\
  -H "Authorization: Bearer hecn_live_xxx" \\
  -H "Idempotency-Key: match-001" \\
  -H "Content-Type: application/json" \\
  -d '{
    "resume_text": "张三，5 年前端经验，精通 React/TypeScript...",
    "jd_text": "招聘高级前端工程师，要求熟悉 React、TypeScript、Webpack..."
  }'`,responseExample:`{
  "ok": true,
  "request_id": "a1b2...c3d4",
  "data": {
    "score": 78,
    "strengths": ["React 5 年实战", "TypeScript 类型体系熟悉"],
    "gaps": ["缺少 Node.js 后端经验"],
    "actions": ["建议补充 1-2 个全栈项目案例"]
  },
  "usage": { "prompt_tokens": 1820, "completion_tokens": 320, "total_tokens": 2140 },
  "billing": {
    "billed_point_cents": 100,
    "billed_points": 1,
    "balance_point_cents": 9885,
    "resource_point_cents": 0
  }
}`,billing:`固定计费：1 积分/次（100 point_cents），与模型实际消耗无关。`,notes:[`字段同时接受 snake_case 与 camelCase，建议统一用 snake_case。`]},"jds-optimize":{slug:`jds-optimize`,method:`POST`,path:`/api/open/v1/jds/optimize`,title:`JD 优化`,eyebrow:`API REFERENCE`,description:`把招聘需求转成更清晰、合规、可发布的岗位描述，便于企业系统内嵌。`,params:[{name:`jd_text`,type:`string`,required:!1,description:`原始 JD 正文，最长 8,000 字符。也接受 camelCase jdText。`},{name:`job_title`,type:`string`,required:!1,description:`岗位名称，最长 200 字符。也接受 camelCase jobTitle。`},{name:`requirements`,type:`string`,required:!1,description:`岗位要求要点，最长 8,000 字符。`},{name:`location`,type:`string`,required:!1,description:`工作地点，最长 120 字符。`},{name:`experience`,type:`string`,required:!1,description:`经验要求，最长 120 字符。`}],curl:`curl -X POST ${c}/api/open/v1/jds/optimize \\
  -H "Authorization: Bearer hecn_live_xxx" \\
  -H "Idempotency-Key: jd-opt-001" \\
  -H "Content-Type: application/json" \\
  -d '{
    "job_title": "高级前端工程师",
    "requirements": "React/TypeScript/性能优化/跨团队协作",
    "location": "上海",
    "experience": "3-5 年"
  }'`,requestBodyNote:`jd_text、job_title、requirements 至少传一个，否则返回 400 invalid_input。`,responseExample:`{
  "ok": true,
  "request_id": "e5f6...7890",
  "data": {
    "content": "## 高级前端工程师（上海）\\n\\n### 岗位职责\\n1. ..."
  },
  "usage": { "prompt_tokens": 960, "completion_tokens": 740, "total_tokens": 1700 },
  "billing": {
    "billed_point_cents": 100,
    "billed_points": 1,
    "balance_point_cents": 9785,
    "resource_point_cents": 0
  }
}`,billing:`按模型实际 token 消耗计费，最低 1 积分/次（100 point_cents）。`,notes:[`仅招聘者可用；求职者调用返回 403 recruiter_only。`]},"batches-screen":{slug:`batches-screen`,method:`POST`,path:`/api/open/v1/batches/screen`,title:`批量筛选`,eyebrow:`API REFERENCE`,description:`JD + 多份简历异步处理，立即返回 batch_id，随后用查询接口轮询进度与候选人排序。`,params:[{name:`jd_text`,type:`string`,required:!0,description:`岗位描述正文，10–8,000 字符。也接受 camelCase jdText。`},{name:`label`,type:`string`,required:!1,description:`任务标签，最长 120 字符，便于检索。`},{name:`resumes`,type:`array<object>`,required:!0,description:`候选人简历数组，1–20 条。每条含 text（必填，≤12,000 字符）与 label（可选，≤120 字符）。`}],curl:`curl -X POST ${c}/api/open/v1/batches/screen \\
  -H "Authorization: Bearer hecn_live_xxx" \\
  -H "Idempotency-Key: batch-001" \\
  -H "Content-Type: application/json" \\
  -d '{
    "jd_text": "招聘高级前端工程师，要求 React/TypeScript...",
    "label": "前端组-0625",
    "resumes": [
      { "label": "张三", "text": "5 年前端，精通 React..." },
      { "label": "李四", "text": "3 年前端，Vue 转 React..." }
    ]
  }'`,responseExample:`{
  "ok": true,
  "request_id": "b7c8...d9e0",
  "data": { "batch_id": "f1a2...3b4c", "status": "running", "total": 2 },
  "billing": { "billed_point_cents": 0, "billed_points": 0, "balance_point_cents": 0, "resource_point_cents": 0 },
  "estimated_point_cents": 200,
  "billing_note": "费用按候选人数量 × 1 积分异步结算，首响应不计费。"
}`,billing:`按候选人数量计费：1 积分/位（100 point_cents/位）。失败项不扣费。费用异步结算，首响应仅给预估。`,notes:[`仅招聘者可用；求职者调用返回 403 recruiter_only。`,`批量任务异步执行，进程崩溃残留的 running 任务会在 30 分钟后被后台回收标 failed。`,`真实扣费以 GET /api/open/v1/batches/:id 返回为准。`]},"batches-get":{slug:`batches-get`,method:`GET`,path:`/api/open/v1/batches/:id`,title:`查询批量任务`,eyebrow:`API REFERENCE`,description:`按 batch_id 查询批量筛选任务的进度、候选人排序与汇总结论。`,params:[{name:`id`,type:`string (path)`,required:!0,description:`创建批量任务时返回的 batch_id。`}],curl:`curl -X GET ${c}/api/open/v1/batches/f1a2...3b4c \\
  -H "Authorization: Bearer hecn_live_xxx"`,responseExample:`{
  "ok": true,
  "data": {
    "batch_id": "f1a2...3b4c",
    "status": "done",
    "total": 2,
    "completed": 2,
    "label": "前端组-0625",
    "created_at": "2026-06-25T10:00:00.000Z",
    "items": [
      { "candidate_label": "张三", "score": 82, "tags": ["React", "TypeScript"], "recommendation": "建议进入面试；补充全栈案例" },
      { "candidate_label": "李四", "score": 61, "tags": ["Vue"], "recommendation": "可考虑，需补充考察" }
    ],
    "summary": {
      "matchConclusion": "已完成 2 位候选人与 JD 的批量匹配，当前最匹配为「张三」（82 分，优先推进）。",
      "topReasons": ["第 1 名「张三」：82 分，优先推进；建议进入面试"]
    }
  }
}`,billing:`本接口不扣费。批量费用在创建任务时按候选人数量异步结算。`,notes:[`仅招聘者可用；求职者调用返回 403 recruiter_only。`,`status 取值：running / done / failed。running 超过 30 分钟会被惰性回收为 failed。`]}},u=[`resumes-parse`,`matches-resume-jd`,`jds-optimize`,`batches-screen`,`batches-get`],d=t(),f=({doc:e})=>(0,d.jsxs)(`section`,{id:e.slug,className:`api-ref-section`,children:[(0,d.jsx)(r,{id:e.slug,children:e.title}),(0,d.jsx)(n,{method:e.method,path:e.path,description:e.description}),e.requestBodyNote?(0,d.jsx)(s,{kind:`info`,title:`请求体约束`,children:e.requestBodyNote}):null,(0,d.jsx)(i,{rows:e.params}),(0,d.jsx)(a,{title:`curl`,code:e.curl}),(0,d.jsx)(a,{language:`json`,code:e.responseExample}),(0,d.jsx)(o,{children:(0,d.jsxs)(`p`,{children:[(0,d.jsx)(`strong`,{children:`计费：`}),e.billing]})}),e.notes&&e.notes.length>0?(0,d.jsx)(o,{children:(0,d.jsx)(`ul`,{children:e.notes.map(e=>(0,d.jsx)(`li`,{children:e},e))})}):null]}),p=()=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(`div`,{className:`docs-page-head`,children:[(0,d.jsx)(`p`,{className:`docs-page-eyebrow`,children:`API REFERENCE`}),(0,d.jsx)(`h1`,{className:`docs-page-title`,children:`API 参考`}),(0,d.jsxs)(`p`,{className:`docs-page-desc`,children:[`职引 Open API v1 全部端点。基础地址 `,(0,d.jsx)(`code`,{children:`https://api2.bysjob.com`}),`，所有接口走`,(0,d.jsx)(`code`,{children:` Authorization: Bearer hecn_live_…`}),` 鉴权，建议传 `,(0,d.jsx)(`code`,{children:`Idempotency-Key`}),` 头防重复执行。`]})]}),(0,d.jsx)(r,{id:`quickstart`,children:`快速开始`}),(0,d.jsxs)(o,{children:[(0,d.jsxs)(`p`,{children:[(0,d.jsx)(`strong`,{children:`1. 申请 API Key`}),`：登录后进入「用户中心 → API 密钥」，点击「创建 API Key」。Key 明文仅展示一次，请立即保存。`]}),(0,d.jsxs)(`p`,{children:[(0,d.jsx)(`strong`,{children:`2. 认证`}),`：每个请求带 `,(0,d.jsx)(`code`,{children:`Authorization: Bearer hecn_live_…`}),`。`]}),(0,d.jsxs)(`p`,{children:[(0,d.jsx)(`strong`,{children:`3. 幂等`}),`：写入类接口建议带 `,(0,d.jsx)(`code`,{children:`Idempotency-Key`}),` 头（≤160 字符），重复请求返回首次结果且不重复扣费。`]}),(0,d.jsxs)(`p`,{children:[(0,d.jsx)(`strong`,{children:`4. 计费`}),`：按量付费，仅扣付费积分与注册赠送积分；资源包、订阅、促销不参与。余额不足返回 402。`]}),(0,d.jsxs)(`p`,{children:[(0,d.jsx)(`strong`,{children:`角色权限`}),`：求职者可调用简历解析、人岗匹配；JD 优化、批量筛选仅招聘者可用（求职者调用返回 403 `,(0,d.jsx)(`code`,{children:`recruiter_only`}),`）。`]})]}),(0,d.jsx)(r,{id:`errors`,children:`错误码`}),(0,d.jsx)(`div`,{className:`doc-table-wrap`,children:(0,d.jsxs)(`table`,{className:`doc-table`,children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{children:[(0,d.jsx)(`th`,{children:`HTTP`}),(0,d.jsx)(`th`,{children:`error`}),(0,d.jsx)(`th`,{children:`含义`})]})}),(0,d.jsxs)(`tbody`,{children:[(0,d.jsxs)(`tr`,{children:[(0,d.jsx)(`td`,{children:`400`}),(0,d.jsx)(`td`,{children:(0,d.jsx)(`code`,{children:`invalid_input`})}),(0,d.jsx)(`td`,{children:`参数校验失败，见 detail`})]}),(0,d.jsxs)(`tr`,{children:[(0,d.jsx)(`td`,{children:`401`}),(0,d.jsx)(`td`,{children:(0,d.jsx)(`code`,{children:`unauthorized`})}),(0,d.jsx)(`td`,{children:`缺少或无效的 API Key`})]}),(0,d.jsxs)(`tr`,{children:[(0,d.jsx)(`td`,{children:`402`}),(0,d.jsx)(`td`,{children:(0,d.jsx)(`code`,{children:`insufficient_points`})}),(0,d.jsx)(`td`,{children:`付费积分不足，充值后重试`})]}),(0,d.jsxs)(`tr`,{children:[(0,d.jsx)(`td`,{children:`403`}),(0,d.jsx)(`td`,{children:(0,d.jsx)(`code`,{children:`recruiter_only`})}),(0,d.jsx)(`td`,{children:`该接口仅招聘者可用`})]}),(0,d.jsxs)(`tr`,{children:[(0,d.jsx)(`td`,{children:`409`}),(0,d.jsx)(`td`,{children:(0,d.jsx)(`code`,{children:`idempotency_key_in_progress`})}),(0,d.jsx)(`td`,{children:`同 Key 请求正在执行，稍后重试`})]}),(0,d.jsxs)(`tr`,{children:[(0,d.jsx)(`td`,{children:`413`}),(0,d.jsx)(`td`,{children:(0,d.jsx)(`code`,{children:`payload_too_large`})}),(0,d.jsx)(`td`,{children:`请求体超 75MB 或 data URL 超 25M 字符`})]}),(0,d.jsxs)(`tr`,{children:[(0,d.jsx)(`td`,{children:`429`}),(0,d.jsx)(`td`,{children:(0,d.jsx)(`code`,{children:`open_api_quota_exceeded`})}),(0,d.jsx)(`td`,{children:`超出日/月请求限额`})]}),(0,d.jsxs)(`tr`,{children:[(0,d.jsx)(`td`,{children:`500`}),(0,d.jsx)(`td`,{children:(0,d.jsx)(`code`,{children:`internal_error`})}),(0,d.jsx)(`td`,{children:`服务异常，凭 request_id 联系排查`})]})]})]})}),(0,d.jsx)(r,{id:`overview`,children:`端点概览`}),(0,d.jsx)(`div`,{className:`doc-table-wrap`,children:(0,d.jsxs)(`table`,{className:`doc-table`,children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{children:[(0,d.jsx)(`th`,{children:`方法`}),(0,d.jsx)(`th`,{children:`路径`}),(0,d.jsx)(`th`,{children:`计费`})]})}),(0,d.jsx)(`tbody`,{children:u.map(e=>{let t=l[e];return t?(0,d.jsxs)(`tr`,{children:[(0,d.jsx)(`td`,{children:(0,d.jsx)(`span`,{className:`doc-method doc-method-${t.method.toLowerCase()}`,children:t.method})}),(0,d.jsx)(`td`,{children:(0,d.jsx)(`a`,{href:`#${e}`,children:(0,d.jsx)(`code`,{children:t.path})})}),(0,d.jsx)(`td`,{children:t.billing.split(`。`)[0]})]},e):null})})]})}),u.map(e=>{let t=l[e];return t?(0,d.jsx)(f,{doc:t},e):null})]});export{p as ApiReferencePage};