> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/dsx-air/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/dsx-air/_mcp/server.

# Generate a billing-records CSV report for an NGC organization

POST https://api.dsx-air.nvidia.com/api/v3/billing-records/csv-report/
Content-Type: application/json

Generate a billing-records CSV report for a given `query`. The CSV columns are chosen via `columns` in the payload. Any query parameter accepted by the `list` endpoint may be used in the `query` of the payload. Returns a time-limited `report_link` to download the report.

**Required role:** `air_org_admin`

Reference: https://docs.nvidia.com/dsx-air/api-reference/billing/api-v-3-billing-records-csv-report-create

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects an object.

- `columns` (list of object, required) — Columns to include in the CSV, in order. At least one is required.
  - `field` (enum, required) — Billing record field to include as a column. * `id` - id * `created` - created * `modified` - modified * `org_id` - org_id * `org_display_name` - org_display_name * `org_nca_id` - org_nca_id * `ngc_org_name` - ngc_org_name * `org_is_banned` - org_is_banned * `simulation_uuid` - simulation_uuid * `sim_name` - sim_name * `sim_creator` - sim_creator * `sim_owner` - sim_owner * `sim_cpu` - sim_cpu * `sim_memory` - sim_memory * `sim_storage` - sim_storage * `sim_compute_hours_rate` - sim_compute_hours_rate * `sim_compute_hours_consumed` - sim_compute_hours_consumed * `sim_compute_hours_consumed_for_period` - sim_compute_hours_consumed_for_period * `run_id` - run_id * `billing_started_at` - billing_started_at * `billing_ended_at` - billing_ended_at * `fleet_id` - fleet_id * `fleet_name` - fleet_name
    - Allowed values: `id`, `created`, `modified`, `org_id`, `org_display_name`, `org_nca_id`, `ngc_org_name`, `org_is_banned`, `simulation_uuid`, `sim_name`, `sim_creator`, `sim_owner`, `sim_cpu`, `sim_memory`, `sim_storage`, `sim_compute_hours_rate`, `sim_compute_hours_consumed`, `sim_compute_hours_consumed_for_period`, `run_id`, `billing_started_at`, `billing_ended_at`, `fleet_id`, `fleet_name`
  - `name` (string, optional) — Header label for the column. Defaults to `field` when omitted.
- `query` (object, optional) — Filter, `ordering`, and `search` parameters keyed like the `list` endpoint. The `query` object from the billing summary response can be posted here as-is.
  - `ngc_org_name` (string, optional) — Filter by the NGC organization name of the billed organization.
  - `org_is_banned` (boolean, optional) — Filter by whether the organization is banned.
  - `period_start` (datetime, optional) — Specify the start of a window to filter billing records. Example: 2026-01-01T00:00:00Z
  - `period_end` (datetime, optional) — Specify the end of a window to filter billing records. Example: 2026-01-31T23:59:59Z
  - `id` (string, optional) — Filter by billing record ID.
  - `created` (datetime, optional) — Filter by when the record was created. A date-only value (YYYY-MM-DD) matches all records on that calendar day. A full datetime matches that exact timestamp.
  - `modified` (datetime, optional) — Filter by when the record was last modified. A date-only value (YYYY-MM-DD) matches all records on that calendar day. A full datetime matches that exact timestamp.
  - `simulation_uuid` (string, optional) — Filter by simulation ID.
  - `sim_name` (string, optional) — Filter by simulation name.
  - `sim_creator` (string, optional) — Filter by creator of the simulation.
  - `sim_owner` (string, optional) — Filter by owner of the simulation. Same as the creator unless the sim is assigned to someone else.
  - `sim_cpu` (double, optional) — Filter by total CPU allocated across all nodes while the sim was running.
  - `sim_memory` (double, optional) — Filter by total memory (MiB) allocated across all nodes while the sim was running.
  - `sim_storage` (double, optional) — Filter by total storage (GB) allocated across all nodes while the sim was running.
  - `sim_compute_hours_rate` (double, optional) — Filter by compute-hours rate applied while the sim was running.
  - `sim_compute_hours_consumed` (double, optional) — Filter by total compute hours consumed.
  - `sim_compute_hours_consumed_for_period` (double, optional) — Filter by compute hours consumed for the requested period.
  - `run_id` (string, optional) — Filter by the run ID the billing record corresponds to.
  - `billing_started_at` (datetime, optional) — Filter by when this billing window began. A date-only value (YYYY-MM-DD) matches all records that began on that calendar day. A full datetime matches that exact timestamp.
  - `billing_ended_at` (datetime, optional) — Filter by when this billing window ended. A date-only value (YYYY-MM-DD) matches all records that ended on that calendar day. A full datetime matches that exact timestamp.
  - `billing_ended_at_isnull` (boolean, optional) — Filter by whether the billing record has an end time.
  - `fleet_id` (string, optional) — Filter by the fleet ID running the sim.
  - `fleet_name` (string, optional) — Filter by the fleet name running the sim.
  - `ordering` (enum, optional) — Field to order by; prefix with `-` for descending. Combine multiple fields with commas to break ties, applied in order (e.g. `-billing_ended_at,-billing_started_at`, the default). Unknown fields are ignored. * `created` - created * `modified` - modified * `sim_name` - sim_name * `sim_creator` - sim_creator * `sim_owner` - sim_owner * `billing_started_at` - billing_started_at * `billing_ended_at` - billing_ended_at * `sim_cpu` - sim_cpu * `sim_memory` - sim_memory * `sim_storage` - sim_storage * `sim_compute_hours_rate` - sim_compute_hours_rate * `fleet_name` - fleet_name * `org_display_name` - org_display_name * `org_is_banned` - org_is_banned * `ngc_org_name` - ngc_org_name * `sim_compute_hours_consumed` - sim_compute_hours_consumed * `sim_compute_hours_consumed_for_period` - sim_compute_hours_consumed_for_period * `-created` - -created * `-modified` - -modified * `-sim_name` - -sim_name * `-sim_creator` - -sim_creator * `-sim_owner` - -sim_owner * `-billing_started_at` - -billing_started_at * `-billing_ended_at` - -billing_ended_at * `-sim_cpu` - -sim_cpu * `-sim_memory` - -sim_memory * `-sim_storage` - -sim_storage * `-sim_compute_hours_rate` - -sim_compute_hours_rate * `-fleet_name` - -fleet_name * `-org_display_name` - -org_display_name * `-org_is_banned` - -org_is_banned * `-ngc_org_name` - -ngc_org_name * `-sim_compute_hours_consumed` - -sim_compute_hours_consumed * `-sim_compute_hours_consumed_for_period` - -sim_compute_hours_consumed_for_period
    - Allowed values: `created`, `modified`, `sim_name`, `sim_creator`, `sim_owner`, `billing_started_at`, `billing_ended_at`, `sim_cpu`, `sim_memory`, `sim_storage`, `sim_compute_hours_rate`, `fleet_name`, `org_display_name`, `org_is_banned`, `ngc_org_name`, `sim_compute_hours_consumed`, `sim_compute_hours_consumed_for_period`, `-created`, `-modified`, `-sim_name`, `-sim_creator`, `-sim_owner`, `-billing_started_at`, `-billing_ended_at`, `-sim_cpu`, `-sim_memory`, `-sim_storage`, `-sim_compute_hours_rate`, `-fleet_name`, `-org_display_name`, `-org_is_banned`, `-ngc_org_name`, `-sim_compute_hours_consumed`, `-sim_compute_hours_consumed_for_period`
  - `search` (string, optional) — Free-text search, matched like the `list` endpoint `search` param.

