> ## Documentation Index
> Fetch the complete documentation index at: https://docs.archetypeai.app/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Start with /introduction/getting-started. Use the Direct Query API (POST /query) with the Newton Fusion model (text, image, and video reasoning) or the Newton Omega encoder (time-series embeddings). ATAI_API_ENDPOINT must include the version path: /v0.5 for most APIs, /v0.6 for the Fine-Tuning Service. Pages whose descriptions are marked (Archived) document the legacy Lens runtime — do not use them for new projects.

# Get Job

> Retrieve details of a specific job by ID

<Callout icon="clock" color="#3064E3" iconType="solid">
  Requires [version 1.1.0](/release-notes/1.1.x#v1-1-0) or later of the Archetype platform.
</Callout>

## Overview

This endpoint returns the full details of a specific job, including its current status, parameters, and timestamps.

## Request

<ParamField path="id" type="string" required>
  The unique job identifier
</ParamField>

## Response

<ResponseField name="id" type="string">
  Unique job identifier
</ResponseField>

<ResponseField name="org_id" type="string">
  Organization identifier
</ResponseField>

<ResponseField name="name" type="string">
  Job name
</ResponseField>

<ResponseField name="pipeline_type" type="string">
  Pipeline type (`batch` or `training`)
</ResponseField>

<ResponseField name="pipeline_key" type="string">
  Pipeline key
</ResponseField>

<ResponseField name="pipeline_version" type="string">
  Pipeline version used
</ResponseField>

<ResponseField name="status" type="string">
  Current job status: `PENDING`, `ADMITTED`, `RUNNING`, `PAUSED`, `COMPLETED`, `INTERRUPTED`, `FAILED`, `PREEMPTED`, or `CANCELLED`
</ResponseField>

<ResponseField name="outcome" type="string">
  If and only if the job's `status` is `COMPLETED`, this property's value indicates *how* the
  job completed. It is set once upon completion and is never set for a job which is not
  completed; for incomplete jobs, this value is always omitted. <Badge color="blue">[v1.1.5+](/release-notes/1.1.x#v1-1-5)</Badge>

  For completed jobs, the following values are possible:

  | Value     | Description                                                                                                                                        |
  | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `SUCCESS` | None of the job's inputs failed.                                                                                                                   |
  | `PARTIAL` | At least one of the job's inputs failed, but the job still produced at least one artifact (either a `job_outputs` entry or a `checkpoints` entry). |
  | `FAILED`  | At least one input failed, and the job produced no artifacts at all (no outputs and no checkpoints).                                               |
</ResponseField>

<ResponseField name="parameters" type="object">
  Job parameters
</ResponseField>

<ResponseField name="retry_count" type="integer">
  Number of times the job has been retried
</ResponseField>

<ResponseField name="preemption_count" type="integer">
  Number of times the job has been preempted
</ResponseField>

<ResponseField name="queue_position" type="integer">
  Current position in queue (null if not queued)
</ResponseField>

<ResponseField name="queue_depth" type="integer">
  Total queue depth (null if not queued)
</ResponseField>

<ResponseField name="input_progress" type="object">
  Per-status counts of tracked (non-`reference`) inputs, with integer fields shown in the table below. Populated on read paths so list views can render progress
  badges without N+1 fetches; `null` on write-path responses (create, retry, cancel).

  | Property          | Description                                                                                                                                                                                                                                                                                                                                                       |
  | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `completed`       | The number of inputs that have reached the `COMPLETED` state.                                                                                                                                                                                                                                                                                                     |
  | `failed`          | The number of inputs that have reached the `FAILED` state.                                                                                                                                                                                                                                                                                                        |
  | `pending`         | The number of inputs in the `PENDING` state.                                                                                                                                                                                                                                                                                                                      |
  | `processed_bytes` | The number of bytes that have been processed so far. This is the sum of `input_bytes` for all inputs being processed plus the sum of the file sizes completed so far plus the sum of the file sizes for failed inputs. This property is only present when `total_bytes` is known and every processing input is reporting `input_bytes`. Otherwise this is absent. |
  | `processing`      | The number of inputs currently being processed.                                                                                                                                                                                                                                                                                                                   |
  | `total_bytes`     | The total file size across all tracked inputs. Present only when every tracked input has a known size; otherwise, this is absent.                                                                                                                                                                                                                                 |
</ResponseField>

<ResponseField name="created_at" type="string">
  Creation timestamp
</ResponseField>

<ResponseField name="updated_at" type="string">
  Last update timestamp
</ResponseField>

<ResponseField name="started_at" type="string">
  Start timestamp (null if not yet started)
</ResponseField>

<ResponseField name="completed_at" type="string">
  Completion timestamp (null if not completed)
</ResponseField>

<ResponseField name="failed_at" type="string">
  Failure timestamp (null if not failed)
</ResponseField>

<ResponseField name="cancelled_at" type="string">
  Cancellation timestamp (null if not cancelled)
</ResponseField>

<ResponseField name="error" type="object">
  Error details (null if no error)
</ResponseField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl https://api.u1.archetypeai.app/v0.5/batch/jobs/job_2abc3def4ghi5jkl6mno7pqr \
    -H "Authorization: Bearer $ATAI_API_KEY"
  ```

  ```python Python theme={"system"}
  import requests
  import os

  api_key = os.environ.get("ATAI_API_KEY")
  job_id = "job_2abc3def4ghi5jkl6mno7pqr"

  response = requests.get(
      f"https://api.u1.archetypeai.app/v0.5/batch/jobs/{job_id}",
      headers={"Authorization": f"Bearer {api_key}"}
  )

  job = response.json()
  print(f"Job: {job['name']} — Status: {job['status']}")
  ```

  ```javascript JavaScript theme={"system"}
  const jobId = 'job_2abc3def4ghi5jkl6mno7pqr';

  const response = await fetch(`https://api.u1.archetypeai.app/v0.5/batch/jobs/${jobId}`, {
    headers: {
      'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
    }
  });

  const job = await response.json();
  console.log(`Job: ${job.name} — Status: ${job.status}`);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={"system"}
  {
    "id": "job_2abc3def4ghi5jkl6mno7pqr",
    "org_id": "org_1abc2def3ghi4jkl",
    "name": "tep-classification",
    "pipeline_type": "batch",
    "pipeline_key": "machine-state-classification",
    "pipeline_version": "1.1.1",
    "status": "COMPLETED",
    "outcome" "SUCCESS",
    "parameters": {
      "worker": {
        "parallelism": 1,
        "config": {
          "model_type": "omega_1_4_base",
          "batch_size": 32,
          "reader_config": {
            "data_columns": ["xmeas_1", "xmeas_2", "xmv_11"],
            "timestamp_column": "timestamp",
            "window_size": 64,
            "step_size": 1
          },
          "classifier_config": {
            "n_neighbors": 5,
            "metric": "euclidean",
            "weights": "uniform",
            "normalize_embeddings": false
          }
        }
      }
    },
    "retry_count": 0,
    "preemption_count": 0,
    "queue_position": null,
    "queue_depth": null,
    "input_progress": {
      "pending": 0,
      "processing": 0,
      "completed": 1,
      "failed": 0,
      "processed_bytes": 511733,
      "total_bytes": 105332974
    },
    "created_at": "2026-04-14T10:00:00Z",
    "updated_at": "2026-04-14T10:15:00Z",
    "started_at": "2026-04-14T10:02:00Z",
    "completed_at": "2026-04-14T10:15:00Z",
    "failed_at": null,
    "cancelled_at": null,
    "error": null
  }
  ```

  ```json 404 - Not Found theme={"system"}
  {
    "code": "NOT_FOUND",
    "message": "Job not found",
    "error_uid": "err_abc123"
  }
  ```

  ```json 401 - Unauthorized theme={"system"}
  {
    "detail": "Invalid access with key: api_key_not_found"
  }
  ```
</ResponseExample>
