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

# Usage Export API

> Programmatically export usage and credit data from your Reducto account

The Usage Export API returns the same usage data available on the [Studio usage dashboard](/studio-account#usage), accessible programmatically via your PropelAuth API key.

## Authentication

Authenticate with a Bearer token using your PropelAuth API key from [Studio API Keys](https://studio.reducto.ai/):

```bash theme={null}
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://studio.reducto.ai/api/v1/usage/export"
```

This is your personal API key from the Studio API Keys page, not the `REDUCTO_API_KEY` used for document processing.

## Endpoint

```
GET https://studio.reducto.ai/api/v1/usage/export
```

## Query Parameters

| Parameter   | Type     | Default       | Description                                                                         |
| ----------- | -------- | ------------- | ----------------------------------------------------------------------------------- |
| `startDate` | `string` | 30 days ago   | Start date in `yyyy-mm-dd` format                                                   |
| `endDate`   | `string` | Today         | End date in `yyyy-mm-dd` format                                                     |
| `groupBy`   | `string` | `product`     | Dimension to group results by. One of: `product`, `feature`, `api_key`, `file_type` |
| `orgId`     | `string` | API key's org | Target organization ID. Required if your account belongs to multiple organizations. |
| `product`   | `string` | (none)        | Filter by product. Repeatable for multiple values.                                  |
| `feature`   | `string` | (none)        | Filter by feature. Repeatable for multiple values.                                  |
| `apiKey`    | `string` | (none)        | Filter by API key. Repeatable for multiple values.                                  |
| `fileType`  | `string` | (none)        | Filter by file type. Repeatable for multiple values.                                |

## Response

```json theme={null}
{
  "orgId": "org_abc123",
  "startDate": "2026-05-19",
  "endDate": "2026-06-18",
  "groupBy": "product",
  "data": [
    {
      "date": "2026-05-19",
      "group": "parse",
      "credits": 150.0,
      "requestCount": 75
    },
    {
      "date": "2026-05-19",
      "group": "extract",
      "credits": 80.0,
      "requestCount": 20
    }
  ]
}

```

Each entry in `data` represents one day and one group value. `credits` is the total credits consumed and `requestCount` is the number of API requests made.

## Examples

### Default: last 30 days grouped by product

<CodeGroup>
  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://studio.reducto.ai/api/v1/usage/export",
      headers={"Authorization": "Bearer YOUR_API_KEY"},
  )
  data = response.json()

  for row in data["data"]:
      print(f"{row['date']} | {row['group']}: {row['credits']} credits, {row['requestCount']} requests")
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://studio.reducto.ai/api/v1/usage/export",
    { headers: { Authorization: "Bearer YOUR_API_KEY" } }
  );
  const data = await response.json();

  for (const row of data.data) {
    console.log(`${row.date} | ${row.group}: ${row.credits} credits, ${row.requestCount} requests`);
  }
  ```

  ```bash cURL theme={null}
  curl -H "Authorization: Bearer YOUR_API_KEY" \
    "https://studio.reducto.ai/api/v1/usage/export"
  ```
</CodeGroup>

### Custom date range grouped by file type

<CodeGroup>
  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://studio.reducto.ai/api/v1/usage/export",
      headers={"Authorization": "Bearer YOUR_API_KEY"},
      params={
          "startDate": "2026-06-01",
          "endDate": "2026-06-15",
          "groupBy": "file_type",
      },
  )
  data = response.json()
  ```

  ```javascript Node.js theme={null}
  const params = new URLSearchParams({
    startDate: "2026-06-01",
    endDate: "2026-06-15",
    groupBy: "file_type",
  });

  const response = await fetch(
    `https://studio.reducto.ai/api/v1/usage/export?${params}`,
    { headers: { Authorization: "Bearer YOUR_API_KEY" } }
  );
  const data = await response.json();
  ```

  ```bash cURL theme={null}
  curl -H "Authorization: Bearer YOUR_API_KEY" \
    "https://studio.reducto.ai/api/v1/usage/export?startDate=2026-06-01&endDate=2026-06-15&groupBy=file_type"
  ```
</CodeGroup>

### Filter by specific products

Use repeatable query parameters to filter results:

<CodeGroup>
  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://studio.reducto.ai/api/v1/usage/export",
      headers={"Authorization": "Bearer YOUR_API_KEY"},
      params=[
          ("groupBy", "feature"),
          ("product", "parse"),
          ("product", "extract"),
      ],
  )
  data = response.json()
  ```

  ```javascript Node.js theme={null}
  const params = new URLSearchParams();
  params.append("groupBy", "feature");
  params.append("product", "parse");
  params.append("product", "extract");

  const response = await fetch(
    `https://studio.reducto.ai/api/v1/usage/export?${params}`,
    { headers: { Authorization: "Bearer YOUR_API_KEY" } }
  );
  const data = await response.json();
  ```

  ```bash cURL theme={null}
  curl -H "Authorization: Bearer YOUR_API_KEY" \
    "https://studio.reducto.ai/api/v1/usage/export?groupBy=feature&product=parse&product=extract"
  ```
</CodeGroup>

## Multi-Organization Access

If your account belongs to multiple organizations, pass the `orgId` parameter to specify which organization's usage to retrieve. Without it, the API defaults to the organization associated with your API key.

```bash theme={null}
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://studio.reducto.ai/api/v1/usage/export?orgId=org_abc123"
```

You can only query organizations you are a member of. Requesting an org you don't belong to returns a `403` error.

## Error Responses

| Status | Meaning                                    |
| ------ | ------------------------------------------ |
| `401`  | Missing or invalid API key                 |
| `400`  | Invalid `groupBy` value                    |
| `403`  | Not a member of the requested organization |
| `500`  | Server error                               |

## Related

<CardGroup cols={2}>
  <Card title="Credit Usage" icon="coins" href="/reference/credit-usage">
    How credits are calculated per endpoint.
  </Card>

  <Card title="Account & Settings" icon="gear" href="/studio-account">
    Manage API keys, usage alerts, and billing in Studio.
  </Card>
</CardGroup>
