> ## 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.

# List Inputs

> Retrieve a paginated list of inputs for a specific job

<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 a paginated list of input files associated with a job. You can filter by port name or processing status.

## Request

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

<ParamField query="port_name" type="string">
  Filter inputs by port name
</ParamField>

<ParamField query="status" type="string">
  Filter inputs by processing status: `pending`, `processing`, `completed`, `failed`, or `reference`. `reference` is a terminal sentinel applied to inputs attached to non-tracked ports (e.g. n-shot example files) — they're persisted for visibility but never transition through the `pending → processing → completed/failed` lifecycle.
</ParamField>

<ParamField query="offset" type="integer">
  Number of items to skip for pagination (default: 0)
</ParamField>

<ParamField query="limit" type="integer">
  Maximum number of items to return per page
</ParamField>

## Response

<ResponseField name="job_id" type="string">
  The job identifier
</ResponseField>

<ResponseField name="total" type="integer">
  Total number of inputs matching the filter criteria
</ResponseField>

<ResponseField name="offset" type="integer">
  Current pagination offset
</ResponseField>

<ResponseField name="limit" type="integer">
  Maximum number of items returned
</ResponseField>

<ResponseField name="inputs" type="array">
  Array of input objects, each containing:

  * `id` — Unique input identifier
  * `job_id` — Parent job identifier
  * `port_name` — Input port name
  * `file_id` — Original file ID
  * `data` — Resolved data reference (`DataRef`) with required `ref` (URL) and `filename`, plus optional `file_type`, `file_extension`, `num_bytes`, `metadata`, `file_tags`, `file_attributes`. When emitted in per-worker JSONL manifests, also includes the `input_id` so containers can do per-input progress tracking.
  * `status` — Processing status: `pending`, `processing`, `completed`, `failed`, or `reference` (terminal sentinel for inputs on non-tracked ports such as n-shot examples)
  * `error_message` — Error details (if failed)
  * `created_at` — Creation timestamp
  * `completed_at` — Completion timestamp (if completed)
</ResponseField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl "https://api.u1.archetypeai.app/v0.5/batch/jobs/job_2abc3def4ghi5jkl6mno7pqr/inputs?status=completed&limit=10" \
    -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}/inputs",
      headers={"Authorization": f"Bearer {api_key}"},
      params={
          "status": "completed",
          "limit": 10
      }
  )

  data = response.json()
  print(f"Total inputs: {data['total']}")
  for inp in data["inputs"]:
      print(f"  {inp['id']}: {inp['data']['filename']} — {inp['status']}")
  ```

  ```javascript JavaScript theme={"system"}
  const jobId = 'job_2abc3def4ghi5jkl6mno7pqr';
  const params = new URLSearchParams({ status: 'completed', limit: '10' });

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

  const data = await response.json();
  console.log(`Total inputs: ${data.total}`);
  data.inputs.forEach(inp => {
    console.log(`  ${inp.id}: ${inp.data.filename} — ${inp.status}`);
  });
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={"system"}
  {
    "job_id": "job_2abc3def4ghi5jkl6mno7pqr",
    "total": 2,
    "offset": 0,
    "limit": 10,
    "inputs": [
      {
        "id": "inp_abc123def456",
        "job_id": "job_2abc3def4ghi5jkl6mno7pqr",
        "port_name": "worker.inference",
        "file_id": "file_abc123",
        "data": {
          "ref": "https://storage.example.com/files/tep_inference.csv",
          "filename": "tep_inference.csv",
          "file_type": "text/csv",
          "file_extension": ".csv",
          "num_bytes": 245760,
          "metadata": {},
          "file_tags": null,
          "file_attributes": null
        },
        "status": "completed",
        "error_message": null,
        "created_at": "2026-04-14T10:00:00Z",
        "completed_at": "2026-04-14T10:05:00Z"
      }
    ]
  }
  ```

  ```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>
