curl "https://api.u1.archetypeai.app/v0.5/batch/jobs/job_2abc3def4ghi5jkl6mno7pqr/events?level=ERROR&limit=20" \
-H "Authorization: Bearer $ATAI_API_KEY"
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()
for event in data["data"]:
print(f" [{event['level']}] {event['event_type']}: {event.get('message', '')}")
# Pass the cursor back verbatim as `after` to fetch the next page.
if data["has_more"]:
print(f"Next page cursor: {data['next_cursor']}")
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();
data.data.forEach(event => {
console.log(` [${event.level}] ${event.event_type}: ${event.message || ''}`);
});
if (data.has_more) {
console.log(`Next page cursor: ${data.next_cursor}`);
}
{
"job_id": "job_2abc3def4ghi5jkl6mno7pqr",
"data": [
{
"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"
}
],
"has_more": true,
"next_cursor": "<cursor>",
"prev_cursor": null
}
{
"code": "NOT_FOUND",
"message": "Job not found",
"error_uid": "err_abc123"
}
{
"detail": "Invalid access with key: api_key_not_found"
}
Events
List Job Events
Retrieve a cursor-paginated list of events for a specific job
GET
/
batch
/
jobs
/
{id}
/
events
curl "https://api.u1.archetypeai.app/v0.5/batch/jobs/job_2abc3def4ghi5jkl6mno7pqr/events?level=ERROR&limit=20" \
-H "Authorization: Bearer $ATAI_API_KEY"
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()
for event in data["data"]:
print(f" [{event['level']}] {event['event_type']}: {event.get('message', '')}")
# Pass the cursor back verbatim as `after` to fetch the next page.
if data["has_more"]:
print(f"Next page cursor: {data['next_cursor']}")
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();
data.data.forEach(event => {
console.log(` [${event.level}] ${event.event_type}: ${event.message || ''}`);
});
if (data.has_more) {
console.log(`Next page cursor: ${data.next_cursor}`);
}
{
"job_id": "job_2abc3def4ghi5jkl6mno7pqr",
"data": [
{
"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"
}
],
"has_more": true,
"next_cursor": "<cursor>",
"prev_cursor": null
}
{
"code": "NOT_FOUND",
"message": "Job not found",
"error_uid": "err_abc123"
}
{
"detail": "Invalid access with key: api_key_not_found"
}
Requires version 1.1.0 or later of the Archetype platform.
Overview
This endpoint returns a cursor-paginated list of events emitted during job execution, newest first. Events provide observability into what happened during processing, including informational messages, warnings, errors, and terminal outcomes.Request
string
required
The unique job identifier
string
Filter events by level:
INFO, WARN, ERROR, SUCCESS, or FAILEDstring
Filter events by type (e.g.,
inference.success, inference.failed)string
Filter events associated with a specific input
integer
default:"100"
Page size, between
1 and 1000. Clamped server-side.string
Forward cursor: return events recorded before the event with this ID. Pass the previous page’s
next_cursor. Mutually exclusive with before — sending both returns 400. v1.1.11+string
Backward cursor: return events recorded after the event with this ID. Pass the current page’s
prev_cursor. Mutually exclusive with after. v1.1.11+Response
string
The job identifier
array
Array of event objects, newest first in both cursor directions, each containing:
id— Unique event identifierevent_type— Type of event (e.g.,inference.success)level— Event level:INFO,WARN,ERROR,SUCCESS, orFAILEDmessage— Optional human-readable messagepayload— Event-specific datainput_id— Associated input ID (if applicable)index— Event index within the input (if applicable)created_at— Event timestamp
string
Cursor for the next page in the same direction — pass it as
after when paging forward, or as
before when the request used before. null when has_more is false. v1.1.11+string
Cursor to step back the way this page was reached — pass it as
before after a forward page, or
as after after a backward one. null when the request carried no cursor. v1.1.11+curl "https://api.u1.archetypeai.app/v0.5/batch/jobs/job_2abc3def4ghi5jkl6mno7pqr/events?level=ERROR&limit=20" \
-H "Authorization: Bearer $ATAI_API_KEY"
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()
for event in data["data"]:
print(f" [{event['level']}] {event['event_type']}: {event.get('message', '')}")
# Pass the cursor back verbatim as `after` to fetch the next page.
if data["has_more"]:
print(f"Next page cursor: {data['next_cursor']}")
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();
data.data.forEach(event => {
console.log(` [${event.level}] ${event.event_type}: ${event.message || ''}`);
});
if (data.has_more) {
console.log(`Next page cursor: ${data.next_cursor}`);
}
{
"job_id": "job_2abc3def4ghi5jkl6mno7pqr",
"data": [
{
"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"
}
],
"has_more": true,
"next_cursor": "<cursor>",
"prev_cursor": null
}
{
"code": "NOT_FOUND",
"message": "Job not found",
"error_uid": "err_abc123"
}
{
"detail": "Invalid access with key: api_key_not_found"
}
Was this page helpful?