Artifacts
Task API
Artifacts
List and download files generated by a task
GET
Artifacts
Artifacts
Retrieve files generated in a task’s workspace. This includes uploaded files, generated outputs, and any files created by the agent during execution.List Artifacts
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique task identifier |
Response
File Object
| Field | Type | Description |
|---|---|---|
name | string | Filename |
path | string | Relative path in workspace |
size | number | File size in bytes |
mimeType | string | MIME type (e.g., text/csv, application/pdf) |
category | string | File category (e.g., csv, pdf, image, code) |
modifiedAt | string | ISO timestamp of last modification |
This endpoint works for both active sessions and completed tasks. When a session has expired, files are retrieved from the preserved workspace.
Examples
Download Artifact
Download a specific file from the task’s workspace.Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique task identifier |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Relative file path (from the artifacts listing) |
Response
Binary file content with the following headers:| Header | Description |
|---|---|
Content-Type | MIME type of the file |
Content-Disposition | attachment; filename="output.csv" |
Content-Length | File size in bytes |
Examples
Use Cases
Download Reports
Retrieve generated reports, analysis results, or data exports
Access Uploaded Files
Download files that were uploaded with the task for verification
Build File Browsers
List workspace contents and let users browse generated artifacts
Pipeline Integration
Automatically retrieve output files as part of an automation pipeline
Errors
| Code | Description |
|---|---|
AUTH_REQUIRED | No authentication provided |
INVALID_API_KEY | Invalid or expired API key |
NOT_FOUND | Task or file not found |
VALIDATION_ERROR | Missing path query parameter (download endpoint) |