curl --request GET \
--url https://api.pinecone.io/admin/cost-usage-exports/{cost_usage_export_id} \
--header 'Authorization: Bearer <token>' \
--header 'X-Pinecone-Api-Version: <x-pinecone-api-version>'import requests
url = "https://api.pinecone.io/admin/cost-usage-exports/{cost_usage_export_id}"
headers = {
"X-Pinecone-Api-Version": "<x-pinecone-api-version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Pinecone-Api-Version': '<x-pinecone-api-version>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.pinecone.io/admin/cost-usage-exports/{cost_usage_export_id}', 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.pinecone.io/admin/cost-usage-exports/{cost_usage_export_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Pinecone-Api-Version: <x-pinecone-api-version>"
],
]);
$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.pinecone.io/admin/cost-usage-exports/{cost_usage_export_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Pinecone-Api-Version", "<x-pinecone-api-version>")
req.Header.Add("Authorization", "Bearer <token>")
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.pinecone.io/admin/cost-usage-exports/{cost_usage_export_id}")
.header("X-Pinecone-Api-Version", "<x-pinecone-api-version>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pinecone.io/admin/cost-usage-exports/{cost_usage_export_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Pinecone-Api-Version"] = '<x-pinecone-api-version>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"created_at": "2026-09-02T14:31:07.000Z",
"data_available_through": null,
"download_url": null,
"download_url_expires_at": null,
"error": null,
"file_expired": false,
"file_expires_at": null,
"finished_at": null,
"format": "zip",
"id": "9f2c1a4e-8b3d-4c5f-a1b2-c3d4e5f6a7b8",
"period_end": "2026-09-01T00:00:00.000Z",
"period_start": "2026-08-01T00:00:00.000Z",
"row_count": null,
"size_bytes": null,
"started_at": "2026-09-02T14:31:19.000Z",
"status": "InProgress",
"updated_at": "2026-09-02T14:31:19.000Z"
}Get cost usage export details
Get the state of a cost usage export, and a link to download its file once the export has completed. A fresh signed link, valid for one hour, is generated on each read.
curl --request GET \
--url https://api.pinecone.io/admin/cost-usage-exports/{cost_usage_export_id} \
--header 'Authorization: Bearer <token>' \
--header 'X-Pinecone-Api-Version: <x-pinecone-api-version>'import requests
url = "https://api.pinecone.io/admin/cost-usage-exports/{cost_usage_export_id}"
headers = {
"X-Pinecone-Api-Version": "<x-pinecone-api-version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Pinecone-Api-Version': '<x-pinecone-api-version>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.pinecone.io/admin/cost-usage-exports/{cost_usage_export_id}', 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.pinecone.io/admin/cost-usage-exports/{cost_usage_export_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Pinecone-Api-Version: <x-pinecone-api-version>"
],
]);
$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.pinecone.io/admin/cost-usage-exports/{cost_usage_export_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Pinecone-Api-Version", "<x-pinecone-api-version>")
req.Header.Add("Authorization", "Bearer <token>")
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.pinecone.io/admin/cost-usage-exports/{cost_usage_export_id}")
.header("X-Pinecone-Api-Version", "<x-pinecone-api-version>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pinecone.io/admin/cost-usage-exports/{cost_usage_export_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Pinecone-Api-Version"] = '<x-pinecone-api-version>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"created_at": "2026-09-02T14:31:07.000Z",
"data_available_through": null,
"download_url": null,
"download_url_expires_at": null,
"error": null,
"file_expired": false,
"file_expires_at": null,
"finished_at": null,
"format": "zip",
"id": "9f2c1a4e-8b3d-4c5f-a1b2-c3d4e5f6a7b8",
"period_end": "2026-09-01T00:00:00.000Z",
"period_start": "2026-08-01T00:00:00.000Z",
"row_count": null,
"size_bytes": null,
"started_at": "2026-09-02T14:31:19.000Z",
"status": "InProgress",
"updated_at": "2026-09-02T14:31:19.000Z"
}Authorizations
An access token must be provided in the Authorization header using the Bearer scheme.
Headers
Required date-based version header
Path Parameters
Cost usage export ID
Response
The state of the export, and a download link once it has completed.
The CostUsageExport describes an asynchronous job that produces a cost and usage file for an organization, together with the link used to download that file. The file holds cost records that follow the FOCUS v1.4 Cost and Usage dataset.
Unique identifier for the export. Use it to poll for completion, and to identify the export when contacting Pinecone Support.
"9f2c1a4e-8b3d-4c5f-a1b2-c3d4e5f6a7b8"
Status of a cost usage export. Pending and InProgress mean the job is still running; Completed and Failed are terminal and never change afterwards.
Possible values: Pending, InProgress, Completed, or Failed.
"Completed"
Encoding of the generated file. zip is a zip archive holding the cost records as one or more CSV files whose columns follow the FOCUS v1.4 Cost and Usage dataset, alongside a manifest.json describing the archive. Each CSV starts with a header line and holds at most 800,000 rows, so larger exports are split across several files, named part-1-of-3.csv through part-3-of-3.csv and ordered by those names.
Every CSV carries these 45 columns, in this order: x_OrganizationId, SubAccountId, ResourceName, ResourceType, ChargePeriodStart, ChargePeriodEnd, BillingPeriodStart, BillingPeriodEnd, SkuId, ServiceName, PricingQuantity, PricingUnit, ConsumedQuantity, ConsumedUnit, ListUnitPrice, ListCost, ContractedUnitPrice, ContractedCost, EffectiveCost, BilledCost, BillingCurrency, PricingCategory, ChargeCategory, ChargeClass, ChargeFrequency, ServiceCategory, ServiceSubcategory, RegionId, RegionName, HostProviderName, ServiceProviderName, InvoiceIssuerName, InvoiceId, BillingAccountId, BillingAccountName, BillingAccountType, SubAccountName, SubAccountType, ResourceId, SkuPriceId, SkuMeter, ChargeDescription, x_CloudId, Tags, x_ProjectMetadata.
Columns prefixed with x_ are Pinecone extensions, which is how FOCUS requires a provider to name a column the specification does not define. SubAccountId and SubAccountName identify the Pinecone project, and BillingAccountId identifies the organization that is invoiced.
Rows are ordered by ChargePeriodStart, SubAccountName, ResourceName, ChargeDescription, SkuId, ResourceId, across the archive as a whole rather than within each file. InvoiceId is provisional while its billing period is still open, so it may change for a period that has not yet closed.
Possible values: zip.
"zip"
First day of usage covered by the export, as a UTC calendar day. This bound is inclusive.
"2026-08-01T00:00:00.000Z"
Day after the last day of usage covered by the export, as a UTC calendar day. This bound is exclusive.
"2026-09-01T00:00:00.000Z"
Whether the generated file has been deleted. Check this rather than status: a Completed export whose file has expired can no longer be downloaded.
false
When the export was accepted.
"2026-09-02T14:31:07.000Z"
When the export was last updated.
"2026-09-02T14:35:52.000Z"
Last day for which the billing warehouse holds complete data, recorded when the export runs to describe the contents of the generated file. null until then. Cost data lags by roughly two days.
"2026-08-31T00:00:00.000Z"
Number of line items across all CSV files in the archive, excluding header lines.
48213
Length of the zip archive, in bytes.
4183902
Signed link to the generated file, generated fresh each time a single export is read and valid for one hour. Treat the link as a secret: anyone holding it can download the file. Do not store it or pass it between systems; read the export again for a new link. Always null in list responses.
"https://storage.googleapis.com/example-bucket/cost_usage_exports/export.zip?X-Goog-Expires=3600"
When download_url stops working: one hour after the link was generated, or file_expires_at, whichever comes first. Read the export again for a new link. Always null in list responses.
"2026-09-02T15:36:11.000Z"
When the generated file is deleted, two days after the export finished. The file cannot be re-delivered afterwards; create another export instead.
"2026-09-04T14:35:52.000Z"
Why an export failed.
Show child attributes
Show child attributes
When the export job began running.
"2026-09-02T14:31:19.000Z"
When the export job finished running, either successfully or with an error.
"2026-09-02T14:35:52.000Z"
Was this page helpful?