Queue documents for indexing

Scope: ingest. One document, or {"documents": [...]} with 1 to 100. Each needs id (1-512 chars), text (up to 1,000,000 chars) and timestamp (ISO 8601 with a timezone; it dates the document). metadata is optional JSON (64 KB). The same id replaces. Body at most 25 MB. A 202 means durably queued, not indexed: indexing runs in the background. Lochless workspaces: indexing costs a price per page (3,000 characters of text, rounded up, at least 1 per document), charged from the balance once when the document is ready; a failed document is free, and re-sending the same text is free. At zero balance or at the monthly spend cap the call answers 402, and documents already queued wait for a top-up. 429 queue_full when a million documents are pending.

post/ingest

Request

  • Base URL: https://api.lochless.io/api/v1
  • URL: https://api.lochless.io/api/v1/ingest
  • Auth: HTTP bearer

Request body

OR

Response

{documents: [{id, status}]}

Changes

No recorded changes to this operation across all 1 revision of this API.