curl -X DELETE https://api.u1.archetypeai.app/v0.5/batch/jobs/job_2abc3def4ghi5jkl6mno7pqr \
-H "Authorization: Bearer $ATAI_API_KEY"
import requests
import os
api_key = os.environ.get("ATAI_API_KEY")
job_id = "job_2abc3def4ghi5jkl6mno7pqr"
response = requests.delete(
f"https://api.u1.archetypeai.app/v0.5/batch/jobs/{job_id}",
headers={"Authorization": f"Bearer {api_key}"}
)
result = response.json()
if result["deleted"]:
print(f"Job {result['id']} deleted successfully")
const jobId = 'job_2abc3def4ghi5jkl6mno7pqr';
const response = await fetch(`https://api.u1.archetypeai.app/v0.5/batch/jobs/${jobId}`, {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
});
const result = await response.json();
if (result.deleted) {
console.log(`Job ${result.id} deleted successfully`);
}
{
"id": "job_2abc3def4ghi5jkl6mno7pqr",
"deleted": true
}
{
"code": "NOT_FOUND",
"message": "Job not found",
"error_uid": "err_abc123"
}
{
"detail": "Invalid access with key: api_key_not_found"
}
Jobs
Delete Job
Permanently delete a job and its associated data
DELETE
/
batch
/
jobs
/
{id}
curl -X DELETE https://api.u1.archetypeai.app/v0.5/batch/jobs/job_2abc3def4ghi5jkl6mno7pqr \
-H "Authorization: Bearer $ATAI_API_KEY"
import requests
import os
api_key = os.environ.get("ATAI_API_KEY")
job_id = "job_2abc3def4ghi5jkl6mno7pqr"
response = requests.delete(
f"https://api.u1.archetypeai.app/v0.5/batch/jobs/{job_id}",
headers={"Authorization": f"Bearer {api_key}"}
)
result = response.json()
if result["deleted"]:
print(f"Job {result['id']} deleted successfully")
const jobId = 'job_2abc3def4ghi5jkl6mno7pqr';
const response = await fetch(`https://api.u1.archetypeai.app/v0.5/batch/jobs/${jobId}`, {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
});
const result = await response.json();
if (result.deleted) {
console.log(`Job ${result.id} deleted successfully`);
}
{
"id": "job_2abc3def4ghi5jkl6mno7pqr",
"deleted": true
}
{
"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 permanently deletes a job and all of its associated data. This action cannot be undone.Request
string
required
The unique job identifier
Response
string
The ID of the deleted job
boolean
Whether the job was successfully deleted
curl -X DELETE https://api.u1.archetypeai.app/v0.5/batch/jobs/job_2abc3def4ghi5jkl6mno7pqr \
-H "Authorization: Bearer $ATAI_API_KEY"
import requests
import os
api_key = os.environ.get("ATAI_API_KEY")
job_id = "job_2abc3def4ghi5jkl6mno7pqr"
response = requests.delete(
f"https://api.u1.archetypeai.app/v0.5/batch/jobs/{job_id}",
headers={"Authorization": f"Bearer {api_key}"}
)
result = response.json()
if result["deleted"]:
print(f"Job {result['id']} deleted successfully")
const jobId = 'job_2abc3def4ghi5jkl6mno7pqr';
const response = await fetch(`https://api.u1.archetypeai.app/v0.5/batch/jobs/${jobId}`, {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
});
const result = await response.json();
if (result.deleted) {
console.log(`Job ${result.id} deleted successfully`);
}
{
"id": "job_2abc3def4ghi5jkl6mno7pqr",
"deleted": true
}
{
"code": "NOT_FOUND",
"message": "Job not found",
"error_uid": "err_abc123"
}
{
"detail": "Invalid access with key: api_key_not_found"
}
Deleting a job is permanent and cannot be undone. All associated inputs, outputs, events, and progress data will also be removed.
Was this page helpful?
⌘I