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

# Get Summary Analytics

> Retrieve high-level totals for calls, spend, and credits.

Fetches aggregated totals across your entire account for a given time period. You can optionally filter the results to a specific agent.

### Query Parameters

<ParamField query="start_date" type="string">
  Start date in `YYYY-MM-DD` format. Defaults to 30 days ago.
</ParamField>

<ParamField query="end_date" type="string">
  End date in `YYYY-MM-DD` format. Defaults to today.
</ParamField>

<ParamField query="start_datetime" type="string">
  Start exact time in ISO 8601 format (e.g. `2024-03-01T14:30:00Z`). Overrides `start_date` and changes data granularity to minutes.
</ParamField>

<ParamField query="end_datetime" type="string">
  End exact time in ISO 8601 format. Overrides `end_date`.
</ParamField>

<ParamField query="agent_id" type="string">
  Filter the summary to only include data for a specific agent.
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  Indicates whether the request was successful.
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="period" type="object">
      The actual time period used for the query, containing `start` and `end` strings.
    </ResponseField>

    <ResponseField name="calls" type="object">
      <Expandable title="properties">
        <ResponseField name="total" type="integer">Total number of calls initiated.</ResponseField>
        <ResponseField name="completed" type="integer">Number of calls that completed successfully.</ResponseField>
        <ResponseField name="failed" type="integer">Number of calls that failed or encountered errors.</ResponseField>
        <ResponseField name="avg_duration_seconds" type="number">Average duration of calls in seconds.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="spend" type="object">
      <Expandable title="properties">
        <ResponseField name="total_credits" type="number">Total platform credits consumed.</ResponseField>
        <ResponseField name="total_usd" type="number">Estimated equivalent cost in USD.</ResponseField>

        <ResponseField name="by_component" type="object">
          Breakdown of costs across pipeline components: `llm_input`, `llm_output`, `tts`, `stt`, `telephony`, and `platform_fee`.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="credits" type="object">
      <Expandable title="properties">
        <ResponseField name="added" type="number">Total credits added to the account during this period.</ResponseField>
        <ResponseField name="used" type="number">Total credits consumed during this period.</ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>
