Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.strandai.com/llms.txt

Use this file to discover all available pages before exploring further.

The Strand AI REST API is a thin wrapper around the platform’s job infrastructure. It’s the same surface the Python and R SDKs use under the hood, so you can hit it directly from any language. The OpenAPI spec is hosted at https://app.strandai.com/api/v1/openapi.json. A Markdown variant for LLM agents is at https://app.strandai.com/docs/api.md.

Base URL

https://app.strandai.com/api/v1

Authentication

All endpoints require a bearer API key:
Authorization: Bearer sk-strand-XXXXXXXXXXXXXXXXXXXXXXXX
Generate keys at /settings/api-keys. Keys are org-scoped. They inherit the credit balance and concurrent-job quota of the org that created them.

Lifecycle

A prediction flows through four endpoints:
1

Initiate an upload

POST /uploads with the slide’s filename, size, and content type. Returns a resumable upload URL (signed GCS). PUT the slide bytes there directly.
2

Complete the upload

POST /uploads/{id}/complete once the bytes are uploaded. The platform reads the slide dimensions (needed for credit estimates).
3

Estimate, then submit

Optional: POST /predict/estimate to see how many credits the job will cost. POST /predict reserves credits atomically and enqueues inference, returning a jobId.
4

Poll or stream the job

GET /jobs/{id} for snapshots, or GET /jobs/{id}/stream for an SSE stream. When status reaches succeeded, download the OME-Zarr results via GET /jobs/{id}/results/files/{path} or GET /jobs/{id}/results (signed GCS URL).

Error model

Errors are returned as JSON in a consistent shape:
{
  "error": "insufficient_credits",
  "message": "Org has 120 credits; this job requires 450.",
  "required": 450
}
HTTPMeaning
400Bad request: invalid body, unknown marker, etc.
401Missing or invalid API key.
402Insufficient credits. required carries the credit cost.
404Resource not found, or scoped to a different org.
409Resource not ready (e.g. upload not finalized).
429Per-org concurrent-job cap exceeded. Retry-After header in seconds.

Rate limits

There is a per-org concurrent inference job cap (currently soft, surfaced as 429 with Retry-After). Other endpoints are not rate-limited beyond ordinary abuse protections. Get in touch if you have a high-throughput use case and we’ll raise your cap.

SDKs

The platform ships first-party SDKs that wrap this API:

Python

pip install strand-sdk

R

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