curl "https://api.u1.archetypeai.app/v0.5/batch/jobs?sort=status&order=asc" \
-H "Authorization: Bearer $ATAI_API_KEY"
import requests
import os
api_key = os.environ.get("ATAI_API_KEY")
response = requests.get(
"https://api.u1.archetypeai.app/v0.5/batch/jobs",
headers={"Authorization": f"Bearer {api_key}"},
params={
"pipeline_type": "batch",
"status": "RUNNING",
"limit": 10
}
)
data = response.json()
for job in data["data"]:
print(f" {job['id']}: {job['name']} — {job['status']}")
# 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 params = new URLSearchParams({
pipeline_type: 'batch',
status: 'RUNNING',
limit: '10'
});
const response = await fetch(`https://api.u1.archetypeai.app/v0.5/batch/jobs?${params}`, {
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
});
const data = await response.json();
data.data.forEach(job => {
console.log(` ${job.id}: ${job.name} — ${job.status}`);
});
if (data.has_more) {
console.log(`Next page cursor: ${data.next_cursor}`);
}
{
"data": [
{
"id": "job_2abc3def4ghi5jkl6mno7pqr",
"org_id": "org_1abc2def3ghi4jkl",
"name": "tep-classification",
"pipeline_type": "batch",
"pipeline_key": "machine-state-classification",
"pipeline_version": "1.1.1",
"status": "RUNNING",
"parameters": {},
"retry_count": 0,
"preemption_count": 0,
"queue_position": null,
"queue_depth": null,
"input_progress": {
"pending": 0,
"processing": 1,
"completed": 2,
"failed": 0,
"processed_bytes": 40551733,
"total_bytes": 105332974
},
"created_at": "2026-04-14T10:00:00Z",
"updated_at": "2026-04-14T10:05:00Z",
"started_at": "2026-04-14T10:02:00Z",
"completed_at": null,
"failed_at": null,
"cancelled_at": null,
"error": null
}
],
"has_more": true,
"next_cursor": "<cursor>",
"prev_cursor": null
}
{
"code": "...",
"message": "...",
"error_uid": "err_abc123"
}
{
"detail": "Invalid access with key: api_key_not_found"
}
Jobs
List Jobs
Retrieve a cursor-paginated list of jobs with optional filters
GET
/
batch
/
jobs
curl "https://api.u1.archetypeai.app/v0.5/batch/jobs?sort=status&order=asc" \
-H "Authorization: Bearer $ATAI_API_KEY"
import requests
import os
api_key = os.environ.get("ATAI_API_KEY")
response = requests.get(
"https://api.u1.archetypeai.app/v0.5/batch/jobs",
headers={"Authorization": f"Bearer {api_key}"},
params={
"pipeline_type": "batch",
"status": "RUNNING",
"limit": 10
}
)
data = response.json()
for job in data["data"]:
print(f" {job['id']}: {job['name']} — {job['status']}")
# 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 params = new URLSearchParams({
pipeline_type: 'batch',
status: 'RUNNING',
limit: '10'
});
const response = await fetch(`https://api.u1.archetypeai.app/v0.5/batch/jobs?${params}`, {
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
});
const data = await response.json();
data.data.forEach(job => {
console.log(` ${job.id}: ${job.name} — ${job.status}`);
});
if (data.has_more) {
console.log(`Next page cursor: ${data.next_cursor}`);
}
{
"data": [
{
"id": "job_2abc3def4ghi5jkl6mno7pqr",
"org_id": "org_1abc2def3ghi4jkl",
"name": "tep-classification",
"pipeline_type": "batch",
"pipeline_key": "machine-state-classification",
"pipeline_version": "1.1.1",
"status": "RUNNING",
"parameters": {},
"retry_count": 0,
"preemption_count": 0,
"queue_position": null,
"queue_depth": null,
"input_progress": {
"pending": 0,
"processing": 1,
"completed": 2,
"failed": 0,
"processed_bytes": 40551733,
"total_bytes": 105332974
},
"created_at": "2026-04-14T10:00:00Z",
"updated_at": "2026-04-14T10:05:00Z",
"started_at": "2026-04-14T10:02:00Z",
"completed_at": null,
"failed_at": null,
"cancelled_at": null,
"error": null
}
],
"has_more": true,
"next_cursor": "<cursor>",
"prev_cursor": null
}
{
"code": "...",
"message": "...",
"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 jobs. You can filter by pipeline type, status, or a free-text search query. The list is ordered on the field identified bysort (created_at by default), in the
direction specified by order. Ties are broken on created_at, then id. The page is in sort
order whether it was reached with after or before. Cursors are opaque and bound to the
sort they were issued under; a cursor from another sort returns an HTTP 400 error.
Request
string
Filter jobs by pipeline type (e.g.,
batch, training)string
Filter jobs by status (e.g.,
PENDING, RUNNING, PAUSED, COMPLETED, FAILED,
INTERRUPTED, CANCELLED). Unknown values return an HTTP 400 error.string
Optional filter on the job outcome:
SUCCESS, PARTIAL, or FAILED. These are AND-combined
with the other filters. Only COMPLETED jobs have an outcome, so a non-empty value for this
parameter implicitly limits results to completed jobs. v1.1.5+string
Free-text search query to filter jobs.
string
default:"created_at"
Specifies the field on which the returned list is ordered. Ties are broken on
created_at,
then id, so pages are stable. v1.1.12+Must be one of the following:| Value | Description |
|---|---|
created_at | Sort by the job’s creation timestamp. Default value. |
completed_at | Sort by the job’s completion timestamp. Unfinished jobs sort as the earliest completed_at (last under desc). |
status | Sort by lifecycle position, not by the raw status value, in this order: PENDING, ADMITTED, RUNNING, PAUSED, INTERRUPTED, PREEMPTED, COMPLETED, FAILED, CANCELLED |
string
Specifies whether sorting is performed in ascending order (
asc) or descending order
(desc). When sorting by created_at or completed_at, this defaults to desc. When sorting
by status, this defaults to asc. A cursor marks a position in the list and stays valid
under either direction. v1.1.12+string
default:"created_at"
Sort field:
created_at (the default), completed_at, or status. status orders by
lifecycle position — PENDING, ADMITTED, RUNNING, PAUSED, INTERRUPTED, PREEMPTED,
COMPLETED, FAILED, CANCELLED — not by the raw status value. Jobs that haven’t finished
sort as the earliest completed_at, which places them last under desc. Ties are broken on
created_at then id, so pages are stable. v1.1.12+string
Sort direction:
asc or desc. When omitted, each sort field applies its own default: desc
for created_at and completed_at, asc for status. A cursor marks a position in the list
and stays valid under either direction. v1.1.12+integer
default:"10"
Page size, between
1 and 1000. Clamped server-side.string
Forward cursor: return the jobs that follow this page’s last job in the sort order. This value
is opaque and doesn’t correspond to any identifier you can rely upon. Instead, pass the previous
page’s
next_cursor back verbatim. A cursor is bound to the sort it was issued under; sending
it with a different sort returns an HTTP 400 error. This parameter is mutually exclusive
with before; sending both returns an HTTP 400 error.
v1.1.11+string
Backward cursor: return the jobs that precede this page’s first job in the sort order. Just
like
after, this parameter’s value is opaque; pass the current page’s prev_cursor back
verbatim. This parameter is mutually exclusive with after; specifying both returns an HTTP
400 error.
v1.1.11+Response
array
Array of job objects, in the requested
sort and order (newest first by default) in both
cursor directions, each containing:id— Unique job identifierorg_id— Organization identifiername— Job namepipeline_type— Pipeline type (batchortraining)pipeline_key— Pipeline key; this value is the same asworkflow_keyand is retained for backward compatibilityworkflow_key— Workflow key; this value is the same aspipeline_key, which is retained for backward compatibility v1.1.8+pipeline_version— Pipeline versionstatus— Current job statusoutcome— Job outcome (SUCCESS,PARTIAL, orFAILED). Omitted for jobs whosestatusisn’tCOMPLETEDv1.1.5+parameters— Job parametersretry_count— Number of retriespreemption_count— Number of preemptionsqueue_position— Current position in queue (if queued)queue_depth— Total queue depth (if queued)input_progress— Per-status counts of tracked inputs (pending,processing,completed,failed,processed_bytes,total_bytes); populated on this list endpoint,nullon write-path responses (see theinput_progressproperty returned by the Get Job endpoint)created_at— Creation timestampupdated_at— Last update timestampstarted_at— Start timestamp (if started)completed_at— Completion timestamp (if completed)failed_at— Failure timestamp (if failed)cancelled_at— Cancellation timestamp (if cancelled)error— Error details (if failed)
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?sort=status&order=asc" \
-H "Authorization: Bearer $ATAI_API_KEY"
import requests
import os
api_key = os.environ.get("ATAI_API_KEY")
response = requests.get(
"https://api.u1.archetypeai.app/v0.5/batch/jobs",
headers={"Authorization": f"Bearer {api_key}"},
params={
"pipeline_type": "batch",
"status": "RUNNING",
"limit": 10
}
)
data = response.json()
for job in data["data"]:
print(f" {job['id']}: {job['name']} — {job['status']}")
# 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 params = new URLSearchParams({
pipeline_type: 'batch',
status: 'RUNNING',
limit: '10'
});
const response = await fetch(`https://api.u1.archetypeai.app/v0.5/batch/jobs?${params}`, {
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
});
const data = await response.json();
data.data.forEach(job => {
console.log(` ${job.id}: ${job.name} — ${job.status}`);
});
if (data.has_more) {
console.log(`Next page cursor: ${data.next_cursor}`);
}
{
"data": [
{
"id": "job_2abc3def4ghi5jkl6mno7pqr",
"org_id": "org_1abc2def3ghi4jkl",
"name": "tep-classification",
"pipeline_type": "batch",
"pipeline_key": "machine-state-classification",
"pipeline_version": "1.1.1",
"status": "RUNNING",
"parameters": {},
"retry_count": 0,
"preemption_count": 0,
"queue_position": null,
"queue_depth": null,
"input_progress": {
"pending": 0,
"processing": 1,
"completed": 2,
"failed": 0,
"processed_bytes": 40551733,
"total_bytes": 105332974
},
"created_at": "2026-04-14T10:00:00Z",
"updated_at": "2026-04-14T10:05:00Z",
"started_at": "2026-04-14T10:02:00Z",
"completed_at": null,
"failed_at": null,
"cancelled_at": null,
"error": null
}
],
"has_more": true,
"next_cursor": "<cursor>",
"prev_cursor": null
}
{
"code": "...",
"message": "...",
"error_uid": "err_abc123"
}
{
"detail": "Invalid access with key: api_key_not_found"
}
Was this page helpful?