Library

Import uploaded PDFs

Changed on

Imports uploaded PDFs into your library. Elicit parses each file, extracts its metadata, attaches the full text, and checks for duplicates.

  1. Stage each file with POST /api/v2/files and PUT the bytes to upload_url.
  2. Send the file_ids here. The response is 202 and an import with every file pending. collectionId adds each imported paper to a collection, duplicates included.
  3. Poll links.self until status is completed.

Each file ends as created (sourceId), duplicate (duplicateOf), or failed (error). A file id can be imported once. Files must be PDFs. A byte-identical copy of a PDF in your library is always a duplicate. Do not submit overlapping import requests with the same file ids; once claimed, a file cannot be used by another import or session.

Example

curl -X POST https://elicit.com/api/v2/library/imports \
  -H "Authorization: Bearer elk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"fileIds":["5515a6d4-1b17-4f0d-8484-ccc783b912bc"],"collectionId":"b458052a-84e2-4e47-b5c4-00e11390a265"}'
post/library/imports

Request

  • Base URL
    https://elicit.com/api/v2
  • URL
    https://elicit.com/api/v2/library/imports
  • Auth
    HTTP bearer

Request body

fileIdsstring[] required

Ids of staged files whose bytes have been uploaded. PDFs only; each file imports once.

collectionIdstring uuid

A collection you own or can edit to add the imported sources to, duplicates included.

onDuplicate'skip' | 'create'

skip (default): a PDF matching an already-saved source is reported as its duplicate and not saved. create: saves it as a new source anyway.

Response

Import accepted; every file is pending. Poll links.self.

idstring uuid required
status'processing' | 'completed' required
createdAtstring required
completedAtstring nullable required

Changes

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status