Documentation /docs/core-endpoints

Core Endpoints

Docspeed’s public customer contract is intentionally compact:

  • POST /api/v1/upload
  • POST /api/v1/parse
  • POST /v1/layout
  • POST /v1/ocr
  • POST /v1/classify
  • POST /v1/split
  • POST /v1/tables
  • POST /v1/equations
  • POST /v1/charts
  • POST /v1/schema/auto
  • POST /v1/extract
  • POST /api/v1/ask
  • POST /v1/agents/tools
  • POST /v1/agents
  • GET /v1/jobs/{job_id}
  • GET /v1/jobs/{job_id}/result

cURL

curl -sS -X POST "https://api.docspeed.ai/api/v1/parse" \
  -H "Authorization: Bearer ${DOCSPEED_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {"file_id": "file_123"},
    "execution_mode": "sync",
    "profile": "grounded",
    "grounding": "regions"
  }'

Python

import requests

response = requests.post(
    "https://api.docspeed.ai/api/v1/parse",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "input": {"file_id": "file_123"},
        "execution_mode": "sync",
        "profile": "grounded",
        "grounding": "regions",
    },
    timeout=300,
)
print(response.json())

TypeScript

const response = await fetch("https://api.docspeed.ai/api/v1/parse", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    input: { file_id: "file_123" },
    execution_mode: "sync",
    profile: "grounded",
    grounding: "regions",
  }),
});

console.log(await response.json());

Example parse response fragment

{
  "doc_id": "doc_123",
  "version": "0.1.0",
  "markdown": "# Invoice\n\nTotal Due: 1240.00",
  "pages": [
    {
      "page_index": 0,
      "width": 1200,
      "height": 1600,
      "image_ref": "/api/v1/files/file_123/pages/0/image"
    }
  ],
  "regions": [
    {
      "region_id": "p1_total",
      "page_index": 0,
      "label": "key_value_lines",
      "display_label": "1. TEXT BLOCK",
      "shape": {"type": "bbox", "x": 80, "y": 320, "w": 420, "h": 80}
    }
  ],
  "chunks": [
    {
      "chunk_id": "p1_total",
      "type": "text",
      "label": "key_value_lines",
      "display_label": "1. TEXT BLOCK",
      "markdown": "Total Due: 1240.00",
      "page_index": 0,
      "region_ids": ["p1_total"],
      "bbox": [80, 320, 500, 400]
    }
  ],
  "metadata": {"doc_class": "invoice", "page_count": 1}
}

Use the generated API Reference for request schemas, response schemas, and per-endpoint behavior.