Skip to main content
The Strand AI REST API exposes the platform’s job infrastructure. The Python and R SDKs use the same API, which can also be called directly from other languages. The OpenAPI spec is hosted at https://app.strandai.com/api/v1/openapi.json. A Markdown variant for LLM agents is available at https://app.strandai.com/docs/api.md. The LLM index is available at https://app.strandai.com/llms.txt.

Base URL

Authentication

All endpoints require a bearer API key:
Generate keys at /settings/api-keys. Keys are org-scoped and inherit the credit balance of the org that created them. Slides must be de-identified before upload. See Security and data handling.

Lifecycle

A prediction starts with an event-driven upload, followed by pricing, submission, and result retrieval:
1

Upload the slide

POST /uploads with the slide’s filename, size, content type, and optional mpp. The response contains a resumable upload URL (signed GCS). PUT the declared slide bytes there directly. GCS automatically starts ingest preprocessing when the object finalizes; there is no client finalize request. Automated de-identification is off by default and runs during ingest only when enabled for your organization. Poll GET /uploads/{id} while status is uploading.
2

Price or submit

POST /predict with dryRun: true validates the request and returns the exact credit cost without side effects. Send the same request with dryRun: false or omit the field to reserve credits atomically and enqueue inference, returning a jobId.
3

Poll or stream the job

GET /jobs/{id} for snapshots, or GET /jobs/{id}/stream for an SSE stream. When status reaches completed, download the OME-Zarr results as OME-Zarr via GET /jobs/{id}/results/files/{path} or GET /jobs/{id}/results (signed GCS URL). Use the single format-driven POST /jobs/{id}/exports operation for native OME-Zarr, OME-Zarr ZIP, or OME-TIFF plus optional H&E and segmentation/cell artifacts; poll the same path with GET while a generated export is pending.
Call POST /jobs/{id}/cancel to cancel an in-flight job and refund its reserved credits.

Error model

Errors are returned as JSON in a consistent shape:

SDKs

The platform provides first-party SDKs for this API:

Python

pip install strand-sdk

R

install.packages("strandai", ...)