/

Configure Job (API)

Configure and estimate a job of the workflow using the API.


Configure JSON Parameters

A job is a unique instance of a pre-configured workflow that delivers the outputs defined by the JSON parameters shown in the job configuration window.

Create a job parameters file (job_params.json) with the JSON parameters from the job configuration window. An example is shown in the snippet below. For more information: JSON Parameters.

Loading...

Define a variable for the jobs of your workflow. The workflow ID was defined in the article Create a Workflow (API).

URL_JOB="https://api.up42.com/projects/$PROJ/workflows/$NEW_WORKFLOW/jobs"

Estimate Job

Before running the job, you can view the job estimation, which includes the total processing time and price. Create a job estimation file (job_estimation.json) containing the tasks and inputs. An example is shown in the snippet below.

Loading...
Hint

The tasks parameter contains information about each block included in the workflow: block ID, block version, block name and parent block (if applicable). For more information: Add Blocks to a Workflow (API).

Hint

The inputs parameter contains information about the job parameters (see request body above). For more information: Configure Job.

Estimate the credit costs of your job:

curl -s POST -H "Authorization: Bearer $PTOKEN" \
-H "Content-Type: application/json" "https://api.up42.com/projects/$PROJ/estimate/job" \
-d @job_estimation.json | jq '.'

Next Steps

To proceed, please go to Run Job (API).