> ## 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 Job Events

> Retrieve a paginated list of events 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 events emitted during job execution. Events provide
observability into what happened during processing, including informational messages, warnings,
errors, and terminal outcomes.

## Request

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

<ParamField query="level" type="string">
  Filter events by level: `INFO`, `WARN`, `ERROR`, `SUCCESS`, or `FAILED`
</ParamField>

<ParamField query="event_type" type="string">
  Filter events by type (e.g., `inference.success`, `inference.failed`)
</ParamField>

<ParamField query="input_id" type="string">
  Filter events associated with a specific input
</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 events 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="events" type="array">
  Array of event objects, each containing:

  * `id` — Unique event identifier
  * `event_type` — Type of event (e.g., `inference.success`)
  * `level` — Event level: `INFO`, `WARN`, `ERROR`, `SUCCESS`, or `FAILED`
  * `message` — Optional human-readable message
  * `payload` — Event-specific data
  * `input_id` — Associated input ID (if applicable)
  * `index` — Event index within the input (if applicable)
  * `created_at` — Event timestamp
</ResponseField>

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

  data = response.json()
  print(f"Total events: {data['total']}")
  for event in data["events"]:
      print(f"  [{event['level']}] {event['event_type']}: {event.get('message', '')}")
  ```

  ```javascript JavaScript theme={"system"}
  const jobId = 'job_2abc3def4ghi5jkl6mno7pqr';
  const params = new URLSearchParams({ level: 'ERROR', limit: '20' });

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

  const data = await response.json();
  console.log(`Total events: ${data.total}`);
  data.events.forEach(event => {
    console.log(`  [${event.level}] ${event.event_type}: ${event.message || ''}`);
  });
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={"system"}
  {
    "job_id": "job_2abc3def4ghi5jkl6mno7pqr",
    "total": 5,
    "offset": 0,
    "limit": 20,
    "events": [
      {
        "id": 1001,
        "event_type": "inference.success",
        "level": "SUCCESS",
        "message": "Inference completed for input",
        "payload": {
          "duration_ms": 1250
        },
        "input_id": "inp_abc123def456",
        "index": 0,
        "created_at": "2026-04-14T10:05:00Z"
      },
      {
        "id": 1002,
        "event_type": "inference.failed",
        "level": "FAILED",
        "message": "Input file format not supported",
        "payload": {
          "error_code": "UNSUPPORTED_FORMAT"
        },
        "input_id": "inp_ghi789jkl012",
        "index": 1,
        "created_at": "2026-04-14T10:05:30Z"
      }
    ]
  }
  ```

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