For the complete documentation index, see llms.txt. This page is also available as Markdown.

Documents

Ingest your own PDFs so you can chat with them and extract from them.

Endpoints

MethodPathScopeCreditsDescription
POST/v1/documentsdocuments:write1 per 10 pages, min 1Create from file_id or url
GET/v1/documents/{id}documents:read0Retrieve, incl. parse status
GET/v1/documentsdocuments:read0List
DELETE/v1/documents/{id}documents:write0Delete document and derived data
GET/v1/documents/{id}/contentdocuments:read0Sectioned text, tables, figures

This endpoint is asynchronous

Parsing is a job. A document is not queryable until status: succeeded.

Upload flow

Ingest is two calls: upload the bytes, then create the document from the resulting file.

Step 1 — upload the file. multipart/form-data, 100 MB maximum, application/pdf only.

cURL
curl https://api.scispace.com/v1/files \ -H "Authorization: Bearer $SCISPACE_API_KEY" \ -H "SciSpace-Version: 2026-08-01" \ -F "purpose=document" \ -F "file=@Attention is all you need.pdf;type=application/pdf"
json
{ "object": "file", "id": "file_qwqxq7ix10", "byte_size": 2214883, "created_at": "2026-08-11T09:19:58Z" }

Step 2 — create the document.

curl https://api.scispace.com/v1/documents \ -H "Authorization: Bearer $SCISPACE_API_KEY" \ -H "SciSpace-Version: 2026-08-01" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{"file_id":"file_qwqxq7ix10","library_id":"lib_5t7ye1kq0p"}'

Or skip step 1 by passing a URL we can fetch. The URL must be publicly reachable and serve application/pdf; it is fetched once, at create time.

cURL
curl https://api.scispace.com/v1/documents \ -H "Authorization: Bearer $SCISPACE_API_KEY" \ -H "SciSpace-Version: 2026-08-01" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{"url":"https://arxiv.org/pdf/1706.03762","library_id":"lib_5t7ye1kq0p"}'

Ingest consumes credits

1 credit per 10 pages, minimum 1. A 15-page paper costs 2. See pricing-and-credits.

The document object

json
{ "object": "document", "id": "doc_8ba2f01c47", "status": "succeeded", "filename": "Attention is all you need.pdf", "page_count": 15, "library_id": "lib_5t7ye1kq0p", "error": null, "created_at": "2026-08-11T09:20:04Z" }
FieldTypeDescription
idstringdoc_-prefixed identifier
statusenumqueued, running, succeeded, failed. Only succeeded is queryable
filenamestringAs uploaded; not unique and not an identifier
page_countintegerParsed pages. null until succeeded; the basis for citation page values
library_idstringOwning Library. null if unfiled
errorobjecttype, code, message. Populated only when status is failed
created_atstringRFC 3339

Failures are terminal — re-upload rather than retry. The common causes:

error.codeCauseFix
file_encryptedpassword-protected PDFremove protection and re-upload
file_not_parseablescanned images, no text layerOCR it first
file_unsupported_typenot application/pdfconvert to PDF
file_too_largeover 100 MBsplit the document

Errors

StatuscodeWhen
400unsupported_file_typenot a PDF
400file_too_largeover 100 MB
422document_unparseableencrypted, scanned without OCR, or corrupt

Deletion and retention

  • Documents are retained until you delete them. There is no automatic expiry.

  • DELETE is effective within 24 hours and cascades to parsed text, embeddings, and extraction rows derived from that document.

  • Backups are purged within 30 days.

  • The source File is deleted automatically 24 hours after successful document creation.

  • Test-key documents are removed after 7 days.

Full policy, including Enterprise zero-data-retention: data-privacy.

document · files · chats · extractions · data-privacy

Last updated