Skip to content

docspeed-ai/docspeed-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docspeed Python SDK

Thin Python SDK and CLI for the hosted Docspeed /v1/* customer API, plus shared metadata used by the hosted Docspeed remote MCP service.

Install

pip install docspeed

CLI installs also work with:

pipx install docspeed
uv tool install docspeed

Python Quickstart

from docspeed import Docspeed

with Docspeed(api_key="docspeed_sk_...") as client:
    uploaded = client.files.upload("sample.pdf")
    parsed = client.parse(
        {
            "input": {"file_id": uploaded.file_id},
            "execution_mode": "sync",
            "profile": "grounded",
            "grounding": "ocr_lines",
            "include_artifacts": True,
        }
    )
    print(parsed.markdown[:500])

CLI Quickstart

docspeed --api-key "$DOCSPEED_API_KEY" parse --file sample.pdf --execution-mode sync --profile fast

The package is intentionally thin:

  • hosted API client only
  • streaming multipart uploads for large files
  • core dependencies limited to httpx, pydantic, and typer
  • provider-native agent SDKs are not required

parse supports two hosted profiles on the same endpoint:

  • grounded is the default for richer support-aware parse output used by extraction and evidence-heavy review workflows
  • fast is the quicker hosted ingest path for agent reading, OCR lines, bounding boxes, and page refs

Remote MCP

Docspeed 0.2.x adds shared MCP-friendly tool metadata and timeout continuation helpers for the hosted remote MCP endpoint:

  • endpoint: https://mcp.docspeed.ai/mcp
  • auth: Authorization: Bearer <DOCSPEED_API_KEY>
  • tool surface: files, page images, parse/layout/OCR/classify/split, tables/equations/charts, schema-auto, extract, chat, agents, and jobs

Long-running MCP tools return structured continuation guidance when the internal wait budget expires, including job_id, next_tool, and next_arguments.

Claude Desktop / Claude Code Example

{
  "mcpServers": {
    "docspeed": {
      "type": "streamable-http",
      "url": "https://mcp.docspeed.ai/mcp",
      "headers": {
        "Authorization": "Bearer ${DOCSPEED_API_KEY}"
      }
    }
  }
}

OpenAI Agents / Responses Example

Use the hosted MCP server URL with a Docspeed API key in the MCP server configuration for your agent runtime. The Python SDK remains provider-SDK-free in the base install, and optional provider-native adapters still belong behind extras rather than core dependencies.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages