---
title: costs
description: Inspect credit costs by date range.
canonical_url: https://orchestor.io/docs/en/cli/cost
markdown_url: https://orchestor.io/docs/en/cli/cost.md
contentType: reference
---

# costs

`orc costs get` retrieves daily credit cost buckets for the target Workspace. Use `--group-by cost_type` to split by cost type.

`--start-time` is a required inclusive RFC 3339 timestamp. `--end-time` is exclusive and must follow the start. The range cannot exceed 90 days. When omitted, the end defaults to the current time of each request; supply it explicitly to keep the range fixed while paging.

## Usage

```bash title="terminal"
orc costs get --start-time 2026-09-01T00:00:00Z --end-time 2026-10-01T00:00:00Z
```

*Retrieve a fixed interval.*

## Aggregation and pagination

Omitting grouping aggregates matching records within each bucket. Group fields whose stored value is null are omitted from results. Pass returned `--cursor` values unchanged, retaining the range, filters, and grouping.

## Subcommands

### `get`

Costs support daily `1d` buckets only. Group by `cost_type`.

```bash title="terminal"
orc costs get [options]
```

#### Unique options

##### `--start-time`

Inclusive lower bound for usage records, as an RFC 3339 timestamp. Required. The range from start_time to end_time cannot exceed 90 days.

Type: `string`. Required.

```bash title="terminal"
orc costs get --start-time <value>
```

##### `--end-time`

Exclusive upper bound for usage records. Must be after start_time. Defaults to the time of each request; set it explicitly to keep a fixed range across pages.

Type: `string`. Optional.

```bash title="terminal"
orc costs get --end-time <value>
```

##### `--bucket-width`

Cost reports support daily buckets only. Defaults to 1d.; enum: 1d

Type: `string`. Optional.

```bash title="terminal"
orc costs get --bucket-width <value>
```

##### `--group-by`

Split each time bucket by cost_type. Omit to aggregate all matching records in each bucket. Use repeated HTTP query parameters. A grouping field is omitted from a result when its stored value is null.; csv of: cost_type

Type: `string`. Optional.

```bash title="terminal"
orc costs get --group-by <value>
```

## Examples

### Retrieve JSON by cost type.

```bash title="terminal"
orc costs get --start-time 2026-09-01T00:00:00Z --end-time 2026-10-01T00:00:00Z --group-by cost_type --json
```

*Retrieve JSON by cost type.*

## Permissions

Authenticate and select the target Workspace. Access to that Workspace is required.

## Global Options

The following [global options](https://orchestor.io/docs/cli/global-flags.md) can be used with `orc costs`:

- [`--help`](https://orchestor.io/docs/cli/global-flags.md#help)
- [`--workspace`](https://orchestor.io/docs/cli/global-flags.md#workspace)
- [`--json`](https://orchestor.io/docs/cli/global-flags.md#json-output)
- [`--pretty`](https://orchestor.io/docs/cli/global-flags.md#json-output)
- [`--format`](https://orchestor.io/docs/cli/global-flags.md#output-format)
- [`--field`](https://orchestor.io/docs/cli/global-flags.md#field-selection)
- [`--fields`](https://orchestor.io/docs/cli/global-flags.md#field-selection)
- [`--raw`](https://orchestor.io/docs/cli/global-flags.md#raw-output)
- [`--output`](https://orchestor.io/docs/cli/global-flags.md#file-output)
- [`--no-pager`](https://orchestor.io/docs/cli/global-flags.md#pager)
- [`--dry-run`](https://orchestor.io/docs/cli/global-flags.md#dry-run)
- [`--yes`](https://orchestor.io/docs/cli/global-flags.md#confirmation)
- [`--limit`](https://orchestor.io/docs/cli/global-flags.md)
- [`--cursor`](https://orchestor.io/docs/cli/global-flags.md)
- [`--stdin`](https://orchestor.io/docs/cli/global-flags.md#standard-input)
- [`--from-stdin`](https://orchestor.io/docs/cli/global-flags.md#standard-input)
- [`--page-all`](https://orchestor.io/docs/cli/global-flags.md#all-pages)
- [`--timing`](https://orchestor.io/docs/cli/global-flags.md#request-timing)
- [`--readonly`](https://orchestor.io/docs/cli/global-flags.md#read-only-mode)
- [`--wrap-untrusted`](https://orchestor.io/docs/cli/global-flags.md#untrusted-content-wrapping)

For details and examples, see [global options](https://orchestor.io/docs/cli/global-flags.md).

---

[Documentation index](https://orchestor.io/docs/llms.txt)
