Skip to content

AGT-38: Add Async Processing API SDK/CLI - #1229

Open
Regan-Koopmans wants to merge 4 commits into
mainfrom
AGT-38/async-processing-api
Open

Regan-Koopmans wants to merge 4 commits into
mainfrom
AGT-38/async-processing-api

Conversation

@Regan-Koopmans

@Regan-Koopmans Regan-Koopmans commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Adds SDK and CLI support for the Async Processing API.

API

The API is served from services.sentinel-hub.com. The public spec has two operations:

  • POST /async/v1/process: submit a request
  • GET /async/v1/process/{id}: get status

The only status is RUNNING. Finished requests return 404, whether they succeeded or failed. The outcome lives in the delivery bucket: results, or error.json.

Changes

  • planet.AsyncProcessingClient: create_request, get_request, wait. wait polls until 404.
  • Planet().async_processing: sync wrapper.
  • planet.async_processing_request: builders for input, output, data sources, responses, and S3/GCS buckets. Validates locally.
  • planet async-processing request | create | get | wait. --deployment selects aws-eu-central-1 or aws-us-west-2. Each command's --help has an example.
  • Docs: CLI tutorial with SDK snippets, SDK reference entries, auth overview fix.

Notes

  • OAuth2 only. Planet API keys are rejected by this API. The docs and help text say so.
  • wait cannot tell a finished request from an unknown ID. Both return 404.

Open questions for the Async Processing team

  • Are there list or cancel endpoints outside the public spec?
  • Do Planet user tokens work in production? The auth docs say yes. Not verified live.
  • Is sentinel-2-l2a the preferred collection name? The public examples use S2L2A.

Testing

  • 64 new tests: unit tests for the builders, respx tests for the client (async and sync) and CLI.
  • Full suite passes (1010 tests, 97% coverage). Lint, mypy, and the docs build pass.
  • Not run against the live API.

Remaining from the ticket

  • Update the public docs.planet.com page. Snippets are in docs/cli/cli-async-processing.md.
  • Product review with the Async Processing team.

Add a client for the Async Processing API, served from
services.sentinel-hub.com. The API has two operations: submit a
request and get its status. Finished requests return 404.

- AsyncProcessingClient: create_request, get_request, wait
- AsyncProcessingAPI sync wrapper, exposed as Planet().async_processing
- async_processing_request: builders for input, output, data sources,
  responses, and S3/GCS buckets
- `planet async-processing request|create|get|wait`, with
  --deployment for the EU and US hosts
- CLI tutorial, SDK reference entries, auth overview update
- Unit tests for the builders; respx tests for client and CLI

Requires OAuth2 auth. Planet API keys are not accepted by this API.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Regan-Koopmans Regan-Koopmans self-assigned this Oct 5, 2026
Bucket access errors can surface during processing, in error.json,
after a successful submit. Say so in create_request, the create
command help and the CLI tutorial.

GCS delivery needs read and write access to the bucket.
roles/storage.objectCreator is not enough; document
roles/storage.objectAdmin in gs_bucket, the request command help and
the tutorial.
AsyncProcessingClient and AsyncProcessingAPI take a keyword-only
deployment argument, aws-eu-central-1 (default) or aws-us-west-2.
base_url stays second and overrides it, matching the other clients.
Unknown deployments raise ClientError.

Planet takes async_processing_deployment, so sync users can reach the
US deployment without touching the private session.

The CLI passes --deployment and --base-url to the client instead of
resolving the URL itself. Drop the BASE_URL constant.
RUNNING in the client and DEFAULT_CRS in the request builder were
never referenced. Found with vulture.
@Regan-Koopmans
Regan-Koopmans marked this pull request as ready for review October 5, 2026 11:30

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant