Step 1. Run a process

Create a new processing job by running a selected process.


1. Select a process and prepare your request

Processes are algorithms that you can apply to STAC items in your storage.

Prepare your request body by following the structure specified in the corresponding process.


2. 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."
    }
  ]
}

  

3. 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 will 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"
}

  

4. 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 workspaceId parameter

For example:

For the request body, use the prepared JSON.