Run advanced processing on tasking and catalog data in your storage.
-
Select a process
Review the specifications of processes and select a process you want to run. Processes can be divided into two categories:
- Enhancement processes that preprocess imagery to improve its visual quality.
- Analytics processes that extract insights from imagery.
To get a list of all processes, call the Get processes endpoint. Select the process you want to proceed with and retrieve its name ID.
-
Accept the EULA
If you want to run the chosen process for the first time, review and accept its end-user license agreement (EULA). If a EULA is updated, you need to re-accept it before creating your next job.
Search for data in one of the following ways:
- Using a simple search, if you already know which item you want to use.
- Using a detailed search, if you want to find a compatible item.
You can only process items that come from a supported collection and that are added to storage starting in 2023.
-
Prepare your request
Call the Get a process endpoint with the process name ID as the path parameter and check the
inputsobject for required and optional input parameters.Prepare your request body by following the structure specified in the corresponding process.
For example, this is Coregistration’s schema:
JSON {"id": "coregistration-simularity","title": "Coregistration","description": "An algorithm that improves the positional accuracy of imagery against a reference.",<...>"inputs": {"title": {"title": "Title","description": "The title of the produced STAC objects.","minOccurs": 1,"maxOccurs": 1,"schema": {"type": "string","minLength": 1,"maxLength": 250}},"sourceItem": {"title": "Source STAC item","description": "A unique identifier of the source item to be coregistered.","minOccurs": 1,"maxOccurs": 1,"schema": {"type": "string","format": "uri","description": "The path to a STAC item in the '/v2/assets/stac/collections/{collection-id}/items/{item-id}' format."}},"referenceItem": {"title": "Reference STAC item","description": "A unique identifier of the reference item.","minOccurs": 1,"maxOccurs": 1,"schema": {"type": "string","format": "uri","description": "The path to a STAC item in the '/v2/assets/stac/collections/{collection-id}/items/{item-id}' format."}}<...>}}The parameters in the
inputsobject need to be specified. For thecoregistration-simularityprocess, these are the following parameters:- Title
- Source item
- Reference item
A sample request body for this process:
JSON {"inputs": {"title": "Coregistering imagery over Berlin","sourceItem": "https://api.up42.com/v2/assets/stac/collections/<...>/items/<...>","referenceItem": "https://api.up42.com/v2/assets/stac/collections/<...>/items/<...>"}} -
Validate your input
To check the validity of your input, call the Validate input for a process endpoint with the name ID of the selected process as the path parameter. For the request body, use the prepared JSON.
If a job has been validated, there will be a HTTP 200 OK response with no body.
In case of any errors in the input, the returned error message will point to what caused it:
JSON {"errors": [{"name": "MissingPanchromaticAsset","message": "The panchromatic band is missing."}]} -
Determine the cost
To check the cost of a processing job before creating it, call the Determine the cost of a process endpoint with the name ID of the selected process as the path parameter and the following parameters in the request body:
- A custom title
- The STAC item you want to apply the algorithm to
JSON {"inputs": {"title": "Pansharpened imagery over UK","item": "https://api.up42.com/v2/assets/stac/collections/21c0b14e-3434-4675-98d1-f225507ded99/items/23e4567-e89b-12d3-a456-426614174000"}}You’ll receive an overview of the overall UP42 credit amount that will be deducted from your credit balance if you decide to run the selected process:
JSON {"pricingStrategy": "area","totalCredits": 63, // The process cost, in credits"totalSize": 15.8,"unit": "SQ_KM"} -
Create a new processing job
Credits will be deducted upon successful completion of the created processing job. The transaction can’t be reversed.
To create a job, call the Run a process endpoint with the following parameters:
- The name ID of the selected process as the path parameter
- Your workspace ID as the query
workspaceIdparameter
HTTP POST /v2/processing/processes/<process-name>/execution?workspaceId=<your-workspace-id> HTTP/1.1Host: api.up42.comAuthorization: Bearer {token}Shell curl --location 'https://api.up42.com/v2/processing/processes/<process-name>/execution?workspaceId=<your-workspace-id>' \--header 'Authorization: Bearer {token}For the request body, use the prepared JSON.
-
Check job status
Get processing jobs as follows:
- Retrieve information about all jobs by calling the Get processing jobs endpoint.
- Retrieve information about a specific job by calling the Get a processing job with the job ID as the path parameter.
The most useful parameter for monitoring is job status.
Status Description createdThe job has been created, but not yet accepted. licensedThe EULA has been accepted for this process. The job will move on to the validation stage. unlicensedThe EULA hasn’t been accepted for this process. The job will fail. Accept the EULA and try again. validThe job has been validated. acceptedThe job has been validated and accepted. The credits corresponding to the price are temporarily withheld until the job is completed. invalidThe job has failed validation. Fix your input parameters and try again. rejectedThe job has been canceled due to an insufficient account balance. Top up your balance and try again. runningThe job is in progress. successfulThe job has been completed, and the results have been delivered to your storage. capturedThe job has been completed, the results have been delivered to your storage, and any withheld credits have been deducted from your account balance. releasedThe job has failed. Any withheld credits have been released. Try again, and if the issue persists, contact support. failedThe job has failed. The following job statuses mean you can download processing results from storage:
successfulcaptured
-
Retrieve assets’ links
To get all assets from a specific job, call the Get specific STAC items endpoint with the following request body, using your job ID:
JSON {"filter": {"args": [{"property": "job_id"},"68567134-27ad-7bd7-4b65-d61adb11fc78" // Replace with your job ID],"op": "="}}The response will contain your job results listed in the
features.assetsobject. Retrieve the IDs of the assets you want to access.JSON {"links": [], // Additional links"type": "FeatureCollection","features": [{"assets": {"072e661d_pan_68567134-27ad-7bd7-4b65-d61adb11fc78.tiff": {"href": "https://api.up42.com/v2/assets/ea36dee9-fed6-457e-8400-2c20ebd30f44", // The asset ID in this example is ea36dee9-fed6-457e-8400-2c20ebd30f44"title": "Pansharpened multispectral data","type": "image/tiff; application=geotiff; profile=cloud-optimized","roles": ["pansharpened", "data", "multispectral"]}},// Other parameters"type": "Feature","stac_version": "1.0.0"}]}You can generate a pre-signed URL to download an asset without authentication by calling the Create a download URL endpoint with the asset ID as the path parameter. The generated URL is valid for 5 minutes and can be shared. The URL will have the following format:
JSON {"url": "https://storage.googleapis.com/user-storage-interstellar-prod/assets/<...>"}