Skip to main content
Every RasterFlow workflow is a task in the Tasks API. You start a task run, poll it until it finishes, then read its output URI from results.

Run a task

Inside a Wherobots notebook or job, the Wherobots Python SDK uses your Wherobots credentials. Anywhere else, set a Wherobots API key in WHEROBOTS_API_KEY. The SDK needs Python 3.11 or later.

Run states

A run starts as PENDING, and is still in progress while its state is PENDING, SUBMITTED, RUNNING or CANCELLING. In the Python SDK, run.is_active is True for exactly those states. When a run stops, read its state:
  • SUCCEEDED: results holds the output URI.
  • Any other final state: error_message says why.
A run’s state can lag the run by up to two minutes, so poll every 30 seconds or so rather than in a tight loop. If you pass inputs that don’t match the task’s input schema, the API rejects the run with a 400 error before anything is launched or billed.

Task run results

When a run succeeds, results holds one output URI, named by the task: To download an output from outside Wherobots, see Download a task run’s results.

Areas of interest

For mosaic builds, inference recipes, and mosaic change detection, pass the area of interest in aoi. The value can be an S3 URI of a GeoParquet or GeoJSON file, or a polygon or multipolygon WKT string with longitude/latitude coordinates in EPSG:4326. You do not need to upload a file to use inline WKT. For mosaic builds with inline WKT, also supply target_crs for the output grid.

Find a task’s inputs and outputs

Each task describes itself. With the Python SDK, wb.tasks.get(...) returns its description, input_schema, output_schema and examples:
wb.tasks.list() lists every task your Organization can run. The Tasks API reference documents the endpoints these calls use, including Get a task and List tasks. It doesn’t list each task’s inputs: those come from the task itself, in the inputSchema that Get a task returns, so they always match what the task accepts.

Region

Pass region="aws-us-west-2" (or "region": "aws-us-west-2" with the REST API) on every run. Without it, the run uses your Organization’s default region.
During Public Preview, RasterFlow is available in aws-us-west-2. If you’re interested in running RasterFlow in another region, contact Wherobots.