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

# Export stored model responses

> Download every model response stored on a completed or partial run as UTF-8 JSONL. Each line is one model. text is the complete stored response, or null. Save the file for your own analysis. Do not load the whole panel into an AI agent's context. To inspect one finding, use /responses and /responses/text instead. This read does not start research, call a provider, or charge credits.



## OpenAPI

````yaml https://seneca-research.fly.dev/v1/openapi.json get /v1/research/{run_id}/responses/export
openapi: 3.1.0
info:
  title: Seneca Research API
  version: 0.1.0
  description: >-
    Create a research run, poll it, then read the customer report. Original
    model text is a separate read: list /v1/research/{run_id}/responses, read
    one model at /v1/research/{run_id}/responses/text, or download the panel as
    JSONL from /v1/research/{run_id}/responses/export. Send Authorization:
    Bearer seneca_sk_… Narrative quickstart:
    https://seneca.professionalaiagents.com/api.md
servers:
  - url: https://seneca-research.fly.dev
    description: Production
security: []
paths:
  /v1/research/{run_id}/responses/export:
    get:
      tags:
        - public-api
      summary: Export stored model responses
      description: >-
        Download every model response stored on a completed or partial run as
        UTF-8 JSONL. Each line is one model. text is the complete stored
        response, or null. Save the file for your own analysis. Do not load the
        whole panel into an AI agent's context. To inspect one finding, use
        /responses and /responses/text instead. This read does not start
        research, call a provider, or charge credits.
      operationId: export_research_responses_v1_research__run_id__responses_export_get
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Run Id
      responses:
        '200':
          description: >-
            UTF-8 JSONL attachment, one stored model response per line. The body
            is not a JSON array. Each line matches
            PublicModelResponseExportRecord. text is the complete persisted
            response, or null.
          headers:
            Content-Disposition:
              description: attachment; filename="seneca-{run_id}-responses.jsonl"
              schema:
                type: string
          content:
            application/x-ndjson:
              schema:
                $ref: '#/components/schemas/PublicModelResponseExportRecord'
        '401':
          description: >-
            authentication_required when the bearer token is missing or not a
            bearer token. invalid_api_key when the key is unknown, revoked, or
            expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponse'
        '404':
          description: run_not_found. Another workspace's run is also run_not_found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponse'
        '409':
          description: >-
            responses_not_ready while the run is queued, running, or
            synthesizing. research_failed when the run finished without a
            completed or partial panel.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponse'
        '429':
          description: >-
            rate_limit_exceeded. Reads are limited to 120 requests per minute
            per key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponse'
        '500':
          description: internal_error. The body does not include a traceback or a secret.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponse'
      security:
        - SenecaApiKey: []
      x-codeSamples:
        - lang: javascript
          label: JavaScript
          source: |
            const response = await fetch(
              `https://seneca-research.fly.dev/v1/research/${runId}/responses/export`,
              {
                headers: { Authorization: `Bearer ${process.env.SENECA_API_KEY}` },
              },
            )
            if (!response.ok) {
              throw new Error(await response.text())
            }
            const jsonl = await response.text()
            const rows = jsonl
              .split("\n")
              .filter(Boolean)
              .map((line) => JSON.parse(line))
components:
  schemas:
    PublicModelResponseExportRecord:
      properties:
        model_id:
          type: string
          title: Model Id
          description: Model id stored on this run. A retired model keeps this id.
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
          description: >-
            Name frozen on the run's panel snapshot. Null when the snapshot has
            none.
        laboratory:
          anyOf:
            - type: string
            - type: 'null'
          title: Laboratory
          description: >-
            Laboratory name frozen on the panel snapshot. Null when the snapshot
            has none.
        status:
          type: string
          title: Status
          description: success, error, or timeout.
        input_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Input Tokens
        output_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Output Tokens
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
          description: >-
            Complete original response stored for this model. Null when no text
            was stored. This export does not apply the 32000-character window
            used by the single-model read.
      additionalProperties: false
      type: object
      required:
        - model_id
        - status
      title: PublicModelResponseExportRecord
      description: One JSONL line in a full-panel export. text is not windowed.
    PublicErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/PublicErrorObject'
      additionalProperties: false
      type: object
      required:
        - error
      title: PublicErrorResponse
      description: Error envelope returned by every /v1 failure. Documentation model only.
    PublicErrorObject:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        details:
          additionalProperties: true
          type: object
          title: Details
      additionalProperties: false
      type: object
      required:
        - code
        - message
      title: PublicErrorObject
  securitySchemes:
    SenecaApiKey:
      type: http
      description: >-
        Workspace API key created while signed in on the Developers page. Send
        Authorization: Bearer seneca_sk_… A Clerk session token is not accepted.
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.