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

# Get Block Stream Url

> This endpoint returns a URL that can be used to stream real-time updatesfor a
specific block in a tool run.

The URL contains a token that is valid for a limited time (1 hour).

The client can use the returned URL with an EventSource connection to receive
real-time updates for the specified block. This url is safe to use in a
frontend application.



## OpenAPI

````yaml https:/api.hunch.tools/openapi.json post /v1beta2/tool/get-block-stream-url
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.hunch.tools
security: []
paths:
  /v1beta2/tool/get-block-stream-url:
    post:
      tags:
        - Tools
      summary: Get Block Stream Url
      description: >-
        This endpoint returns a URL that can be used to stream real-time
        updatesfor a

        specific block in a tool run.


        The URL contains a token that is valid for a limited time (1 hour).


        The client can use the returned URL with an EventSource connection to
        receive

        real-time updates for the specified block. This url is safe to use in a

        frontend application.
      operationId: get_block_stream_url
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetBlockStreamUrlRequest'
              examples:
                - tool_run_uid: abc123
                  block_title: Results
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBlockStreamUrlResponse'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPBadRequestError'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPUnauthorizedError'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPForbiddenError'
          description: Forbidden
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '456':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPExposedError'
          description: Additional Response
      security:
        - HTTPBearer: []
components:
  schemas:
    GetBlockStreamUrlRequest:
      properties:
        tool_run_uid:
          type: string
          title: Tool Run Uid
          description: The unique identifier of the tool run
        block_title:
          type: string
          title: Block Title
          description: The title of the block to stream
      type: object
      required:
        - tool_run_uid
        - block_title
      title: GetBlockStreamUrlRequest
      description: >-
        The request body used to get a signed URL for streaming a block's
        output.
    GetBlockStreamUrlResponse:
      properties:
        stream_url:
          type: string
          title: Stream Url
          description: The signed URL that can be used to stream the block's output
      type: object
      required:
        - stream_url
      title: GetBlockStreamUrlResponse
      description: >-
        The response body returned when requesting a signed URL for streaming a
        block's output.
    HTTPBadRequestError:
      properties:
        detail:
          type: string
          title: Detail
      additionalProperties: false
      type: object
      required:
        - detail
      title: HTTPBadRequestError
    HTTPUnauthorizedError:
      properties:
        detail:
          type: string
          title: Detail
      additionalProperties: false
      type: object
      required:
        - detail
      title: HTTPUnauthorizedError
    HTTPForbiddenError:
      properties:
        detail:
          type: string
          title: Detail
      additionalProperties: false
      type: object
      required:
        - detail
      title: HTTPForbiddenError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    HTTPExposedError:
      properties:
        severity:
          $ref: '#/components/schemas/Severity'
          default: error
        title:
          type: string
          title: Title
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
      additionalProperties: false
      type: object
      required:
        - title
      title: HTTPExposedError
      description: >-
        An error that is exposed to the frontend via the API that can be
        rendered as

        a notification.
    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
    Severity:
      type: string
      enum:
        - error
        - warning
        - info
      title: Severity
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````