Skip to main content
POST
/
extract
/
presentation
Extract presentations
curl --request POST \
  --url https://api.horizon.new/v1/extract/presentation \
  --header 'Content-Type: application/json' \
  --data '{
  "sourceUrl": "<string>",
  "sourceName": "<string>",
  "options": {},
  "webhookUrl": "<string>"
}'
{
  "jobId": "job_01hx9q9",
  "status": "queued",
  "statusUrl": "<string>",
  "result": {},
  "etaSeconds": 123,
  "jobType": "extract/pdf"
}
Ingest slide decks from PowerPoint, Keynote (export), or Google Slides (export) and convert them into structured text with slide-level details, speaker notes, and image captions when available.

Request body

  • sourceUrl — HTTPS or signed URL to the presentation file. Required if file is not provided.
  • file — Optional uploaded presentation (.pptx, .key, exported slides) via multipart/form-data.
  • sourceName — Optional label stored with the extracted slides.
  • options — Optional object. Supported keys:
    • includeSpeakerNotes — Boolean; include slide notes (default true).
    • includeImages — Boolean; capture image captions/alt text (default true).
    • segmentLength — Target characters per chunk (default 700).
    • language — ISO language hint for OCR inside images.
  • webhookUrl — Optional HTTPS URL Horizon should call when the extraction finishes.

Sample request

curl https://api.horizon.new/v1/extract/presentation \
  -H "Content-Type: application/json" \
  -d '{
    "sourceUrl": "https://cdn.example.com/decks/q2-business-review.pptx",
    "sourceName": "Q2 Business Review",
    "options": {
      "includeSpeakerNotes": true,
      "includeImages": false,
      "segmentLength": 650,
      "language": "en"
    }
  }'

# or upload the deck directly

curl https://api.horizon.new/v1/extract/presentation \
  -H "Content-Type: application/json" \
  -d '{
    "file": "data:application/vnd.openxmlformats-officedocument.presentationml.presentation;base64,UEsDBBQABgAIA...",
    "sourceName": "Q2 Business Review",
    "options": {
      "includeSpeakerNotes": true,
      "includeImages": false,
      "segmentLength": 650,
      "language": "en"
    }
  }'

Response

Returns 202 Accepted with jobId, status, statusUrl, and optional etaSeconds. Completed jobs emit one chunk per slide including the slide index, title, and hierarchy.

Notes

  • Export Keynote and Google Slides to .pptx before submitting.
  • OCR runs automatically on embedded text when includeImages is true.
  • Slides are chunked individually; use downstream aggregation if you need combined sections.
  • Poll GET /jobs/{jobId} (identical to statusUrl) to follow progress or pull the slide chunks later.
  • To upload the deck directly, send multipart/form-data with a file field instead of sourceUrl.

x402 flow

Presentation extraction is billed through Coinbase’s x402 protocol. When payment is needed, Horizon returns:
HTTP/1.1 402 Payment Required
Content-Type: application/json

{
  "x402Version": 1,
  "accepts": [
    {
      "scheme": "exact",
      "network": "base-sepolia",
      "maxAmountRequired": "190000",
      "resource": "POST /extract/presentation",
      "description": "Horizon presentation extraction",
      "mimeType": "application/json",
      "payTo": "0xYourReceivingWallet",
      "maxTimeoutSeconds": 300,
      "asset": "0xYourUSDCContract",
      "extra": {
        "name": "USDC",
        "version": "1"
      }
    }
  ],
  "error": null
}
Forward the accepts object to your facilitator, perform /verify and /settle, then replay the request with the Base64 payload in X-PAYMENT. Horizon resumes the job and includes X-PAYMENT-RESPONSE on success.

Body

application/json

Provide either sourceUrl or file.

sourceUrl
string<uri>
sourceName
string
options
object

Extraction hints such as language, segmentLength, transcriptionModel, or sheet preferences depending on the endpoint.

webhookUrl
string<uri>

Webhook to call when the extraction completes.

file
file

Upload the raw file instead of providing sourceUrl.

Response

Extraction job accepted

jobId
string
required
Example:

"job_01hx9q9"

status
enum<string>
required
Available options:
queued,
processing,
completed,
failed
statusUrl
string<uri>
required

Canonical link to GET /jobs/{jobId} for this job.

jobType
string
required
Example:

"extract/pdf"

result
object | null

Present when the job completes synchronously.

etaSeconds
integer | null

Estimated seconds until completion.