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

# Invoices

> Manage invoices and billing

## List Invoices

<ParamField path="GET" type="string" required>
  /v1/invoices
</ParamField>

List all invoices.

<ResponseField name="invoices" type="array">
  List of invoices
</ResponseField>

<RequestExample>
  ```bash theme={null}
  curl -X GET https://api.valmi.io/v1/invoices \
    -H "Authorization: Bearer sk_api_abc123xyz"
  ```
</RequestExample>

## Generate Invoice

<ParamField path="POST" type="string" required>
  /v1/invoices/generate
</ParamField>

Generate invoices for a billing period.

### Body

<ParamField body="account_id" type="string">
  Account ID (optional, generates for all if not provided)
</ParamField>

<ParamField body="billing_period" type="string" required>
  Billing period (YYYY-MM)
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X POST https://api.valmi.io/v1/invoices/generate \
    -H "Authorization: Bearer sk_api_abc123xyz" \
    -H "Content-Type: application/json" \
    -d '{
      "billing_period": "2024-01"
    }'
  ```
</RequestExample>
