> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinecone.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.




## OpenAPI

````yaml https://raw.githubusercontent.com/pinecone-io/pinecone-api/refs/heads/main/2026-07/admin_2026-07.oas.yaml get /admin/cost-usage-exports/{cost_usage_export_id}
openapi: 3.0.3
info:
  title: Pinecone Admin API
  description: >
    Provides an API for managing a Pinecone organization and its resources,
    including projects, API keys, organization users and invites, service
    accounts, role bindings, and cost usage exports.
  contact:
    name: Pinecone Support
    url: https://support.pinecone.io
    email: support@pinecone.io
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 2026-07
servers:
  - url: https://api.pinecone.io
    description: Production API endpoints
security:
  - BearerAuth: []
tags:
  - name: API Keys
    description: Actions that manage API Keys.
  - name: Organizations
    description: Actions that manage organizations.
  - name: Projects
    description: Actions that manage projects.
  - name: Users
    description: >-
      Actions that manage users. Role bindings are not included in user
      responses; use the Role Bindings endpoints to view them.
  - name: Invites
    description: >-
      Actions that manage invites. An invite's role bindings are first-class and
      appear in the Role Bindings endpoints with `principal_type=invite`.
  - name: Service Accounts
    description: >-
      Actions that manage service accounts. Role bindings are not included in
      service account responses; use the Role Bindings endpoints to view them.
  - name: Role Bindings
    description: Actions that manage role bindings.
  - name: Cost Usage Exports
    description: Actions that export an organization's cost and usage records as a file.
