curl "https://api.u1.archetypeai.app/v0.5/batch/jobs/job_2abc3def4ghi5jkl6mno7pqr/outputs?port_name=worker.results&limit=10" \
-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}/outputs",
headers={"Authorization": f"Bearer {api_key}"},
params={
"port_name": "worker.results",
"limit": 10
}
)
data = response.json()
for output in data["data"]:
print(f" {output['id']}: {output['data']['filename']}")
print(f" Download: {output['data']['ref']}")
# 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({ port_name: 'worker.results', limit: '10' });
const response = await fetch(`https://api.u1.archetypeai.app/v0.5/batch/jobs/${jobId}/outputs?${params}`, {
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
});
const data = await response.json();
data.data.forEach(output => {
console.log(` ${output.id}: ${output.data.filename}`);
console.log(` Download: ${output.data.ref}`);
});
if (data.has_more) {
console.log(`Next page cursor: ${data.next_cursor}`);
}
{
"job_id": "job_2abc3def4ghi5jkl6mno7pqr",
"data": [
{
"id": "out_abc123def456",
"job_id": "job_2abc3def4ghi5jkl6mno7pqr",
"port_name": "worker.results",
"input_id": "inp_abc123def456",
"input_file_id": "file_abc123",
"data": {
"ref": "https://storage.example.com/outputs/result1.json?X-Amz-Signature=...",
"filename": "result1.json",
"file_type": "application/json",
"file_extension": ".json",
"num_bytes": 1024,
"metadata": {}
},
"expires_at": "2026-04-14T11:00:00Z",
"created_at": "2026-04-14T10:10:00Z"
}
],
"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"
}
I/O
List Outputs
Retrieve a cursor-paginated list of outputs for a specific job
GET
/
batch
/
jobs
/
{id}
/
outputs
curl "https://api.u1.archetypeai.app/v0.5/batch/jobs/job_2abc3def4ghi5jkl6mno7pqr/outputs?port_name=worker.results&limit=10" \
-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}/outputs",
headers={"Authorization": f"Bearer {api_key}"},
params={
"port_name": "worker.results",
"limit": 10
}
)
data = response.json()
for output in data["data"]:
print(f" {output['id']}: {output['data']['filename']}")
print(f" Download: {output['data']['ref']}")
# 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({ port_name: 'worker.results', limit: '10' });
const response = await fetch(`https://api.u1.archetypeai.app/v0.5/batch/jobs/${jobId}/outputs?${params}`, {
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
});
const data = await response.json();
data.data.forEach(output => {
console.log(` ${output.id}: ${output.data.filename}`);
console.log(` Download: ${output.data.ref}`);
});
if (data.has_more) {
console.log(`Next page cursor: ${data.next_cursor}`);
}
{
"job_id": "job_2abc3def4ghi5jkl6mno7pqr",
"data": [
{
"id": "out_abc123def456",
"job_id": "job_2abc3def4ghi5jkl6mno7pqr",
"port_name": "worker.results",
"input_id": "inp_abc123def456",
"input_file_id": "file_abc123",
"data": {
"ref": "https://storage.example.com/outputs/result1.json?X-Amz-Signature=...",
"filename": "result1.json",
"file_type": "application/json",
"file_extension": ".json",
"num_bytes": 1024,
"metadata": {}
},
"expires_at": "2026-04-14T11:00:00Z",
"created_at": "2026-04-14T10:10:00Z"
}
],
"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 output files produced by a job, newest first. You can filter by port name or input ID to find specific results.Request
string
required
The unique job identifier
string
Filter outputs by port name
string
Filter outputs associated with a specific input
integer
default:"100"
Page size, between
1 and 1000. Clamped server-side.string
Forward cursor: return outputs produced before the output 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 outputs produced after the output 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 output objects, newest first (
created_at descending) in both cursor directions, each
containing:id— Unique output identifierjob_id— Parent job identifierport_name— Output port nameinput_id— Associated input ID (if applicable)input_file_id—file_idof the source input (if applicable)data— Data reference (DataRef) with requiredref(presigned download URL) andfilename, plus optionalfile_type,file_extension,num_bytes,metadata,file_tags,file_attributesexpires_at— Expiration timestamp for the presigned download URL (re-fetch after this time)created_at— Creation 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/outputs?port_name=worker.results&limit=10" \
-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}/outputs",
headers={"Authorization": f"Bearer {api_key}"},
params={
"port_name": "worker.results",
"limit": 10
}
)
data = response.json()
for output in data["data"]:
print(f" {output['id']}: {output['data']['filename']}")
print(f" Download: {output['data']['ref']}")
# 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({ port_name: 'worker.results', limit: '10' });
const response = await fetch(`https://api.u1.archetypeai.app/v0.5/batch/jobs/${jobId}/outputs?${params}`, {
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
});
const data = await response.json();
data.data.forEach(output => {
console.log(` ${output.id}: ${output.data.filename}`);
console.log(` Download: ${output.data.ref}`);
});
if (data.has_more) {
console.log(`Next page cursor: ${data.next_cursor}`);
}
{
"job_id": "job_2abc3def4ghi5jkl6mno7pqr",
"data": [
{
"id": "out_abc123def456",
"job_id": "job_2abc3def4ghi5jkl6mno7pqr",
"port_name": "worker.results",
"input_id": "inp_abc123def456",
"input_file_id": "file_abc123",
"data": {
"ref": "https://storage.example.com/outputs/result1.json?X-Amz-Signature=...",
"filename": "result1.json",
"file_type": "application/json",
"file_extension": ".json",
"num_bytes": 1024,
"metadata": {}
},
"expires_at": "2026-04-14T11:00:00Z",
"created_at": "2026-04-14T10:10:00Z"
}
],
"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"
}
Output download URLs are presigned and expire at the time indicated by
expires_at. Re-fetch the outputs list to get fresh URLs after expiration.Was this page helpful?