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

# Download Agent Run Templated Output

> Download an Agent Run into a [Templated Output](/templated-outputs)

export const limit_0 = 60

<Info>
  **Rate Limit:** This endpoint is limited to **{limit_0.toLocaleString()} requests per minute** per user.
</Info>


## OpenAPI

````yaml openapi.json POST /api/v1/client/agents/{agent_id}/runs/{run_id}/templated-output
openapi: 3.1.0
info:
  title: kolena
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/client/agents/{agent_id}/runs/{run_id}/templated-output:
    post:
      tags:
        - client
        - agents
      summary: Client Get Templated Output
      operationId: >-
        client_get_templated_output_api_v1_client_agents__agent_id__runs__run_id__templated_output_post
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: integer
            title: Agent Id
        - name: run_id
          in: path
          required: true
          schema:
            type: integer
            title: Run Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplatedOutputRequest'
      responses:
        '200':
          description: Returns the templated output file for download
          content:
            application/pdf:
              schema:
                type: string
                format: binary
            application/vnd.openxmlformats-officedocument.wordprocessingml.document:
              schema:
                type: string
                format: binary
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
              schema:
                type: string
                format: binary
            application/vnd.ms-excel.sheet.macroEnabled.12:
              schema:
                type: string
                format: binary
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    TemplatedOutputRequest:
      properties:
        output_template_id:
          type: integer
          title: Output Template Id
          description: The ID of the output template to use.
        output_format:
          $ref: '#/components/schemas/OutputFormat'
          description: >-
            The format to download the templated output in. For Word templates,
            `docx` and `pdf` are allowed. For Excel templates, `xlsx`, `xlsm`,
            and `csv` are allowed. Note: `csv` will export the first worksheet
            of the Excel template only.
      type: object
      required:
        - output_template_id
        - output_format
      title: TemplatedOutputRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OutputFormat:
      type: string
      enum:
        - pdf
        - docx
        - xlsx
        - xlsm
        - csv
      title: OutputFormat
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`. The `<token>`
        represents your API key, which must be acquired from the Kolena
        platform.

````