curl "https://api.destined.ai/v1/jobs/job_abc123xyz" \
-H "Authorization: Bearer YOUR_API_KEY"
const job = await client.jobs.getJobV1JobsJobIdGet({
jobId: "job_abc123xyz",
});
if (job.status === "completed") {
for (const result of job.results) {
console.log(result.audioUrl);
}
}
{
"job_id": "job_abc123xyz",
"status": "completed",
"progress": 100,
"total_items": 3,
"completed_items": 3,
"created_at": "2024-01-15T10:30:00Z",
"completed_at": "2024-01-15T10:31:00Z",
"results": [
{
"index": 0,
"speaker_id": "speaker-1",
"audio_url": "https://voice.s3.amazonaws.com/audio/gen_001.wav",
"status": "success"
},
{
"index": 1,
"speaker_id": "speaker-2",
"audio_url": "https://voice.s3.amazonaws.com/audio/gen_002.wav",
"status": "success"
},
{
"index": 2,
"speaker_id": "speaker-3",
"audio_url": "https://voice.s3.amazonaws.com/audio/gen_003.wav",
"status": "success"
}
]
}
Jobs
Get Job
Get status and results of a batch job
GET
/
v1
/
jobs
/
{job_id}
curl "https://api.destined.ai/v1/jobs/job_abc123xyz" \
-H "Authorization: Bearer YOUR_API_KEY"
const job = await client.jobs.getJobV1JobsJobIdGet({
jobId: "job_abc123xyz",
});
if (job.status === "completed") {
for (const result of job.results) {
console.log(result.audioUrl);
}
}
{
"job_id": "job_abc123xyz",
"status": "completed",
"progress": 100,
"total_items": 3,
"completed_items": 3,
"created_at": "2024-01-15T10:30:00Z",
"completed_at": "2024-01-15T10:31:00Z",
"results": [
{
"index": 0,
"speaker_id": "speaker-1",
"audio_url": "https://voice.s3.amazonaws.com/audio/gen_001.wav",
"status": "success"
},
{
"index": 1,
"speaker_id": "speaker-2",
"audio_url": "https://voice.s3.amazonaws.com/audio/gen_002.wav",
"status": "success"
},
{
"index": 2,
"speaker_id": "speaker-3",
"audio_url": "https://voice.s3.amazonaws.com/audio/gen_003.wav",
"status": "success"
}
]
}
Path Parameters
string
required
The unique job ID
Response
string
required
Unique job identifier
string
required
Job status:
pending, processing, completed, failed, partialinteger
required
Completion percentage (0-100)
integer
required
Total items in batch
integer
required
Items completed so far
array
Array of results (only when status is
completed or partial)curl "https://api.destined.ai/v1/jobs/job_abc123xyz" \
-H "Authorization: Bearer YOUR_API_KEY"
const job = await client.jobs.getJobV1JobsJobIdGet({
jobId: "job_abc123xyz",
});
if (job.status === "completed") {
for (const result of job.results) {
console.log(result.audioUrl);
}
}
{
"job_id": "job_abc123xyz",
"status": "completed",
"progress": 100,
"total_items": 3,
"completed_items": 3,
"created_at": "2024-01-15T10:30:00Z",
"completed_at": "2024-01-15T10:31:00Z",
"results": [
{
"index": 0,
"speaker_id": "speaker-1",
"audio_url": "https://voice.s3.amazonaws.com/audio/gen_001.wav",
"status": "success"
},
{
"index": 1,
"speaker_id": "speaker-2",
"audio_url": "https://voice.s3.amazonaws.com/audio/gen_002.wav",
"status": "success"
},
{
"index": 2,
"speaker_id": "speaker-3",
"audio_url": "https://voice.s3.amazonaws.com/audio/gen_003.wav",
"status": "success"
}
]
}
⌘I