paths:
  /admin/cost-usage-exports/{cost_usage_export_id}:
    get:
      tags:
        - Cost Usage Exports
      summary: Get cost usage export details
      description: >
        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.
      operationId: fetch_cost_usage_export
      parameters:
        - in: header
          name: X-Pinecone-Api-Version
          description: Required date-based version header
          required: true
          schema:
            default: 2026-07
            type: string
          style: simple
        - in: path
          name: cost_usage_export_id
          description: Cost usage export ID
          required: true
          schema:
            type: string
            format: uuid
          style: simple
      responses:
        '200':
          description: The state of the export, and a download link once it has completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CostUsageExport'
              examples:
                in-progress:
                  summary: Export is running
                  value:
                    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'
                completed:
                  summary: Export is ready to download
                  value:
                    created_at: '2026-09-02T14:31:07.000Z'
                    data_available_through: '2026-08-31T00:00:00.000Z'
                    download_url: >-
                      https://storage.googleapis.com/example-bucket/cost_usage_exports/export.zip?X-Goog-Expires=3600&X-Goog-Signature=abc123
                    download_url_expires_at: '2026-09-02T15:36:11.000Z'
                    error: null
                    file_expired: false
                    file_expires_at: '2026-09-04T14:35:52.000Z'
                    finished_at: '2026-09-02T14:35:52.000Z'
                    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: 48213
                    size_bytes: 4183902
                    started_at: '2026-09-02T14:31:19.000Z'
                    status: Completed
                    updated_at: '2026-09-02T14:36:11.000Z'
                expired:
                  summary: Export succeeded, but its file has been removed
                  value:
                    created_at: '2026-08-20T14:31:07.000Z'
                    data_available_through: '2026-08-31T00:00:00.000Z'
                    download_url: null
                    download_url_expires_at: null
                    error: null
                    file_expired: true
                    file_expires_at: '2026-08-22T14:35:52.000Z'
                    finished_at: '2026-08-20T14:35:52.000Z'
                    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: 48213
                    size_bytes: 4183902
                    started_at: '2026-08-20T14:31:19.000Z'
                    status: Completed
                    updated_at: '2026-08-22T14:35:52.000Z'
                failed:
                  summary: Export failed
                  value:
                    created_at: '2026-09-02T14:31:07.000Z'
                    data_available_through: null
                    download_url: null
                    download_url_expires_at: null
                    error:
                      code: DEADLINE_EXCEEDED
                      message: >-
                        The export did not finish within the time budget. Create
                        a new export, or request a shorter window.
                    file_expired: false
                    file_expires_at: null
                    finished_at: '2026-09-02T14:58:03.000Z'
                    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: Failed
                    updated_at: '2026-09-02T14:58:03.000Z'
        '401':
          description: 'Unauthorized. Possible causes: Invalid API key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  summary: Unauthorized
                  value:
                    error:
                      code: UNAUTHENTICATED
                      message: Invalid API key.
                    status: 401
        '403':
          description: >-
            Forbidden. Either the service account lacks the permission, or the
            organization's plan does not include this feature.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                missing-permission:
                  summary: Service account lacks the permission
                  value:
                    error:
                      code: PERMISSION_DENIED
                      message: >-
                        This service account cannot read cost usage exports.
                        Grant it the OrgOwner or OrgBillingAdmin role.
                    status: 403
                plan-not-entitled:
                  summary: Plan does not include cost usage exports
                  value:
                    error:
                      code: PERMISSION_DENIED
                      message: >-
                        Cost usage exports are available to organizations on the
                        Enterprise plan.
                    status: 403
        '404':
          description: >-
            Not found. The identifier does not name an export belonging to this
            organization. The same response is returned whether the export is
            unknown, malformed, or owned by another organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unknown-export:
                  summary: No such export
                  value:
                    error:
                      code: NOT_FOUND
                      message: >-
                        Cost Usage Export 9f2c1a4e-8b3d-4c5f-a1b2-c3d4e5f6a7b8
                        not found
                    status: 404
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                internal-server-error:
                  summary: Internal server error
                  value:
                    error:
                      code: UNKNOWN
                      message: Internal server error
                    status: 500
        '503':
          description: >-
            The download link could not be signed. The export itself is
            unaffected, so retry the read rather than creating another export.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                signing-unavailable:
                  summary: Signing the download link failed
                  value:
                    error:
                      code: SERVICE_UNAVAILABLE
                      message: >-
                        The download link could not be generated. Retry the
                        request; if it keeps failing, contact support.
                    status: 503
        4XX:
          description: Unexpected error on request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CostUsageExport:
      description: >-
        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.
      type: object
      properties:
        id:
          example: 9f2c1a4e-8b3d-4c5f-a1b2-c3d4e5f6a7b8
          description: >-
            Unique identifier for the export. Use it to poll for completion, and
            to identify the export when contacting Pinecone Support.
          type: string
          format: uuid
        status:
          example: Completed
          description: >-
            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`.
          x-enum:
            - Pending
            - InProgress
            - Completed
            - Failed
          type: string
        format:
          example: zip
          description: >-
            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`.
          x-enum:
            - zip
          type: string
        period_start:
          example: '2026-08-01T00:00:00.000Z'
          description: >-
            First day of usage covered by the export, as a UTC calendar day.
            This bound is inclusive.
          type: string
          format: date
        period_end:
          example: '2026-09-01T00:00:00.000Z'
          description: >-
            Day after the last day of usage covered by the export, as a UTC
            calendar day. This bound is exclusive.
          type: string
          format: date
        data_available_through:
          nullable: true
          example: '2026-08-31T00:00:00.000Z'
          description: >-
            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.
          type: string
          format: date
        row_count:
          nullable: true
          example: 48213
          description: >-
            Number of line items across all CSV files in the archive, excluding
            header lines.
          type: integer
          format: int64
        size_bytes:
          nullable: true
          example: 4183902
          description: Length of the zip archive, in bytes.
          type: integer
          format: int64
        download_url:
          nullable: true
          example: >-
            https://storage.googleapis.com/example-bucket/cost_usage_exports/export.zip?X-Goog-Expires=3600
          description: >-
            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.
          type: string
          format: uri
        download_url_expires_at:
          nullable: true
          example: '2026-09-02T15:36:11.000Z'
          description: >-
            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.
          type: string
          format: date-time
        file_expires_at:
          nullable: true
          example: '2026-09-04T14:35:52.000Z'
          description: >-
            When the generated file is deleted, two days after the export
            finished. The file cannot be re-delivered afterwards; create another
            export instead.
          type: string
          format: date-time
        file_expired:
          example: false
          description: >-
            Whether the generated file has been deleted. Check this rather than
            `status`: a `Completed` export whose file has expired can no longer
            be downloaded.
          type: boolean
        error:
          $ref: '#/components/schemas/CostUsageExportError'
        created_at:
          example: '2026-09-02T14:31:07.000Z'
          description: When the export was accepted.
          type: string
          format: date-time
        started_at:
          nullable: true
          example: '2026-09-02T14:31:19.000Z'
          description: When the export job began running.
          type: string
          format: date-time
        finished_at:
          nullable: true
          example: '2026-09-02T14:35:52.000Z'
          description: >-
            When the export job finished running, either successfully or with an
            error.
          type: string
          format: date-time
        updated_at:
          example: '2026-09-02T14:35:52.000Z'
          description: When the export was last updated.
          type: string
          format: date-time
      required:
        - id
        - status
        - format
        - period_start
        - period_end
        - file_expired
        - created_at
        - updated_at
    ErrorResponse:
      example:
        error:
          code: QUOTA_EXCEEDED
          message: >-
            The index exceeds the project quota of 5 pods by 2 pods. Upgrade
            your account or change the project settings to increase the quota.
        status: 429
      description: The response shape used for all error responses.
      type: object
      properties:
        status:
          example: 500
          description: The HTTP status code of the error.
          type: integer
        error:
          example:
            code: INVALID_ARGUMENT
            message: >-
              Index name must contain only lowercase alphanumeric characters or
              hyphens, and must not begin or end with a hyphen.
          description: Detailed information about the error that occurred.
          type: object
          properties:
            code:
              description: >-
                The error code.


                Possible values: `OK`, `UNKNOWN`, `INVALID_ARGUMENT`,
                `DEADLINE_EXCEEDED`, `QUOTA_EXCEEDED`, `NOT_FOUND`,
                `ALREADY_EXISTS`, `PERMISSION_DENIED`, `UNAUTHENTICATED`,
                `RESOURCE_EXHAUSTED`, `FAILED_PRECONDITION`, `ABORTED`,
                `OUT_OF_RANGE`, `UNIMPLEMENTED`, `INTERNAL`, `UNAVAILABLE`,
                `DATA_LOSS`, `FORBIDDEN`, or `UNPROCESSABLE_ENTITY`.
              x-enum:
                - OK
                - UNKNOWN
                - INVALID_ARGUMENT
                - DEADLINE_EXCEEDED
                - QUOTA_EXCEEDED
                - NOT_FOUND
                - ALREADY_EXISTS
                - PERMISSION_DENIED
                - UNAUTHENTICATED
                - RESOURCE_EXHAUSTED
                - FAILED_PRECONDITION
                - ABORTED
                - OUT_OF_RANGE
                - UNIMPLEMENTED
                - INTERNAL
                - UNAVAILABLE
                - DATA_LOSS
                - FORBIDDEN
                - UNPROCESSABLE_ENTITY
              type: string
            message:
              example: >-
                Index name must contain only lowercase alphanumeric characters
                or hyphens, and must not begin or end with a hyphen.
              type: string
            details:
              description: >-
                Additional information about the error. This field is not
                guaranteed to be present.
              type: object
          required:
            - code
            - message
      required:
        - status
        - error
    CostUsageExportError:
      nullable: true
      description: Why an export failed.
      type: object
      properties:
        code:
          example: DEADLINE_EXCEEDED
          description: >-
            Machine-readable classification of the failure. `DEADLINE_EXCEEDED`
            means the export ran out of time and a shorter window may succeed;
            `INTERNAL` covers every other failure and is worth retrying once.

            Possible values: `DEADLINE_EXCEEDED` or `INTERNAL`.
          x-enum:
            - DEADLINE_EXCEEDED
            - INTERNAL
          type: string
        message:
          example: >-
            The export did not finish within the time budget. Create a new
            export, or request a shorter window.
          description: Human-readable explanation of what went wrong and what to try next.
          type: string
      required:
        - code
        - message
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >
        An [access
        token](https://docs.pinecone.io/guides/organizations/manage-service-accounts#retrieve-an-access-token)
        must be provided in the `Authorization` header using the `Bearer`
        scheme.

````