## Response

### 201

- `report_link` (string, required) — Presigned, time-limited URL to download the generated CSV.
- `record_count` (integer, required) — Number of billing records written to the CSV.
- `filename` (string, required) — Suggested filename for the downloaded CSV.
- `columns` (list of string, required) — Resolved column header labels, in order.
- `generated_at` (datetime, required) — When the export was generated.
- `expires_at` (datetime, required) — When `report_link` stops working.

## Errors

### 400 Bad Request Error

- `detail` (string, required) — Description of an error.
- `request_id` (string, required, nullable) — ID assigned to the request which encountered the error. Should be provided when opening a support case.
- `type` (enum, required) — Specific type of a 400 error. * `PROTECTED` - Instance may not be deleted as it is being referenced by other instances. * `VALIDATION` - Validation errors encountered during payload processing.
  - Allowed values: `PROTECTED`, `VALIDATION`
- `protected_instances` (list of object, optional) — Instances which bar the current instance from being deleted. Only defined when `type` is set to `PROTECTED`.
  - `id` (string, required) — ID of the instance.
  - `type` (string, required) — Type of the instance.
- `validation_errors` (map from string to list of object or object or map from string to any or list of object, optional) — Validation errors encountered during payload processing. Only defined when `type` is set to `VALIDATION`.

### 403 Forbidden Error

- `detail` (string, required) — Description of an error.
- `request_id` (string, required, nullable) — ID assigned to the request which encountered the error. Should be provided when opening a support case.

### 500 Internal Server Error

- `request_id` (string, required, nullable) — ID assigned to the request which encountered the error. Should be provided when opening a support case.
- `code` (string, required) — Error code which identifies the error. Should be provided when opening a support case.
- `detail` (string, optional, default: An unexpected error has occurred. Please contact NVIDIA Air support for further assistance.) — Description of an error.

## Examples

**Request**

```json
{
  "columns": [
    {
      "field": "id"
    }
  ]
}
```

**Response**

```json
{
  "report_link": "string",
  "record_count": 1,
  "filename": "string",
  "columns": [
    "string"
  ],
  "generated_at": "2024-01-15T09:30:00Z",
  "expires_at": "2024-01-15T09:30:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://api.dsx-air.nvidia.com/api/v3/billing-records/csv-report/"

payload = { "columns": [{ "field": "id" }] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.dsx-air.nvidia.com/api/v3/billing-records/csv-report/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"columns":[{"field":"id"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.dsx-air.nvidia.com/api/v3/billing-records/csv-report/"

	payload := strings.NewReader("{\n  \"columns\": [\n    {\n      \"field\": \"id\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.dsx-air.nvidia.com/api/v3/billing-records/csv-report/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"columns\": [\n    {\n      \"field\": \"id\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.dsx-air.nvidia.com/api/v3/billing-records/csv-report/")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"columns\": [\n    {\n      \"field\": \"id\"\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.dsx-air.nvidia.com/api/v3/billing-records/csv-report/', [
  'body' => '{
  "columns": [
    {
      "field": "id"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.dsx-air.nvidia.com/api/v3/billing-records/csv-report/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"columns\": [\n    {\n      \"field\": \"id\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["columns": [["field": "id"]]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.dsx-air.nvidia.com/api/v3/billing-records/csv-report/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```