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

# Poll a Thread

> The polling half of create-then-poll. While status is `running`, wait ~30 seconds between polls; faster polling is rate-limited (hard cap 3/s). Readable for any Thread the key can access, including ones shared with the caller, not only Threads it created. Only the target interaction (`interaction_id`, or the latest) carries response/citations; earlier turns are metadata unless requested explicitly.



## OpenAPI

````yaml /openapi.json get /v1/threads/{thread_id}
openapi: 3.1.0
info:
  title: Consensus API
  description: >-
    Search usage is billed in calls: one call per 100 papers returned, rounded
    up, with a minimum of 1 call per request. Usage counts against your plan's
    included monthly calls. Free plans include 30 calls per month, Pro and Teams
    plans include 500, and Deep plans include 2,000. Paid plans with an active
    metered API subscription may continue past the included limit; additional
    calls are billed at $0.05 per call. Enterprise API keys have unlimited
    access.
  version: '1.0'
servers:
  - url: https://api.consensus.app
security: []
paths:
  /v1/threads/{thread_id}:
    get:
      summary: Poll a Thread
      description: >-
        The polling half of create-then-poll. While status is `running`, wait
        ~30 seconds between polls; faster polling is rate-limited (hard cap
        3/s). Readable for any Thread the key can access, including ones shared
        with the caller, not only Threads it created. Only the target
        interaction (`interaction_id`, or the latest) carries
        response/citations; earlier turns are metadata unless requested
        explicitly.
      operationId: v1_get_thread
      parameters:
        - name: thread_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[A-Za-z0-9_-]+$
            description: Opaque Thread id.
            title: Thread Id
          description: Opaque Thread id.
        - name: include_trace
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              Opt in to the textual `agent_trace` per interaction. Off by
              default: the trace is internal agent-graph structure, so shipping
              it only on request keeps a node rename from becoming a breaking
              change.
            default: false
            title: Include Trace
          description: >-
            Opt in to the textual `agent_trace` per interaction. Off by default:
            the trace is internal agent-graph structure, so shipping it only on
            request keeps a node rename from becoming a breaking change.
        - name: interaction_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Hydrate this interaction instead of the latest.
            title: Interaction Id
          description: Hydrate this interaction instead of the latest.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - XApiKeyHeader: []
components:
  schemas:
    ThreadResponse:
      properties:
        thread_id:
          type: string
          title: Thread Id
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        status:
          type: string
          enum:
            - running
            - idle
            - failed
          title: Status
          description: Overall status, mirroring the latest interaction.
        url:
          type: string
          title: Url
          description: Deep-link to the Thread on consensus.app.
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        last_activity_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Activity At
        interactions:
          items:
            $ref: '#/components/schemas/ThreadInteractionResponse'
          type: array
          title: Interactions
      type: object
      required:
        - thread_id
        - status
        - url
        - interactions
      title: ThreadResponse
      description: GET /v1/threads/{thread_id} — the polling half of create-then-poll.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ThreadInteractionResponse:
      properties:
        interaction_id:
          type: string
          title: Interaction Id
        input_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Input Message
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        status:
          type: string
          enum:
            - running
            - idle
            - failed
          title: Status
        mode:
          type: string
          enum:
            - pro
            - deep
            - quick
          title: Mode
        response:
          anyOf:
            - type: string
            - type: 'null'
          title: Response
          description: >-
            Synthesized markdown answer. Each citation marker links to its
            paper: `[N.M]` cites quote M from paper N, and a bare `[N]` cites
            paper N without a quote. Omitted while running, and omitted for
            older interactions unless requested via `interaction_id` (only the
            target interaction is hydrated). Responses use `exclude_none`, so
            absent fields are dropped, not sent as null.
        agent_trace:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Trace
          description: Human-readable log of the agent's steps (`include_trace=true` only).
        citations:
          items:
            $ref: '#/components/schemas/ThreadCitation'
          type: array
          title: Citations
        stats:
          anyOf:
            - $ref: '#/components/schemas/ThreadStats'
            - type: 'null'
      type: object
      required:
        - interaction_id
        - status
        - mode
      title: ThreadInteractionResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ThreadCitation:
      properties:
        'n':
          type: integer
          title: 'N'
          description: >-
            Paper number. `response` cites the paper's quotes as `[n.1]`,
            `[n.2]`, ... (see `snippets[].marker`), and cites it as a bare `[n]`
            where there is no quote.
        paper_id:
          type: string
          title: Paper Id
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        authors:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Authors
        year:
          anyOf:
            - type: integer
            - type: 'null'
          title: Year
        journal:
          anyOf:
            - type: string
            - type: 'null'
          title: Journal
        doi:
          anyOf:
            - type: string
            - type: 'null'
          title: Doi
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: Link to the paper on consensus.app.
        snippets:
          items:
            $ref: '#/components/schemas/ThreadCitationSnippet'
          type: array
          title: Snippets
      type: object
      required:
        - 'n'
        - paper_id
      title: ThreadCitation
    ThreadStats:
      properties:
        retrieved:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retrieved
        screened:
          anyOf:
            - type: integer
            - type: 'null'
          title: Screened
        included:
          anyOf:
            - type: integer
            - type: 'null'
          title: Included
      type: object
      title: ThreadStats
      description: Funnel counts for an interaction's run.
    ThreadCitationSnippet:
      properties:
        marker:
          anyOf:
            - type: string
            - type: 'null'
          title: Marker
          description: >-
            The marker in `response` that cites this quote, without brackets:
            `3.2` is the second distinct quote from paper 3.
        quote:
          anyOf:
            - type: string
            - type: 'null'
          title: Quote
          description: Verbatim quote the agent relied on.
        section:
          anyOf:
            - type: string
            - type: 'null'
          title: Section
          description: Paper section the quote came from.
      type: object
      title: ThreadCitationSnippet
  securitySchemes:
    XApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````

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