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

# Export Metric Results as CSV

> Exports metric results as a CSV file.

By default, with no pagination parameters, the endpoint streams the entire matching result set as a single CSV. To page through results instead, pass `limit` and `starting_after` / `ending_before`. Paginated responses include the `X-Has-More` and `X-Next-Cursor` headers. Up to 100,000 rows can be exported per request in either mode; requests whose total matching set exceeds this cap return a `400` error.



## OpenAPI

````yaml latest.yml GET /agents/metrics/results/export
openapi: 3.0.1
info:
  title: Cartesia API
  version: 0.0.1
servers:
  - url: https://api.cartesia.ai
    description: Production
security: []
paths:
  /agents/metrics/results/export:
    get:
      tags:
        - Agents
      summary: Export Metric Results
      description: >-
        Exports metric results as a CSV file.


        By default, with no pagination parameters, the endpoint streams the
        entire matching result set as a single CSV. To page through results
        instead, pass `limit` and `starting_after` / `ending_before`. Paginated
        responses include the `X-Has-More` and `X-Next-Cursor` headers. Up to
        100,000 rows can be exported per request in either mode; requests whose
        total matching set exceeds this cap return a `400` error.
      operationId: agents_export-metric-results
      parameters:
        - $ref: '#/components/parameters/CartesiaVersionHeader'
        - name: agent_id
          in: query
          description: The ID of the agent.
          required: false
          schema:
            type: string
            nullable: true
        - name: deployment_id
          in: query
          description: The ID of the deployment.
          required: false
          schema:
            type: string
            nullable: true
        - name: metric_id
          in: query
          description: The ID of the metric.
          required: false
          schema:
            type: string
            nullable: true
        - name: call_id
          in: query
          description: The ID of the call.
          required: false
          schema:
            type: string
            nullable: true
        - name: start_date
          in: query
          description: Filter metric results created at or after this RFC 3339 datetime.
          required: false
          schema:
            type: string
            format: date-time
            nullable: true
            example: '2024-04-01T00:00:00Z'
        - name: end_date
          in: query
          description: Filter metric results created before or at this RFC 3339 datetime.
          required: false
          schema:
            type: string
            format: date-time
            nullable: true
            example: '2024-04-30T23:59:59Z'
        - name: limit
          in: query
          description: >-
            The maximum number of rows to return in this CSV page, between 1 and
            1000. Passing this parameter enables paginated mode; omit it (along
            with `starting_after` and `ending_before`) to stream the full result
            set.
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 1000
        - name: starting_after
          in: query
          description: >-
            An opaque pagination cursor. Returns the page of results after this
            cursor. Pass the `X-Next-Cursor` value from the previous page to
            fetch the next page. Treat the cursor as an opaque string. Cannot be
            combined with `ending_before`.
          required: false
          schema:
            type: string
            nullable: true
        - name: ending_before
          in: query
          description: >-
            An opaque pagination cursor. Returns the page of results before this
            cursor. Treat the cursor as an opaque string. Cannot be combined
            with `starting_after`.
          required: false
          schema:
            type: string
            nullable: true
      responses:
        '200':
          description: Successfully exported metric results as a CSV file.
          headers:
            X-Has-More:
              description: >-
                Present only in paginated mode. `"true"` if more results remain
                after this page, otherwise `"false"`.
              schema:
                type: string
                enum:
                  - 'true'
                  - 'false'
            X-Next-Cursor:
              description: >-
                Present only in paginated mode when `X-Has-More` is `"true"`. An
                opaque cursor to pass as `starting_after` to fetch the next
                page. Treat it as an opaque string.
              schema:
                type: string
          content:
            text/csv:
              schema:
                type: string
                format: binary
        '400':
          description: >-
            More than 100k metric results found for the given filters. Please
            narrow down the filters to export less than 100k results.
        '404':
          description: No metric results found for the given filters.
      security:
        - APIKeyAuth: []
components:
  parameters:
    CartesiaVersionHeader:
      name: Cartesia-Version
      in: header
      description: API version header.
      required: true
      schema:
        type: string
        format: date
        example: '2026-03-01'
        enum:
          - '2026-03-01'
  securitySchemes:
    APIKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Cartesia API key (`sk_car_...`). Get one at
        [play.cartesia.ai/keys](https://play.cartesia.ai/keys).

````