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

# Stream Text Chat Session

> Create a text session through a server-sent event response. Read event frames through completion and handle terminal errors; the initial HTTP response does not prove a completed turn.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/workflow/{workflow_id}/text-chat/sessions/stream
openapi: 3.1.0
info:
  title: Athena API
  version: 1.0.0
  description: >-
    Hosted Athena customer API. Authenticate backend management and call-trigger
    requests with X-API-Key. Website embeds and artifact playback use their own
    scoped tokens. Provider availability, feature settings, and verification
    limits are described in the guides.
servers:
  - url: https://athena.tryopencomputer.com
    description: Hosted Athena API
security: []
paths:
  /api/v1/workflow/{workflow_id}/text-chat/sessions/stream:
    post:
      tags:
        - Workflow
      summary: Stream Text Chat Session
      description: >-
        Create a text session through a server-sent event response. Read event
        frames through completion and handle terminal errors; the initial HTTP
        response does not prove a completed turn.
      operationId: streamTextChatSession
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: integer
            title: Workflow Id
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTextChatSessionRequest'
      responses:
        '200':
          description: Successful Response
          content:
            text/event-stream:
              schema:
                type: string
        '401':
          description: Authentication is missing or invalid.
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    CreateTextChatSessionRequest:
      properties:
        request_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Request Id
          description: Client correlation ID for recovery if the creation response is lost.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        initial_context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Initial Context
        annotations:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Annotations
      type: object
      title: CreateTextChatSessionRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````

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