Skip to main content
Exports enable you to download annotated data, labels, and results from Avala in various formats for use in training pipelines and external tools.

Overview

The Exports resource allows you to:
  • Export annotations from projects
  • Download dataset items and labels
  • Generate training-ready data
  • Access results in standard formats (COCO, YOLO, etc.)
  • Track export status and download URLs
Each export is asynchronous and provides a download URL when ready.

Export structure

interface Export {
  uid: string;
  status: string | null;
  downloadUrl: string | null;
  createdAt: string | null;
  updatedAt: string | null;
}

Properties

uid
string
Unique identifier for the export
status
string
Current export status: ‘pending’, ‘processing’, ‘completed’, or ‘failed’
downloadUrl
string
URL to download the export file (available when status is ‘completed’)
createdAt
string
ISO 8601 timestamp when export was requested
updatedAt
string
ISO 8601 timestamp of last status update

Creating an export

Request a new export from a project or dataset:
const exportJob = await avala.exports.create({
  project: 'proj_abc123'
});

console.log(`Export created: ${exportJob.uid}`);
console.log(`Status: ${exportJob.status}`);

Create options

project
string
Project UID to export annotations from
dataset
string
Dataset UID to export items from
Provide either project or dataset, not both. The export will include all relevant data from the specified resource.

Listing exports

Retrieve all exports with pagination:
const page = await avala.exports.list({
  limit: 20
});

for (const exp of page.items) {
  console.log(`${exp.uid}: ${exp.status}`);
  if (exp.downloadUrl) {
    console.log(`  Download: ${exp.downloadUrl}`);
  }
}

// Get next page
if (page.hasMore) {
  const nextPage = await avala.exports.list({
    cursor: page.nextCursor
  });
}

Pagination parameters

limit
number
Maximum number of exports to return (default: 20)
cursor
string
Cursor for fetching the next page of results

Getting an export

Retrieve details about a specific export:
const exportJob = await avala.exports.get('export_uid_here');

console.log(`Status: ${exportJob.status}`);

if (exportJob.status === 'completed') {
  console.log(`Download: ${exportJob.downloadUrl}`);
}

Export lifecycle

Exports progress through several status values:
1

Pending

Export has been created and is queued for processing
{ status: 'pending', downloadUrl: null }
2

Processing

Export is actively being generated
{ status: 'processing', downloadUrl: null }
3

Completed

Export is ready for download
{
  status: 'completed',
  downloadUrl: 'https://storage.avala.ai/exports/...'
}
4

Failed

Export encountered an error
{ status: 'failed', downloadUrl: null }

Common workflows

// Create export
const exportJob = await avala.exports.create({
  project: 'proj_123'
});

// Poll for completion
let status = exportJob.status;
while (status === 'pending' || status === 'processing') {
  await new Promise(resolve => setTimeout(resolve, 5000));
  
  const updated = await avala.exports.get(exportJob.uid);
  status = updated.status;
  
  if (status === 'completed') {
    console.log(`Download ready: ${updated.downloadUrl}`);
    break;
  }
  
  if (status === 'failed') {
    console.error('Export failed');
    break;
  }
}

Response format

List operations return paginated results:
interface CursorPage<Export> {
  items: Export[];
  nextCursor: string | null;
  previousCursor: string | null;
  hasMore: boolean;
}

Best practices

Poll efficiently

Wait 5-10 seconds between status checks to avoid rate limits

Handle failures

Always check for ‘failed’ status and implement error handling

Set timeouts

Implement reasonable timeouts when polling for export completion

Cache download URLs

Store download URLs temporarily as they may expire after some time
Download URLs are temporary and may expire. Download the export file promptly after it becomes available.

Export formats

Depending on your project configuration, exports may be available in formats like:
  • COCO JSON - Common Objects in Context format
  • YOLO - YOLO training format
  • Pascal VOC - Pascal VOC XML format
  • CSV - Tabular export of annotations
  • JSON - Raw annotation data
Export formats are determined by your project settings and data type. Configure your project’s export format in the Avala dashboard.
  • Projects: Export annotations from projects - see Projects
  • Datasets: Export dataset items - see Datasets
  • Storage Config: Configure export storage destination

Build docs developers (and LLMs) love