Artifacts
curl --request GET \
--url https://api.example.com/api/v1/tasks/{id}/artifactsimport requests
url = "https://api.example.com/api/v1/tasks/{id}/artifacts"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/tasks/{id}/artifacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/tasks/{id}/artifacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/tasks/{id}/artifacts"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/tasks/{id}/artifacts")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/tasks/{id}/artifacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyTask API
Artifacts
List and download files generated by a task
GET
/
api
/
v1
/
tasks
/
{id}
/
artifacts
Artifacts
curl --request GET \
--url https://api.example.com/api/v1/tasks/{id}/artifactsimport requests
url = "https://api.example.com/api/v1/tasks/{id}/artifacts"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/tasks/{id}/artifacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/tasks/{id}/artifacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/tasks/{id}/artifacts"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/tasks/{id}/artifacts")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/tasks/{id}/artifacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyArtifacts
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
GET /api/v1/tasks/{id}/artifacts
Authorization: Bearer {api_key}
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique task identifier |
Response
{
"success": true,
"data": {
"files": [
{
"name": "output.csv",
"path": "downloads/output.csv",
"size": 1024,
"mimeType": "text/csv",
"category": "csv",
"modifiedAt": "2026-01-26T16:00:00.000Z"
},
{
"name": "report.pdf",
"path": "downloads/report.pdf",
"size": 50432,
"mimeType": "application/pdf",
"category": "pdf",
"modifiedAt": "2026-01-26T16:01:00.000Z"
},
{
"name": "data.csv",
"path": "uploads/data.csv",
"size": 2048,
"mimeType": "text/csv",
"category": "csv",
"modifiedAt": "2026-01-26T15:50:00.000Z"
}
]
}
}
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
curl -s https://api.sigmic.ai/api/v1/tasks/YOUR_TASK_ID/artifacts \
-H "Authorization: Bearer sigmic_your_key_here" | jq
const taskId = 'c37c1d78-4d23-4e53-949a-ddd775f25e01';
const response = await fetch(
`https://api.sigmic.ai/api/v1/tasks/${taskId}/artifacts`,
{ headers: { 'Authorization': 'Bearer sigmic_your_key_here' } }
);
const { data } = await response.json();
console.log(`Found ${data.files.length} files:`);
data.files.forEach(f => console.log(` ${f.name} (${f.size} bytes)`));
import requests
task_id = 'c37c1d78-4d23-4e53-949a-ddd775f25e01'
response = requests.get(
f'https://api.sigmic.ai/api/v1/tasks/{task_id}/artifacts',
headers={'Authorization': 'Bearer sigmic_your_key_here'}
)
files = response.json()['data']['files']
for f in files:
print(f"{f['name']} ({f['size']} bytes) - {f['mimeType']}")
Download Artifact
Download a specific file from the task’s workspace.GET /api/v1/tasks/{id}/artifacts/download?path={filePath}
Authorization: Bearer {api_key}
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
# Download to current directory
curl -O https://api.sigmic.ai/api/v1/tasks/YOUR_TASK_ID/artifacts/download?path=downloads/output.csv \
-H "Authorization: Bearer sigmic_your_key_here"
# Save with custom filename
curl -o my-report.pdf https://api.sigmic.ai/api/v1/tasks/YOUR_TASK_ID/artifacts/download?path=downloads/report.pdf \
-H "Authorization: Bearer sigmic_your_key_here"
const taskId = 'c37c1d78-4d23-4e53-949a-ddd775f25e01';
const filePath = 'downloads/output.csv';
const response = await fetch(
`https://api.sigmic.ai/api/v1/tasks/${taskId}/artifacts/download?path=${encodeURIComponent(filePath)}`,
{ headers: { 'Authorization': 'Bearer sigmic_your_key_here' } }
);
// Save as file (Node.js)
const buffer = await response.arrayBuffer();
const fs = await import('fs');
fs.writeFileSync('output.csv', Buffer.from(buffer));
// Or create a download link (browser)
const blob = await response.blob();
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'output.csv';
a.click();
import requests
task_id = 'c37c1d78-4d23-4e53-949a-ddd775f25e01'
file_path = 'downloads/output.csv'
response = requests.get(
f'https://api.sigmic.ai/api/v1/tasks/{task_id}/artifacts/download',
headers={'Authorization': 'Bearer sigmic_your_key_here'},
params={'path': file_path}
)
with open('output.csv', 'wb') as f:
f.write(response.content)
print(f'Downloaded {len(response.content)} bytes')
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) |