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. |