Skip to main content
Browse the docs

The reference desk

API Documentation

A small REST API: create a job, upload your PDF, poll until it's done, download the upgrade. Everything else is sugar on top.

Authentication

Every request carries a bearer API key. Create one in the dashboard or via POST /v1/api-keys. Keys are shown once and stored only as salted hashes.

Authorization: Bearer slp_live_xxxxxxxxxxxxxxxx

Base URL https://searchlayerpdf.com

Quickstart

  1. Create a job — you get back an upload_url.
  2. PUT your PDF to that presigned URL.
  3. Poll GET /v1/jobs/:id until status is done.
  4. Fetch the result — a signed download_url for the upgraded PDF.
# 1 · create the job
curl -X POST https://searchlayerpdf.com/v1/jobs \
  -H "Authorization: Bearer $SLP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"quality":"economy","privacy":"private","preserveMeta":false}'
# quality: economy | quality  ·  privacy: open | private  ·  preserveMeta: false regenerates metadata, true keeps the source PDF's
# → { "job_id": "job_…", "upload_url": "https://…", "quality": "economy", "privacy": "private" }

# 2 · upload your PDF to the presigned URL
curl -X PUT "$UPLOAD_URL" --data-binary @scan.pdf -H "Content-Type: application/pdf"

# 3 · poll until done
curl https://searchlayerpdf.com/v1/jobs/$JOB_ID -H "Authorization: Bearer $SLP_API_KEY"
# → { "status": "done", "pages_processed": 12, "cost_cents": 24, … }

# 4 · download the upgraded PDF
curl https://searchlayerpdf.com/v1/jobs/$JOB_ID/result -H "Authorization: Bearer $SLP_API_KEY"
# → { "download_url": "https://…" }

Every job takes three optional dials: quality (economy/quality — the processing tier), privacy (open/private — which providers may see it), and preserveMeta. quality and privacy fall back to your account or per-key defaults; any request can override any of them.

Pass an optional context string with anything you already know about the document (provenance, the linking page's title/text, a short description, expected language or author). SLP weaves it into both metadata extraction and OCR synthesis to sharpen accuracy — useful for proper nouns, archaic spelling, and language detection. It's recorded in the receipt for provenance, not written as output metadata.

preserveMeta controls the metadata (title, author, description, language) written to the output PDF/A /Info + Markdown frontmatter. false (default) regenerates clean metadata from the document's content and overwrites whatever the source PDF's embedded /Info held (often authoring-tool junk like Title: report.doc). true keeps the PDF's embedded /Info and only fills what's missing. Note SLP only sees the PDF's own embedded metadata — to fill gaps without overwriting titles/authors you curate elsewhere, use false and do that non-clobbering merge on your side.

Prefer a library? The SDK wraps all four steps in one client.process() call.

Endpoints

MethodPathDescription
POST/v1/jobsCreate a job; returns a presigned upload URL.
GET/v1/jobs/:idJob status, tier, pages processed, cost.
GET/v1/jobs/:id/resultDownload URL for the upgraded PDF.
GET/v1/jobs/:id/diagnosticsPer-page Retrievability Scores + routing.
DELETE/v1/jobs/:idDelete a job and its documents.
POST/v1/api-keysCreate a scoped API key.
GET/v1/api-keysList your API keys.

Full machine-readable OpenAPI 3.1 spec: searchlayerpdf.com/openapi.json. Import it into Postman/Insomnia, or run it through openapi-generator / Swagger Codegen to auto-generate a typed client — no need to write the connector yourself.

Libraries & tools

You don't have to build an API connector by hand. Use one of our libraries below — or generate your own client in any language from the OpenAPI 3.1 spec.