← Back to Docs
Recipe

Key quote extractor from a document

Extract the most impactful, quotable sentences from any document using Meridian's semantic chunking and salience scoring.

Overview

This recipe walks through feeding a document into Meridian, splitting it into semantic chunks, scoring each sentence for quotability, and returning a ranked list of key quotes suitable for summaries, social posts, or presentations.

Prerequisites

  • Meridian API key with inference scope
  • Document uploaded to a Meridian workspace
  • Node.js 18+ or Python 3.10+ runtime

Steps

  1. Ingest documentPOST /v1/documents with the file or URL. Meridian chunks and indexes automatically.
  2. Run quote extractionPOST /v1/extract/quotes with document_id and optional max_quotes parameter.
  3. Filter resultsEach quote returns a salience score (0-1). Filter by threshold to keep only high-impact excerpts.
  4. ExportQuotes include source page and paragraph offsets for attribution.

Sample response

{
  "quotes": [
    {
      "text": "The only limit to our realization...",
      "score": 0.94,
      "page": 3,
      "paragraph": 2
    }
  ]
}