The export lifecycle covers how an export progresses after creation, how to download its files, and how scheduled exports behave.
An export runs asynchronously, and the status field tracks its progress.
|
Status
|
Description
|
pending
|
The export is queued. One export per organization runs at a time.
|
running
|
The export is in progress. AI Cost Management is reading events and writing files.
|
succeeded
|
Files are ready to download, until expires_at (30 days after the export finishes).
|
failed
|
The export stopped without files. Check the failure_reason.
|
expired
|
The export succeeded but its 30-day download window has passed.
The export record remains with its file list, but the files are deleted.
|
You can download files from a successful export through short-lived URLs that the API returns.
Each URL is valid for five minutes and works with a plain GET request without an Authorization header.
Warning: A download URL is a bearer credential. Anyone who holds it can download the file until it expires.
Each file in the export’s files list has a size_bytes and a sha256 field.
The manifest.json file describes the export and lists each data file with its size and SHA-256 digest.
The files list doesn’t include the manifest. To download it, request a download URL with manifest.json as the filename.
You can verify a download by comparing its size and SHA-256 checksum against those values.
A scheduled export runs automatically at the end of each period.
Usage events don’t always arrive in real time.
The export starts six hours after the period ends, so that events that arrive late can be stored first.
For example, a request that happens at 11:58 PM might not be processed and stored until 1 AM.
Each schedule exports each period once and never refreshes it, even when events arrive after the export ran.
A failed scheduled export stays failed and the schedule doesn’t retry it.
To capture late events or fill a failed period, create a one-time export of the same range.
When a schedule resumes from paused, the periods that ended while it was paused are skipped.
After an outage, a schedule catches up on at most the 31 most recent periods that ended while it was active.
To change a schedule, send a PUT request to the /v1/ai-cost-management/export-schedules/{scheduleId} endpoint with the full schedule, because an omitted filters clears the filters.
Set status to paused to pause the schedule and to active to resume it.
The change applies to periods that end after it, and existing exports don’t change.