Skip to main content

Python

X1-BaaS is a plain REST API, so any HTTP client works. This guide shows a minimal client wrapper built on httpx that covers authentication, error handling, and all core endpoints.

Install

Client wrapper

Filename baas.py

Usage

Scrape to Markdown

Screenshot to file

Structured extraction

Crawl a sitemap and poll until done

Error handling

Wrap calls in try/except BaasError. Inspect exc.status_code and exc.body["detail"]["error"] for a machine-readable code.