Skip to main content
POST
Create Job
Requires version 1.1.0 or later of the Archetype platform.

Overview

This endpoint creates a new job with the specified pipeline configuration and optional input files. The job is placed into the queue and will be processed when resources are available. Inputs are organized by port name. The available ports depend on the pipeline — call Get Pipeline Schema first if you don’t know them. The two batch pipelines deployed on the platform today are:
  • machine-state-classification — time-series sensor classification via an Omega encoder + KNN. Input ports: worker.inference (CSV files to classify), worker.n_shots (labeled CSV example files with metadata.class). Output port: worker.results.
  • activity-detection — Newton C language model over a JSONL prompt file. Input port: worker.data (one JSONL file, each line an InferenceRecord). Output port: worker.result.

Request

string
required
A human-readable name for the job
string
required
The type of pipeline to run. One of: batch, training
string
required
The key identifying the pipeline to use from the registry (e.g. machine-state-classification, activity-detection)
string
Specific pipeline version to use. If omitted, the latest published version is used.
object
Input files organized by port name. Each key is a port name (see the pipeline schema) and the value is an array of input file objects:
  • file_id (string, required) — The file ID returned from the Files API
  • metadata (object) — Optional per-input metadata. For n-shot ports this carries the class label ({"class": "..."}).
object
Pipeline parameters organized by component name (e.g. worker). Each value is an object with:
  • parallelism (integer) — Number of parallel workers for this component
  • config (object) — Free-form configuration passed to the container. The accepted shape is defined by the pipeline’s user_config_schema — fetch it via Get Pipeline Schema.

Response

string
Unique job identifier (TypeID, job_ prefix)
string
Organization identifier
string
Job name
string
Pipeline type (batch or training)
string
Pipeline key
string
Pipeline version used
string
Initial job status (typically PENDING)
null
Omitted for any job whose status is not COMPLETED. v1.1.5+
object
Resolved job parameters (user-supplied values merged onto the pipeline’s default_config)
integer
Number of times the job has been retried (always 0 on create)
integer
Number of times the job has been preempted (always 0 on create)
integer
Position in the queue at admission time. Omitted from the response when not queued (e.g. terminal-state jobs).
integer
Total queue depth at admission time. Omitted from the response when not queued.
object
Per-status counts of tracked inputs (pending, processing, completed, failed). Omitted from this response — populated only on read paths like GET /batch/jobs and GET /batch/jobs/{id}.
string
Creation timestamp in RFC 3339 format
string
Last update timestamp
string
Start timestamp, or null if not yet started
string
Completion timestamp, or null
string
Failure timestamp, or null
string
Cancellation timestamp, or null
object
Error details, or null

Examples

The two batch pipelines deployed on the platform take very different request bodies. Switch tabs to compare.
Classify time-series sensor data using n-shot example files. Inputs split across two ports — worker.inference for the CSVs to classify and worker.n_shots for the labeled example files (class declared via metadata.class).
Response — 201 Created
See the newton-machine-state-batch skill for model selection (omega_1_4_base vs the legacy 1.3 variants), window_size / step_size guidance at high sample rates, and the within-distribution vs cross-condition accuracy pitfall.

Error responses

400 - Invalid Request
401 - Unauthorized