GET/api/orgs/{org_id}/spend/builds/{build_id}/export

Export a completed build as CSV

Same CSV contract as POST /spend/export, for the build's query. API keys need provisioning strength.

Authentication: Bearer API key in the Authorization header

Path parameters

  • org_idstringrequired

    Your organization id (uuid). GET /api/whoami returns it.

  • build_idstringrequired

    Build id returned by POST /spend/builds.

Responses

  • 200

    Complete grouped CSV (not request-level rows): exact dollar columns with 9 decimals, the accepted query, cutoff and measure definitions. Served as an attachment spend.csv, Cache-Control: private, no-store.

  • 401

    Missing, unknown or revoked API key.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 403

    The key is not a provisioning key (inference keys are refused on every Spend route, reads included), or it is a customer-plan key.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 404

    Unknown handle, or the org is not the key's own organization.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 409

    The build is not completed yet; poll GET /builds/{build_id}.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 410

    The build expired (24 hours after issue). Refresh.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 422

    Body failed schema validation, or the export exceeds 10,000 groups or 16 MiB.

  • 503

    Reporting is unavailable, initializing, or the bounded read timed out. Not empty data; retry or narrow the range.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

Request

curl https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/spend/builds/8d2f1c6a-3e4b-4a7d-b9e0-5c1f2a7d8e30/export \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

"group","label","basis","count","rejected_count","errors","input_tokens","output_tokens","cached_input_tokens","reasoning_tokens","spend_usd","paid_usd","byok_estimated_usd","free_list_value_usd","unknown_usage_count","from","to_exclusive","time_zone","as_of","query","row_kind","group_by","tag_key","projected_through","count_definition","errors_definition","rejected_count_definition","prompt_group_definition","spend_definition"
"gpt-6-luna","gpt-6-luna","requests","11030","20","101","61200000","5102000","38100000","1840000","29.880000000","29.880000000","0.000000000","0.000000000","0","2026-11-01T00:00:00+00:00","2026-11-08T00:00:00+00:00","UTC","2026-11-19T14:02:11.418000+00:00","{...}","aggregate_group","model","","2026-11-08T00:00:00+00:00","Settled customer requests; not a successful-completion count","Non-completed requests: status != completed; rejections are included","Subset with zero attempts and status failed or expired_before_dispatch; cancellations are not rejections","SHA-256 of system/developer content and tool declarations; not full payload, request or session; label shows 12 characters","paid_usd + byok_estimated_usd + free_list_value_usd; only paid_usd is charged credits; excludes pending holds"

https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/spend/builds/8d2f1c6a-3e4b-4a7d-b9e0-5c1f2a7d8e30/export