CiteWise API 文档
将参考文献质量控制接入研究工作流。解析元数据、查看来源证据、生成修正建议、格式化引用,并通过同一套工作区 API 处理批量任务。
发出第一个请求
发出第一个请求
将参考文献质量控制接入研究工作流。解析元数据、查看来源证据、生成修正建议、格式化引用,并通过同一套工作区 API 处理批量任务。
curl https://api.citewise.dev/api/v1/citations/parse \
-X POST \
-H "X-API-Key: cw_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"reference": "Vaswani A. Attention Is All You Need. 2017.",
"async": false
}'认证方式
服务端集成使用付费工作区 API 密钥;浏览器会话使用 Clerk JWT。每个资源都限定在已认证的工作区内。
从首次请求到审计报告
生产级集成应保存资源标识、轮询持久任务,并将系统判断与人工决定分开。
访问权限边界
在 Pro 或 Team / Lab 套餐中创建工作区 API 密钥,并只在服务端保存。次数包只增加月度额度用完后的验证次数,支持网页批量审计,但不会解锁 API 或提高速率、并发上限。浏览器会话使用 Clerk JWT。
1. 解析或预览
单条参考文献使用 POST /citations/parse。RIS、BibTeX、EndNote .enw 或 CSL-JSON 文件应先走 multipart 预览;预览只解析结构,不验证学术身份,也不预占额度。
2. 创建持久任务
文献表可提交到 /citation-jobs,或将文件重新上传到 /citation-imports/jobs。保存返回的任务 ID 和 Location 响应头;创建任务时才预占验证额度。
3. 有节制地轮询
GET Location,直到任务完成、部分错误、失败或取消。遇到 429/503 时遵守 Retry-After,并使用有上限的指数退避;不要盲目重复创建任务。
4. 复核并导出
获取任务条目和 Reference Preflight,使用复核接口记录人工决定,再导出 HTML、CSV 或 JSON。审计记录中应保留原始参考文献和条目级错误。
curl -X POST "https://api.citewise.dev/api/v1/citation-imports/preview?format=RIS" \
-H "X-API-Key: cw_live_your_key" \
-F "file=@references.ris"不要手动设置 multipart 的 Content-Type;curl 或 HTTP 客户端需要自动添加 boundary。
401 表示凭证缺失或无效;403 表示工作区套餐或权限不足;429 表示额度、速率或并发限制;503 表示服务容量暂时不可用。只有响应表明可重试时才重试。
验证规则与数据处理
身份与证据
未找到表示已完成的检索中没有匹配,不是虚假或 AI 生成的证明。历史 POSSIBLE_HALLUCINATION 仅表示旧规则下未找到匹配。LLM 补全字段只能用于检索,评分只依据用户原始输入字段。
检查完整度
COMPLETE:适用检索策略完整完成。PARTIAL:部分检索未完成。INCOMPLETE:没有可用检索完成。NOT_RUN:未检查。缺少诊断不算成功。无 DOI 时需 Crossref、OpenAlex、Semantic Scholar 中至少两个完成,并完成明确 PMID/arXiv 的适用查询。DOI 未找到结论需 Crossref 和 DataCite 完成;精确 DOI 记录可独立支持身份确认。来源失败仍会披露。
预留与结算
执行前预留次数。已交付的 COMPLETE 结果消耗一次,包括未找到和证据不足。PARTIAL 仅在 VERIFIED 或有证据支持 DOI 冲突时计费;其他部分完成释放。技术失败、未完成及取消后未执行的条目释放。释放回原月份或原次数包,不恢复已退款或冻结的购买。预览、查看、人工复核、导出和出版状态重试免费。
网页批量与 API 权限
免费版每月 50 次,每个网页批量任务在余额内最多选择 10 条。次数包也支持网页批量审计,但不解锁 API 或提升速率、并发上限。API 需 Pro 或 Team / Lab。提交前请检查粘贴拆分预览,可手动编辑;自动拆分不能保证准确。
出版状态更新
身份已确认的 DOI 会查询 Crossref 更新关系,检查撤稿、更正与关注声明。通知包含 DOI、类型、日期、来源和检查时间。此检查独立于身份验证。来源不可用不推翻已确认身份;没有更新记录不保证从未撤稿,覆盖和时效受来源限制。
第三方与数据保留
此流程处理提交的书目文本和标识符,不提取完整 Word/PDF 稿件。检索可能发送至 Crossref、DataCite、OpenAlex、Semantic Scholar、PubMed 和 arXiv。若启用可选 LLM 补全,书目输入还可能发给配置的模型提供商,但补全不作为验证证据。不保存原始上传文件;提交的参考文献、导入来源记录、结果、诊断与复核决定会保留以便追溯。目前不承诺自动删除期限。数据处理问题或删除请求请联系 milo4210@gmail.com。
增量 API 契约(规则 2026-10-v2)
现有身份状态值保持兼容。新响应增加 verification.assessment 和 verification.publicationStatus。新文献、任务条目和导出包含规则版本;报告 schemaVersion 为 2。历史结果不重新分类。原因代码和枚举是稳定的机器值,不翻译。
免费重试出版状态
GET /api/v1/citations/{id}/publication-status 需所属工作区的 API Key 或 Clerk JWT。返回当前缓存或刷新后的出版报告,不消耗额外次数,不改写历史结果。字段:status、targetDoi、source、checkedAt、notices[{type,doi,url,date}]、reasonCode。错误沿用 401/403/404 契约。
{
"assessment": {
"rulesetVersion": "2026-10-v2",
"checkCompleteness": "COMPLETE",
"coverage": "LIMITED",
"reasonCodes": [
"COVERAGE_LIMITED",
"NO_MATCH_IN_CHECKED_SOURCES"
],
"recommendedAction": "MANUAL_CHECK"
},
"publicationStatus": {
"status": "NOT_RUN",
"targetDoi": null,
"source": null,
"checkedAt": null,
"notices": [],
"reasonCode": "IDENTITY_NOT_CONFIRMED"
}
}reasonCodes: DIAGNOSTICS_MISSING | NO_USABLE_SOURCE | REQUIRED_SOURCE_FAILED | SUPPLEMENTARY_SOURCE_FAILED | INPUT_FIELDS_INSUFFICIENT | COVERAGE_LIMITED | NO_MATCH_IN_CHECKED_SOURCES | IDENTIFIER_CONFLICT | METADATA_CONFLICT | MULTIPLE_CANDIDATES
publicationStatus.status: RETRACTED | CORRECTED | EXPRESSION_OF_CONCERN | UPDATE_FOUND | NO_UPDATE_FOUND | UNAVAILABLE | NOT_RUN
请求约定
请求约定
将参考文献质量控制接入研究工作流。解析元数据、查看来源证据、生成修正建议、格式化引用,并通过同一套工作区 API 处理批量任务。
内容类型
JSON or multipart可下载的审计文件,包含风险、关键元数据和人工复核字段。
可追溯性
X-Trace-Id可选 request ID. The response exposes the trace ID for support.
分页
page + size批量条目页从 0 开始,单页最多 200 条。
重试
Retry-After遇到速率、并发或系统繁忙响应时,请遵循此响应头。
参考文献 API
验证并丰富参考文献
先解析参考文献,再使用返回的 citationId 获取证据、生成修正和格式化结果。所有参考文献接口都限定在工作区内。
/api/v1/citations/parse解析并验证参考文献
返回当前工作区范围内的资源和相关元数据。
请求体
内容类型: application/json
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| reference | string | 必填 | 原始引用、DOI、URL 或不完整参考文献。 最多 8,000 个字符。 |
| async | boolean | 可选 | Reserved for asynchronous processing. 默认 false; send false for the immediate parse response. |
{
"reference": "Vaswani, A. Attention Is All You Need. 2017.",
"async": false
}响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| citationId | UUID | - | 标识符 for follow-up citation endpoints. |
| status | string | - | Verification decision. |
| confidence | number | - | 总体置信度,范围为 0 到 1。 |
| citation | CitationDto | - | Full persisted citation, metadata fields, verification details, and APA rendering. |
{
"citationId": "7d9a7d7e-9df7-4c84-9f2a-2f4a7d9c4b11",
"status": "VERIFIED",
"confidence": 0.99,
"citation": {
"id": "7d9a7d7e-9df7-4c84-9f2a-2f4a7d9c4b11",
"status": "VERIFIED",
"confidence": 0.99,
"title": { "fieldName": "title", "value": "Attention Is All You Need", "confidence": 0.99, "algorithm": "PROVIDER_FUSION", "evidence": [] },
"verification": { "rawReference": "Vaswani A. ...", "normalizedReference": "Vaswani A... 2017", "matchScore": 0.99, "candidateMargin": 0.42, "features": {}, "matchedProviders": ["CROSSREF", "OPENALEX"], "contradictions": [], "candidates": [], "providerDiagnostics": [] },
"renderedApa": "Vaswani, A., ... (2017).",
"createdAt": "2026-01-15T10:20:30Z"
}
}返回当前工作区范围内的资源和相关元数据。
/api/v1/citations列出最近的参考文献
返回 saved citations for the authenticated workspace, newest first. Reading history does not rerun verification or consume credits.
路径和查询参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| page | integer (query) | - | Zero-indexed page number. 默认 0. |
| limit | integer (query) | - | Page size, defaults to 50 and is clamped to 1-100. |
响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| [] | CitationSummary[] | - | 该字段表示系统对结果或提取值的置信度,范围为 0 到 1。 |
[
{
"id": "7d9a7d7e-9df7-4c84-9f2a-2f4a7d9c4b11",
"rawReference": "Vaswani A. Attention Is All You Need. 2017.",
"status": "VERIFIED",
"confidence": 0.99,
"renderedApa": "Vaswani, A., ... (2017).",
"createdAt": "2026-01-15T10:20:30Z"
}
]/api/v1/citations/{id}获取参考文献
返回当前工作区范围内的资源和相关元数据。
路径和查询参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | UUID | 必填 | 用于后续请求的资源标识符。 |
响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| verification.assessment | CheckAssessment | - | 规则版本 rulesetVersion、检查完整度 checkCompleteness(COMPLETE/PARTIAL/INCOMPLETE/NOT_RUN)、覆盖范围 coverage、原因 reasonCodes 和建议动作 recommendedAction。详见验证规则。 |
| verification.publicationStatus | PublicationStatusReport | - | 独立出版状态报告:status、targetDoi、source、checkedAt、notices、reasonCode。未发现更新记录不等于从未撤稿。 |
| id | UUID | - | 已保存的参考文献标识符。 |
| status | string | - | VERIFIED、PROBABLY_VERIFIED、AMBIGUOUS、CONFLICTING_METADATA、NOT_FOUND、INSUFFICIENT_EVIDENCE。历史 POSSIBLE_HALLUCINATION 仅表示旧规则下未找到匹配,新检查不再生成此值。 |
| confidence | number | - | 总体置信度,范围为 0 到 1。 |
| parsingConfidence | number | - | 该字段表示系统对结果或提取值的置信度,范围为 0 到 1。 |
| identityConfidence | number | - | 该字段表示系统对结果或提取值的置信度,范围为 0 到 1。 |
| title ... publisher | FieldDto | null | - | 解析后的元数据字段;每个字段包含值、置信度、算法和证据。 |
| verification | VerificationDto | - | 标准化输入、匹配分数、来源诊断、冲突和候选匹配。 |
| renderedApa | string | null | - | APA rendering generated during verification. |
| createdAt | ISO-8601 timestamp | - | 以 UTC 表示的创建时间。 |
{
"id": "7d9a7d7e-9df7-4c84-9f2a-2f4a7d9c4b11",
"status": "VERIFIED",
"confidence": 0.99,
"title": { "fieldName": "title", "value": "Attention Is All You Need", "confidence": 0.99 },
"verification": { "matchedProviders": ["CROSSREF"], "contradictions": [], "candidates": [] },
"renderedApa": "Vaswani, A., ... (2017).",
"createdAt": "2026-01-15T10:20:30Z"
}/api/v1/citations/{id}/publication-status出版状态更新
免费重新检查出版状态,返回当前缓存或更新后的报告,不消耗核验额度。
路径和查询参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | UUID | 必填 | 用于后续请求的资源标识符。 |
响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| status / targetDoi / source / checkedAt / notices / reasonCode | PublicationStatusReport | - | 字段及枚举见下方验证规则和响应示例。 |
{
"status": "RETRACTED",
"targetDoi": "10.1038/nature12968",
"source": "CROSSREF",
"checkedAt": "2026-10-26T00:00:00Z",
"notices": [
{
"type": "RETRACTION",
"doi": "10.1038/nature13598",
"url": "https://doi.org/10.1038/nature13598",
"date": "2014-07-02"
}
],
"reasonCode": null
}/api/v1/citations/{id}/evidence获取字段证据
返回 provider evidence grouped by metadata field. Use this to show why a field was accepted or investigate a contradiction.
路径和查询参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | UUID | 必填 | 用于后续请求的资源标识符。 |
响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| {fieldName} | EvidenceDto[] | - | Dynamic keys such as title, authors, year, doi, or journal map to evidence arrays. |
| source / value | string / unknown | - | 来源标识符及来源返回的值。 |
| sourceReliability | number | - | 已配置的来源可靠性,范围为 0 到 1。 |
| extractionConfidence | number | - | 该值被正确提取的置信度。 |
| contextMatchScore | number | - | 来源结果与提交的参考文献的匹配程度。 |
| weightedScore | number | - | 综合证据分数。 |
| createdAt | ISO-8601 timestamp | - | 以 UTC 表示的证据采集时间。 |
{
"title": [
{ "source": "CROSSREF", "value": "Attention Is All You Need", "sourceReliability": 0.98, "extractionConfidence": 1.0, "contextMatchScore": 0.99, "weightedScore": 0.97, "createdAt": "2026-01-15T10:20:30Z" }
],
"doi": []
}/api/v1/citations/{id}/correction-proposals生成修正建议
返回当前工作区范围内的资源和相关元数据。
路径和查询参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | UUID | 必填 | 用于后续请求的资源标识符。 |
响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| citationId | UUID | - | Citation being evaluated. |
| decision | string | - | PROPOSED, NO_CHANGES, or REVIEW_REQUIRED. |
| changes | CorrectionChangeDto[] | - | 该字段表示系统对结果或提取值的置信度,范围为 0 到 1。 |
| unresolvedConflicts | string[] | - | Conflicts that could not be resolved automatically. |
{
"citationId": "7d9a7d7e-9df7-4c84-9f2a-2f4a7d9c4b11",
"decision": "PROPOSED",
"changes": [{ "field": "doi", "changeType": "RECOVERED", "originalValue": null, "proposedValue": "10.48550/arXiv.1706.03762", "confidence": 0.98, "provenance": "PROVIDER_BACKED", "sources": ["CROSSREF"], "reason": "Proposed value is supported by external scholarly metadata" }],
"unresolvedConflicts": []
}/api/v1/citations/render生成引用格式
Renders a stored citation or caller-supplied metadata in one or more supported styles. Exactly one of citationId or metadata is 必填.
请求体
内容类型: application/json
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| citationId | UUID | - | 已保存的 citation. Mutually exclusive with metadata. |
| metadata | CitationMetadataRequest | - | Inline metadata. Include at least one field; mutually exclusive with citationId. |
| styles | string[] | - | 最多 10 styles. 默认 ["APA7"]. 支持: APA7, MLA9, CHICAGO_AUTHOR_DATE, IEEE, VANCOUVER, GBT7714. |
{
"citationId": "7d9a7d7e-9df7-4c84-9f2a-2f4a7d9c4b11",
"styles": ["APA7", "MLA9", "IEEE"]
}响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| citationId | UUID | null | - | 已保存的 citation ID, or null when rendering inline metadata. |
| renderings | object | - | Map of canonical style name to rendered citation string. |
{
"citationId": "7d9a7d7e-9df7-4c84-9f2a-2f4a7d9c4b11",
"renderings": { "APA7": "Vaswani, A., ... (2017).", "MLA9": "Vaswani, Ashish, et al. ...", "IEEE": "A. Vaswani et al., ..." }
}For inline rendering, send metadata with fields such as title, authors, year, doi, and publisher. Inline metadata is not persisted.
批量任务
处理更大规模的工作流
使用持久化任务处理多条参考文献、进度查询或去重。创建任务会返回 HTTP 202 和 Location 响应头。
/api/v1/citation-imports/preview预览结构化导入
返回解析结果或任务中的记录数量。
请求体
内容类型: multipart/form-data
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| file | multipart file | 必填 | 处理结构化文件并返回格式、记录数量、警告和标准化元数据。 |
| format | string (query) | - | 可选 explicit format: BIBTEX, RIS, ENDNOTE, or CSL_JSON. The extension is used by default. |
curl -X POST "https://api.citewise.dev/api/v1/citation-imports/preview?format=RIS" -H "X-API-Key: cw_live_your_key" -F "file=@references.ris"处理结构化文件并返回格式、记录数量、警告和标准化元数据。
响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| format | string | - | Detected format: BIBTEX, RIS, ENDNOTE, or CSL_JSON. |
| totalRecords | integer | - | 数量 source records found in the file. |
| validRecords | integer | - | Records successfully converted to common CSL metadata. |
| invalidRecords | integer | - | Records that could not be converted and will not enter a job. |
| warningCount | integer | - | 总计 warnings across all parsed records. |
| records | ImportRecordPreview[] | - | 全部解析记录的预览,含 index、sourceKey、title、authors、year、doi、warnings、valid;只有有效记录可提交任务。 |
{
"format": "BIBTEX",
"totalRecords": 2, "validRecords": 2, "invalidRecords": 0, "warningCount": 0,
"records": [{ "index": 1, "sourceKey": "vaswani2017", "title": "Attention Is All You Need", "authors": "Vaswani, Ashish", "year": 2017, "doi": null, "warnings": [], "valid": true }]
}/api/v1/citation-imports/jobs创建导入任务
Re-uploads a previously previewed structured file and creates a durable verification job. Only valid records are submitted, at least two valid records are 必填, and quota is reserved at this point.
请求体
内容类型: multipart/form-data
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| file | multipart file | 必填 | 处理结构化文件并返回格式、记录数量、警告和标准化元数据。 |
| styles | string[] (repeated multipart parts) | - | 可选 repeated form parts such as styles=APA7&styles=MLA9; defaults to APA7. |
| format | string (query) | - | 可选 explicit format override. |
| selectedIndices | integer[] (repeated multipart parts) | - | 可选,预览中有效记录的索引,不可重复。省略时提交全部有效记录;至少选择两条。 |
curl -X POST "https://api.citewise.dev/api/v1/citation-imports/jobs?format=RIS" -H "X-API-Key: cw_live_your_key" -F "file=@references.ris" -F "styles=APA7" -F "styles=IEEE"The response is the same 202 job resource returned by /api/v1/citation-jobs. Each item stores its original source record, while the upload itself is not persisted. At least two valid records are 必填.
响应
202 Accepted| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | UUID | - | 用于后续请求的资源标识符。 |
| type | string | - | VERIFY_AND_CORRECT or DEDUPLICATE. |
| status | string | - | PREPARING(准备中)、QUEUED(排队中)、RUNNING(运行中)、COMPLETED(完成)、COMPLETED_WITH_ERRORS(部分失败)、CANCELLED(已取消)或 FAILED(失败)。 |
| totalItems / processedItems | integer | - | 总计 inputs and items that have finished processing. |
| succeededItems / failedItems | integer | - | 成功的 and failed item counters. |
| cancelRequested | boolean | - | 是否 cancellation has been requested. |
| result | object | null | - | Aggregate result when the job completes. |
| errorCode / errorMessage | string | null | - | Job-level failure details, when applicable. |
| createdAt ... updatedAt | ISO-8601 timestamp | - | Job lifecycle timestamps in UTC. |
{
"id": "3f0f7d3c-7033-4b0d-92df-5e8d5ab2e7f6",
"type": "VERIFY_AND_CORRECT",
"status": "QUEUED",
"totalItems": 2, "processedItems": 0, "succeededItems": 0, "failedItems": 0
}/api/v1/citation-jobs创建参考文献任务
创建核验、纠正或去重任务。网页批量核验使用可用月度额度和次数包;未持有次数包的免费工作区每任务最多 10 条。API 密钥访问仍需符合条件的订阅。去重需要 Pro 或 Team / Lab,且至少需要两个已存文献 ID。
请求体
内容类型: application/json
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| type | string | 必填 | VERIFY_AND_CORRECT for references, or DEDUPLICATE for existing citationIds. |
| references | string[] | - | 最多 1,000 references, each up to 8,000 characters. Required for VERIFY_AND_CORRECT. |
| citationIds | UUID[] | - | 最多 1,000 stored citation IDs. Required for DEDUPLICATE. |
| options.styles | string[] | - | 最多 10 render styles. 默认 ["APA7"]. |
{
"type": "VERIFY_AND_CORRECT",
"references": ["Vaswani A. Attention Is All You Need. 2017.", "Devlin J. BERT: Pre-training of Deep Bidirectional Transformers. 2019."],
"options": { "styles": ["APA7", "IEEE"] }
}响应
202 Accepted| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | UUID | - | 用于后续请求的资源标识符。 |
| type | string | - | VERIFY_AND_CORRECT or DEDUPLICATE. |
| status | string | - | PREPARING(准备中)、QUEUED(排队中)、RUNNING(运行中)、COMPLETED(完成)、COMPLETED_WITH_ERRORS(部分失败)、CANCELLED(已取消)或 FAILED(失败)。 |
| totalItems / processedItems | integer | - | 总计 inputs and items that have finished processing. |
| succeededItems / failedItems | integer | - | 成功的 and failed item counters. |
| cancelRequested | boolean | - | 是否 cancellation has been requested. |
| result | object | null | - | Aggregate result when the job completes. |
| errorCode / errorMessage | string | null | - | Job-level failure details, when applicable. |
| createdAt ... updatedAt | ISO-8601 timestamp | - | Job lifecycle timestamps in UTC. |
{
"id": "3f0f7d3c-7033-4b0d-92df-5e8d5ab2e7f6",
"type": "VERIFY_AND_CORRECT",
"status": "QUEUED",
"totalItems": 2, "processedItems": 0, "succeededItems": 0, "failedItems": 0,
"cancelRequested": false, "result": null, "errorCode": null, "errorMessage": null,
"createdAt": "2026-01-15T10:20:30Z", "startedAt": null, "completedAt": null, "updatedAt": "2026-01-15T10:20:30Z"
}/api/v1/citation-jobsList audit jobs
返回 VERIFY_AND_CORRECT audit tasks for the authenticated workspace, newest first. Opening a task reads its saved state and does not submit it again.
路径和查询参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| page | integer (query) | - | Zero-indexed page number. 默认 0. |
| limit | integer (query) | - | Page size, defaults to 50 and is clamped to 1-100. |
响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| [] | CitationJobResponse[] | - | 返回资源当前状态;可能值请参阅接口定义。 |
[
{
"id": "3f0f7d3c-7033-4b0d-92df-5e8d5ab2e7f6",
"type": "VERIFY_AND_CORRECT",
"status": "COMPLETED",
"totalItems": 3, "processedItems": 3, "succeededItems": 3, "failedItems": 0,
"createdAt": "2026-10-31T10:20:30Z"
}
]/api/v1/citation-jobs/{id}获取任务状态
返回资源当前状态;可能值请参阅接口定义。
路径和查询参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | UUID | 必填 | 用于后续请求的资源标识符。 |
响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | UUID | - | 用于后续请求的资源标识符。 |
| type | string | - | VERIFY_AND_CORRECT or DEDUPLICATE. |
| status | string | - | PREPARING(准备中)、QUEUED(排队中)、RUNNING(运行中)、COMPLETED(完成)、COMPLETED_WITH_ERRORS(部分失败)、CANCELLED(已取消)或 FAILED(失败)。 |
| totalItems / processedItems | integer | - | 总计 inputs and items that have finished processing. |
| succeededItems / failedItems | integer | - | 成功的 and failed item counters. |
| cancelRequested | boolean | - | 是否 cancellation has been requested. |
| result | object | null | - | Aggregate result when the job completes. |
| errorCode / errorMessage | string | null | - | Job-level failure details, when applicable. |
| createdAt ... updatedAt | ISO-8601 timestamp | - | Job lifecycle timestamps in UTC. |
{
"id": "3f0f7d3c-7033-4b0d-92df-5e8d5ab2e7f6",
"type": "VERIFY_AND_CORRECT",
"status": "COMPLETED_WITH_ERRORS",
"totalItems": 2, "processedItems": 2, "succeededItems": 1, "failedItems": 1,
"cancelRequested": false, "result": null, "errorCode": null, "errorMessage": null,
"createdAt": "2026-01-15T10:20:30Z", "startedAt": "2026-01-15T10:20:31Z", "completedAt": "2026-01-15T10:21:02Z", "updatedAt": "2026-01-15T10:21:02Z"
}/api/v1/citation-jobs/{id}/items列出任务条目
返回 item-level results and failures in item-index order.
路径和查询参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | UUID | 必填 | 用于后续请求的资源标识符。 |
| page | integer (query) | - | Zero-indexed page number. 默认 0. |
| size | integer (query) | - | Page size, defaults to 100 and is clamped to 1-200. |
响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| jobId / page / size | UUID / integer / integer | - | Job ID and effective zero-indexed pagination values. Size is clamped to 1-200. |
| totalItems / totalPages | integer | - | 分页 totals. |
| items | CitationJobItemResponse[] | - | 记录人工复核决定、复核备注与时间,同时保留系统生成的风险判断和原始参考文献。 |
| items[].rulesetVersion | string | null | - | 本条目使用的规则版本;历史结果可能为 null,历史记录不会改写。 |
| items[].recommendedAction | string | null | - | 建议的下一步操作。RETRY 表示检查未完成,应重新运行。 |
{
"jobId": "3f0f7d3c-7033-4b0d-92df-5e8d5ab2e7f6",
"page": 0,
"size": 100,
"totalItems": 1,
"totalPages": 1,
"items": [
{
"id": "a3c12345-7033-4b0d-92df-5e8d5ab2e7f6",
"index": 0,
"status": "SUCCEEDED",
"reference": "Vaswani A. et al. Attention Is All You Need. 2017. doi:10.48550/arXiv.1706.03762",
"sourceRecord": null,
"inputCitationId": null,
"citationId": "7d9a1234-7033-4b0d-92df-5e8d5ab2e7f6",
"rulesetVersion": "2026-10-v2",
"riskLevel": "LOW",
"recommendedAction": "NO_ACTION",
"riskReasons": [],
"result": {
"citation": {
"citationId": "7d9a1234-7033-4b0d-92df-5e8d5ab2e7f6",
"status": "VERIFIED",
"confidence": 0.98,
"citation": {
"id": "7d9a1234-7033-4b0d-92df-5e8d5ab2e7f6",
"status": "VERIFIED",
"confidence": 0.98,
"verification": {
"assessment": {
"rulesetVersion": "2026-10-v2",
"checkCompleteness": "COMPLETE",
"coverage": "IDENTIFIER_LOOKUP",
"reasonCodes": [],
"recommendedAction": "NO_ACTION"
}
}
}
},
"correctionProposal": null,
"rendering": null
},
"reviewDecision": null,
"errorCode": null,
"errorMessage": null
}
]
}可选 query parameters are page (default 0) and size (default 100, maximum 200).
/api/v1/citation-jobs/{jobId}/items/{itemId}/review记录人工复核决定
记录人工复核决定、复核备注与时间,同时保留系统生成的风险判断和原始参考文献。
路径和查询参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| jobId | UUID | 必填 | 返回参考文献审计的风险分类、建议操作、复核进度和汇总数据。 |
| itemId | UUID | 必填 | 用于后续请求的资源标识符。 |
请求体
内容类型: application/json
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| decision | string | 必填 | ACCEPT_RESOLVED, ACCEPT_CORRECTION, CHOOSE_CANDIDATE, KEEP_ORIGINAL, MARK_FOR_REVIEW, or UNABLE_TO_DETERMINE. |
| candidateSourceId | string | - | 用于后续请求的资源标识符。 |
| note | string | - | 可选 reviewer note, up to 2,000 characters. |
{
"decision": "CHOOSE_CANDIDATE",
"candidateSourceId": "CROSSREF:10.5555/test",
"note": "Confirmed against the publisher record."
}响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| reviewDecision | string | - | 记录人工复核决定、复核备注与时间,同时保留系统生成的风险判断和原始参考文献。 |
| selectedCandidateSourceId | string | null | - | Selected candidate for CHOOSE_CANDIDATE. |
| reviewNote | string | null | - | 记录人工复核决定、复核备注与时间,同时保留系统生成的风险判断和原始参考文献。 |
| reviewedBy / reviewedAt | UUID | null / timestamp | - | 记录人工复核决定、复核备注与时间,同时保留系统生成的风险判断和原始参考文献。 |
{
"id": "a3c1...",
"riskLevel": "REVIEW",
"reviewDecision": "CHOOSE_CANDIDATE",
"selectedCandidateSourceId": "CROSSREF:10.5555/test",
"reviewNote": "Confirmed against the publisher record.",
"reviewedAt": "2026-10-09T08:30:00Z"
}记录人工复核决定、复核备注与时间,同时保留系统生成的风险判断和原始参考文献。
/api/v1/citation-jobs/{id}/cancel取消任务
按照请求安排或执行取消,并返回更新后的订阅或任务状态。
路径和查询参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | UUID | 必填 | 用于后续请求的资源标识符。 |
响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | UUID | - | 用于后续请求的资源标识符。 |
| type | string | - | VERIFY_AND_CORRECT or DEDUPLICATE. |
| status | string | - | PREPARING(准备中)、QUEUED(排队中)、RUNNING(运行中)、COMPLETED(完成)、COMPLETED_WITH_ERRORS(部分失败)、CANCELLED(已取消)或 FAILED(失败)。 |
| totalItems / processedItems | integer | - | 总计 inputs and items that have finished processing. |
| succeededItems / failedItems | integer | - | 成功的 and failed item counters. |
| cancelRequested | boolean | - | 是否 cancellation has been requested. |
| result | object | null | - | Aggregate result when the job completes. |
| errorCode / errorMessage | string | null | - | Job-level failure details, when applicable. |
| createdAt ... updatedAt | ISO-8601 timestamp | - | Job lifecycle timestamps in UTC. |
{
"id": "3f0f7d3c-7033-4b0d-92df-5e8d5ab2e7f6", "type": "VERIFY_AND_CORRECT", "status": "CANCELLED",
"totalItems": 100, "processedItems": 12, "succeededItems": 12, "failedItems": 0, "cancelRequested": true,
"result": null, "errorCode": null, "errorMessage": null, "createdAt": "2026-01-15T10:20:30Z", "startedAt": "2026-01-15T10:20:31Z", "completedAt": "2026-01-15T10:21:02Z", "updatedAt": "2026-01-15T10:21:02Z"
}/api/v1/citation-jobs/{id}/preflight获取参考文献审计报告
返回已保存审计结果,不消耗新额度。新 NOT_FOUND 结果为 REVIEW,元数据冲突为 HIGH;INCOMPLETE 和 NOT_RUN 不计入书目风险统计,建议重试。出版更新独立展示。BLOCKING 枚举仅为兼容历史报告保留。
路径和查询参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | UUID | 必填 | 用于后续请求的资源标识符。 |
响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| schemaVersion | integer | - | 当前审计结构版本为 2,包含人工复核、检查完整度、规则版本和出版更新。 |
| summary | PreflightSummary | - | 返回参考文献审计的风险分类、建议操作、复核进度和汇总数据。 |
| items | CitationJobItemResponse[] | - | 记录人工复核决定、复核备注与时间,同时保留系统生成的风险判断和原始参考文献。 |
| limitations | string[] | - | 处理结构化文件并返回格式、记录数量、警告和标准化元数据。 |
{
"schemaVersion": 2,
"product": "CiteWise Reference Audit",
"summary": { "jobId": "3f0f...", "complete": true, "totalReferences": 20, "processedReferences": 20, "verified": 14, "needsReview": 6, "blocking": 0, "reviewed": 12, "pendingReview": 8, "unableToDetermine": 1 },
"items": [{ "index": 0, "riskLevel": "HIGH", "recommendedAction": "REPLACE_IDENTIFIER", "reviewDecision": "MARK_FOR_REVIEW" }],
"limitations": ["Provider availability can affect an individual result."]
}返回当前工作区范围内的资源和相关元数据。
/api/v1/citation-jobs/{id}/preflight/export导出参考文献审计
返回参考文献审计的风险分类、建议操作、复核进度和汇总数据。
路径和查询参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | UUID | 必填 | 用于后续请求的资源标识符。 |
| format | string (query) | 必填 | json, csv, or html. |
| include | string (query) | 可选 | CSV 和 HTML 的可选附加内容,用逗号分隔:evidence(各字段置信度及每个来源返回的值)、candidates、diagnostics 或 all。不传时只输出默认列。JSON 始终包含完整的已保存结果。 |
响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| JSON | application/json | - | Versioned report with summary, enriched items, and limitations. |
| CSV | text/csv; charset=UTF-8 | - | 返回参考文献审计的风险分类、建议操作、复核进度和汇总数据。 |
| HTML | text/html; charset=UTF-8 | - | 可下载的审计文件,包含风险、关键元数据和人工复核字段。 |
GET /api/v1/citation-jobs/3f0f.../preflight/export?format=csv
Content-Disposition: attachment; filename="citewise-preflight-3f0f7d3c.csv"记录人工复核决定、复核备注与时间,同时保留系统生成的风险判断和原始参考文献。
工作区
管理用量和凭证
这些接口都限定在工作区内。控制台用户通常使用 Clerk 会话;当前后端也接受 API 密钥,但账单结账仍需要交互式 Clerk 会话。
/api/v1/console/overview获取工作区概览
返回 the current user, workspace, plan entitlement, monthly reference usage, and admin flag.
响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| user | object | - | id, email, displayName, imageUrl, and role. |
| workspace | object | - | id, name, and slug. |
| entitlement | EntitlementSnapshot | - | Plan code, status, monthly allowance, one-time credit balance, throughput, concurrency, and API 访问权限. |
| referencesUsed | integer | - | 本月月度额度已结算的消耗,不含预留额度及次数包消耗。 |
| referencesReserved | integer | - | 月度额度和次数包的全部有效预留,尚未计为已消耗。 |
| monthlyReferencesReserved | integer | - | 当前月度额度中的有效预留。monthlyReferences 减去此值和 referencesUsed,即为月度可用余额。 |
| admin | boolean | - | 是否 the user has admin privileges. |
{
"user": { "id": "...", "email": "researcher@example.com", "displayName": "Ada", "imageUrl": null, "role": "USER" },
"workspace": { "id": "...", "name": "Ada's workspace", "slug": "ada-workspace" },
"entitlement": { "planCode": "FREE", "subscriptionStatus": "ACTIVE", "monthlyReferences": 10, "creditBalance": 100, "requestsPerMinute": 10, "concurrency": 1, "apiAccess": false, "currentPeriodEnd": null, "cancelAtPeriodEnd": false, "hasSubscription": false, "canCancel": false, "canResume": false },
"referencesUsed": 2, "referencesReserved": 1, "monthlyReferencesReserved": 1, "admin": false
}/api/v1/api-keys列出 API 密钥
返回当前工作区范围内的资源和相关元数据。
响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id / name | UUID / string | - | 用于后续请求的资源标识符。 |
| prefix / last4 | string | - | Safe display prefix and last four secret characters. |
| status | string | - | ACTIVE or REVOKED. |
| createdAt / lastUsedAt / expiresAt | timestamp | null | - | Key lifecycle metadata. |
[
{ "id": "c4c7...", "name": "Production pipeline", "prefix": "cw_live_a1b2c3", "last4": "xYz9", "status": "ACTIVE", "createdAt": "2026-01-15T10:20:30Z", "lastUsedAt": null, "expiresAt": null }
]/api/v1/api-keys创建 API 密钥
创建或提交请求指定的资源,并返回其当前状态。
请求体
内容类型: application/json
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| name | string | 必填 | 便于阅读的 name, trimmed and limited to 100 characters. |
{
"name": "Production pipeline"
}响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| key | ApiKeyView | - | Safe key metadata returned for display. |
| apiKey | string | - | 完整密钥. This is the only response that contains it. |
{
"key": { "id": "c4c7...", "name": "Production pipeline", "prefix": "cw_live_a1b2c3", "last4": "xYz9", "status": "ACTIVE", "createdAt": "2026-01-15T10:20:30Z", "lastUsedAt": null, "expiresAt": null },
"apiKey": "cw_live_a1b2c3_your-secret-value"
}API 访问权限 must be enabled for the workspace. A workspace can have up to 10 active keys. Treat the secret like a password.
/api/v1/api-keys/{id}移除 API 密钥
Immediately marks a workspace API key as revoked. Existing requests using it will fail authentication.
路径和查询参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | UUID | 必填 | 用于后续请求的资源标识符。 |
响应
204 No Content无响应体。
The response has no body. Keep the key ID from the list endpoint for revocation workflows.
账单
管理套餐和账单
账单接口由控制台使用。Creem 是结账、订阅生命周期、付款方式和发票的事实来源。
/api/v1/billing/subscription获取订阅权益
返回 the effective plan and limits for the authenticated workspace, including free-plan defaults and cancellation state.
响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| planCode / subscriptionStatus | string | - | 返回资源当前状态;可能值请参阅接口定义。 |
| monthlyReferences | integer | - | 每月参考文献额度. |
| creditBalance | integer | - | 剩余 one-time credits, consumed after the monthly allowance. |
| requestsPerMinute / concurrency | integer | - | Throughput and concurrent execution limits. |
| apiAccess | boolean | - | 是否 workspace API keys are enabled. |
| currentPeriodEnd | timestamp | null | - | 当前 billing period end. |
| cancelAtPeriodEnd | boolean | - | 是否 cancellation is scheduled at the end of the current period. |
| currentPeriodStart | timestamp | null | - | 当前 billing period start. |
| hasSubscription | boolean | - | 是否 the workspace has a provider-managed paid subscription. |
| canCancel / canResume | boolean | - | 是否 the current subscription state supports the corresponding lifecycle action. |
{
"planCode": "PRO", "subscriptionStatus": "ACTIVE", "monthlyReferences": 500, "creditBalance": 100, "requestsPerMinute": 60, "concurrency": 5, "apiAccess": true,
"currentPeriodEnd": "2026-02-15T00:00:00Z", "cancelAtPeriodEnd": false, "hasSubscription": true, "canCancel": true, "canResume": false
}/api/v1/billing/checkout创建结账会话
返回当前工作区范围内的资源和相关元数据。
请求体
内容类型: application/json
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| productKey | string | 必填 | Configured product key, such as pro-monthly, team-yearly, starter-pack, research-pack, or lab-pack. |
{
"productKey": "pro-monthly"
}响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| checkoutId | string | - | 来源 checkout identifier. |
| checkoutUrl | string | - | Hosted checkout URL. |
{
"checkoutId": "ch_123456",
"checkoutUrl": "https://checkout.creem.io/ch_123456"
}/api/v1/billing/checkout/confirm确认结账结果
返回资源当前状态;可能值请参阅接口定义。
请求体
内容类型: application/json
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| checkoutId | string | 必填 | 用于后续请求的资源标识符。 |
{
"checkoutId": "chk_123456"
}响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| hasSubscription | boolean | - | True when a recurring checkout has been linked successfully. |
| planCode / subscriptionStatus | string | - | The reconciled workspace entitlement. |
{
"planCode": "PRO", "subscriptionStatus": "ACTIVE", "hasSubscription": true, "canCancel": true
}/api/v1/billing/subscription/cancel取消订阅
按照请求安排或执行取消,并返回更新后的订阅或任务状态。
请求体
内容类型: application/json
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| mode | string (optional) | - | scheduled (default) or immediate. |
{
"mode": "scheduled"
}响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| cancelAtPeriodEnd | boolean | - | 按照请求安排或执行取消,并返回更新后的订阅或任务状态。 |
| currentPeriodEnd | timestamp | null | - | 日期 through which access remains available. |
{
"planCode": "PRO", "subscriptionStatus": "SCHEDULED_CANCEL", "cancelAtPeriodEnd": true,
"currentPeriodEnd": "2026-02-15T00:00:00Z"
}/api/v1/billing/subscription/resume恢复订阅
按照请求安排或执行取消,并返回更新后的订阅或任务状态。
响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| subscriptionStatus | string | - | Usually ACTIVE after a successful resume. |
| cancelAtPeriodEnd | boolean | - | 按照请求安排或执行取消,并返回更新后的订阅或任务状态。 |
{
"planCode": "PRO", "subscriptionStatus": "ACTIVE", "cancelAtPeriodEnd": false
}/api/v1/billing/portal打开账单门户
创建或提交请求指定的资源,并返回其当前状态。
响应
200 OK| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| customerPortalLink | string | - | Hosted Creem customer portal URL. |
{
"customerPortalLink": "https://creem.io/customer-portal/..."
}错误
错误
将参考文献质量控制接入研究工作流。解析元数据、查看来源证据、生成修正建议、格式化引用,并通过同一套工作区 API 处理批量任务。
| HTTP | Code | 含义 |
|---|---|---|
| 400 | INVALID_REFERENCE / UNSUPPORTED_CITATION_STYLE / FUSION_FAILED | 请求 body is invalid, a 必填 field is missing, a citation style is unsupported, or evidence fusion could not complete. |
| 400 | INVALID_REQUEST | 请求 body, path parameter, or 必填 header is malformed. |
| 401 | UNAUTHENTICATED / API_KEY_INVALID / WEBHOOK_SIGNATURE_INVALID | No valid Clerk JWT or X-API-Key was provided, or a signed webhook request failed verification. |
| 403 | FORBIDDEN / SUBSCRIPTION_REQUIRED | The credential is valid but cannot access this workspace or paid-only feature. |
| 404 | CITATION_NOT_FOUND / JOB_NOT_FOUND | The resource does not exist in the authenticated workspace. |
| 405 | METHOD_NOT_ALLOWED | The HTTP method is not supported by this endpoint. |
| 415 | UNSUPPORTED_MEDIA_TYPE | 请求 Content-Type is not supported. |
| 429 | QUOTA_EXCEEDED / API_KEY_LIMIT_REACHED / RATE_LIMIT_EXCEEDED / CONCURRENCY_LIMIT_EXCEEDED / SYSTEM_BUSY | The workspace allowance, active-key limit, or processing capacity has been reached. Honor Retry-After when present. |
| 502/503 | BILLING_UNAVAILABLE / PROVIDER_UNAVAILABLE / PROVIDER_TIMEOUT | A downstream billing or scholarly provider is unavailable. Retry with backoff. |
| 500 | DATABASE_ERROR / INTERNAL_ERROR | An unexpected server error. Include traceId when contacting support. |