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

# Stream deep research (v1.1.3+)

> Streams deep-research lifecycle and output events for clients on API >= 1.1.3 while running the task in background mode.



## OpenAPI

````yaml https://api.superwize.ai/api/openapi.json post /chat/streamDeepResearch
openapi: 3.1.1
info:
  title: SuperWize API
  version: 1.1.2
  description: >-
    SuperWize RPC API. Authenticated endpoints support Better Auth session
    cookies, Authorization: Bearer <session_token>, or x-api-key.
servers:
  - url: http://api.superwize.ai/api
security: []
tags:
  - name: System
    description: Service health and internal diagnostics.
  - name: Authentication
    description: Session, email verification, and API token endpoints.
  - name: Audio
    description: Speech-to-text and related audio features.
  - name: Chat
    description: Conversation streaming, history, branching, and feedback.
  - name: Credits
    description: Credit balances, usage history, and reward grants.
  - name: Subscription
    description: Subscription tier and status polling endpoints.
  - name: Mini Apps
    description: Curated mini app catalog endpoints.
  - name: News
    description: Curated news feed, article source, and article feedback endpoints.
  - name: Release Notes
    description: Current app release metadata and features.
  - name: Support
    description: Contact/support request endpoints.
  - name: Images
    description: Image conversion, upload, and retrieval endpoints.
  - name: Files
    description: Generic file upload and retrieval endpoints.
  - name: Notifications
    description: Push token registration and test notifications.
  - name: Group Chat
    description: Group lifecycle, invites, messaging, and realtime events.
  - name: Preferences
    description: User preferences and account-type controls.
  - name: Widgets
    description: Widget thread and interaction endpoints.
  - name: Bookmarks
    description: Bookmark groups and conversation associations.
paths:
  /chat/streamDeepResearch:
    post:
      tags:
        - Chat
      summary: Stream deep research (v1.1.3+)
      description: >-
        Streams deep-research lifecycle and output events for clients on API >=
        1.1.3 while running the task in background mode.
      operationId: chat.streamDeepResearch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                conversationId:
                  type: string
                model:
                  type: string
                images:
                  type: array
                  items:
                    type: object
                    properties:
                      imageUrl:
                        type: string
                      detail:
                        enum:
                          - auto
                          - high
                          - low
                    required:
                      - imageUrl
              required:
                - message
            example:
              message: What are the main causes of climate change?
              conversationId: conv_01JHKYW2V8XQ123456789
              model: meetkai:functionary-urdu-mini-pak
              images:
                - imageUrl: https://cdn.superwize.ai/assets/sample.png
                  detail: auto
      responses:
        '200':
          description: Deep research stream started.
          content:
            text/event-stream:
              schema:
                oneOf:
                  - type: object
                    properties:
                      event:
                        const: message
                      data:
                        anyOf:
                          - type: object
                            properties:
                              type:
                                const: conversation.created
                              conversationId:
                                type: string
                            required:
                              - type
                              - conversationId
                          - type: object
                            properties:
                              type:
                                const: response.created
                              responseId:
                                type: string
                            required:
                              - type
                              - responseId
                          - type: object
                            properties:
                              type:
                                const: content_part.added
                            required:
                              - type
                          - type: object
                            properties:
                              type:
                                const: text.delta
                              delta:
                                type: string
                            required:
                              - type
                              - delta
                          - type: object
                            properties:
                              type:
                                const: error
                              message:
                                type: string
                            required:
                              - type
                              - message
                          - type: object
                            properties:
                              type:
                                const: done
                            required:
                              - type
                          - type: object
                            properties:
                              type:
                                const: widget.created
                              widgetId:
                                type: string
                              widgetType:
                                type: string
                              responseId:
                                type: string
                            required:
                              - type
                              - widgetId
                              - widgetType
                              - responseId
                          - type: object
                            properties:
                              type:
                                const: keepalive
                            required:
                              - type
                          - type: object
                            properties:
                              type:
                                const: reasoning_text.delta
                              delta:
                                type: string
                            required:
                              - type
                              - delta
                          - type: object
                            properties:
                              type:
                                const: reasoning_text.done
                            required:
                              - type
                          - type: object
                            properties:
                              type:
                                const: web_search.in_progress
                              itemId:
                                type: string
                              query:
                                type: string
                              numResults:
                                type: number
                              country:
                                type: string
                            required:
                              - type
                              - itemId
                              - query
                          - type: object
                            properties:
                              type:
                                const: web_search.completed
                              results:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    link:
                                      type: string
                                    title:
                                      type: string
                                    snippet:
                                      type: string
                                  required:
                                    - link
                                    - title
                                    - snippet
                            required:
                              - type
                              - results
                          - type: object
                            properties:
                              type:
                                const: image_generation.in_progress
                              itemId:
                                type: string
                              outputFormat:
                                enum:
                                  - png
                                  - jpeg
                                  - webp
                              size:
                                enum:
                                  - 1024x1024
                                  - 1024x1536
                                  - 1536x1024
                              prompt:
                                type: string
                            required:
                              - type
                              - itemId
                          - type: object
                            properties:
                              type:
                                const: image_generation.completed
                              images:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      enum:
                                        - url
                                        - base64
                                    data:
                                      type: string
                                  required:
                                    - type
                                    - data
                              model:
                                type: string
                            required:
                              - type
                              - images
                              - model
                          - type: object
                            properties:
                              type:
                                const: edit_image.in_progress
                              itemId:
                                type: string
                              prompt:
                                type: string
                                description: >-
                                  Instructions for how to edit the image. Be
                                  specific about what changes to make (e.g.,
                                  "change the sky to sunset colors", "remove the
                                  background", "make it look like a watercolor
                                  painting").
                              fileId:
                                type: string
                                description: >-
                                  The file ID of the uploaded image to edit. Use
                                  the fileId from the [FILE_CONTEXT] provided in
                                  the conversation.
                            required:
                              - type
                              - itemId
                              - prompt
                              - fileId
                          - type: object
                            properties:
                              type:
                                const: edit_image.completed
                              images:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      enum:
                                        - url
                                        - base64
                                    data:
                                      type: string
                                  required:
                                    - type
                                    - data
                              model:
                                type: string
                            required:
                              - type
                              - images
                              - model
                          - type: object
                            properties:
                              type:
                                const: edit_image.error
                              itemId:
                                type: string
                              error:
                                type: string
                            required:
                              - type
                              - itemId
                              - error
                          - type: object
                            properties:
                              type:
                                const: history.in_progress
                              itemId:
                                type: string
                              query:
                                type: string
                            required:
                              - type
                              - itemId
                              - query
                          - type: object
                            properties:
                              type:
                                const: history.completed
                              results:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    text:
                                      type: string
                                  required:
                                    - text
                            required:
                              - type
                              - results
                          - type: object
                            properties:
                              type:
                                const: generate_video.in_progress
                              itemId:
                                type: string
                              prompt:
                                type: string
                                description: >-
                                  A detailed description of the video to
                                  generate. Be specific about the scene, motion,
                                  camera angle, and style.
                              negative_prompt:
                                type: string
                                description: >-
                                  Things to avoid in the generated video (e.g.,
                                  "blurry, low quality, distorted").
                              aspect_ratio:
                                enum:
                                  - '16:9'
                                  - '1:1'
                                  - '9:16'
                                description: Aspect ratio of the video. Defaults to 16:9.
                            required:
                              - type
                              - itemId
                              - prompt
                          - type: object
                            properties:
                              type:
                                const: generate_video.completed
                              video:
                                type: object
                                properties:
                                  url:
                                    type: string
                                required:
                                  - url
                              model:
                                type: string
                            required:
                              - type
                              - video
                              - model
                          - type: object
                            properties:
                              type:
                                const: generate_video.error
                              itemId:
                                type: string
                              error:
                                type: string
                            required:
                              - type
                              - itemId
                              - error
                          - type: object
                            properties:
                              type:
                                const: read_file.in_progress
                              itemId:
                                type: string
                              fileId:
                                type: string
                              filename:
                                type: string
                            required:
                              - type
                              - itemId
                              - fileId
                          - type: object
                            properties:
                              type:
                                const: read_file.completed
                              success:
                                type: boolean
                              content:
                                type: string
                              error:
                                type: string
                            required:
                              - type
                              - success
                          - type: object
                            properties:
                              type:
                                const: code_interpreter.in_progress
                              itemId:
                                type: string
                            required:
                              - type
                              - itemId
                          - type: object
                            properties:
                              type:
                                const: code_interpreter.completed
                            required:
                              - type
                          - type: object
                            properties:
                              type:
                                const: generate_canvas.in_progress
                              itemId:
                                type: string
                              topic:
                                type: string
                                description: The topic or subject for the canvas document
                              goal:
                                type: string
                                description: >-
                                  Optional goal or purpose for the document
                                  (e.g., "outline", "essay", "notes")
                              format:
                                type: string
                                description: >-
                                  Optional format preference (e.g., "outline",
                                  "article", "notes", "plan")
                              context:
                                type: string
                                description: >-
                                  Optional grounded context from prior
                                  research/tool outputs to use as source
                                  material
                            required:
                              - type
                              - itemId
                              - topic
                          - type: object
                            properties:
                              type:
                                const: generate_canvas.completed
                              widgetId:
                                type: string
                              title:
                                type: string
                              summary:
                                type: string
                            required:
                              - type
                              - widgetId
                              - title
                          - type: object
                            properties:
                              type:
                                const: generate_canvas.error
                              itemId:
                                type: string
                              error:
                                type: string
                            required:
                              - type
                              - itemId
                              - error
                          - type: object
                            properties:
                              type:
                                const: generate_quiz.in_progress
                              itemId:
                                type: string
                              subject:
                                type: string
                                description: The subject/topic for the quiz
                              difficulty:
                                enum:
                                  - easy
                                  - medium
                                  - hard
                                description: Quiz difficulty level
                              context:
                                type: string
                                description: >-
                                  Additional context from conversation to inform
                                  quiz content
                            required:
                              - type
                              - itemId
                              - subject
                          - type: object
                            properties:
                              type:
                                const: generate_quiz.completed
                              widgetId:
                                type: string
                              subject:
                                type: string
                              questionCount:
                                type: number
                            required:
                              - type
                              - widgetId
                              - subject
                              - questionCount
                          - type: object
                            properties:
                              type:
                                const: generate_quiz.error
                              itemId:
                                type: string
                              error:
                                type: string
                            required:
                              - type
                              - itemId
                              - error
                          - type: object
                            properties:
                              type:
                                const: code_interpreter.code_delta
                              delta:
                                type: string
                              itemId:
                                type: string
                            required:
                              - type
                              - delta
                              - itemId
                          - type: object
                            properties:
                              type:
                                const: code_interpreter.interpreting
                              itemId:
                                type: string
                            required:
                              - type
                              - itemId
                          - type: object
                            properties:
                              type:
                                const: code_interpreter.code_done
                              code:
                                type: string
                              itemId:
                                type: string
                            required:
                              - type
                              - code
                              - itemId
                      id:
                        type: string
                      retry:
                        type: number
                    required:
                      - event
                      - data
                  - type: object
                    properties:
                      event:
                        const: done
                      data: {}
                      id:
                        type: string
                      retry:
                        type: number
                    required:
                      - event
                  - type: object
                    properties:
                      event:
                        const: error
                      data: {}
                      id:
                        type: string
                      retry:
                        type: number
                    required:
                      - event
              example:
                event: message
                data:
                  type: conversation.created
                  conversationId: conv_01JHKYW2V8XQ123456789
                id: obj_01JHKZ0PV2WX123456789
                retry: 3000
        '401':
          description: '401'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: UNAUTHORIZED
                      status:
                        const: 401
                      message:
                        type: string
                        default: Authentication is required to access this endpoint.
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '403':
          description: '403'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: FORBIDDEN
                      status:
                        const: 403
                      message:
                        type: string
                        default: The action is not allowed or requires more credits.
                      data:
                        type: object
                        properties:
                          code:
                            const: INSUFFICIENT_CREDITS
                          required:
                            type: number
                          dailyBalance:
                            type: number
                          bonusBalance:
                            type: number
                          resetsAt:
                            type: string
                        required:
                          - code
                          - required
                          - dailyBalance
                          - bonusBalance
                          - resetsAt
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
              example:
                defined: true
                code: FORBIDDEN
                status: 403
                message: The action is not allowed or requires more credits.
                data:
                  code: INSUFFICIENT_CREDITS
                  required: 1
                  dailyBalance: 250
                  bonusBalance: 250
                  resetsAt: '2026-01-02T00:00:00.000Z'
        '412':
          description: '412'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: PRECONDITION_FAILED
                      status:
                        const: 412
                      message:
                        type: string
                        default: >-
                          Client version does not satisfy this endpoint
                          requirements.
                      data:
                        type: object
                        properties:
                          code:
                            const: VERSION_MISMATCH
                          required:
                            type: string
                          provided:
                            type: string
                        required:
                          - code
                          - required
                          - provided
                    required:
                      - defined
                      - code
                      - status
                      - message
                      - data
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
              example:
                defined: true
                code: PRECONDITION_FAILED
                status: 412
                message: Client version does not satisfy this endpoint requirements.
                data:
                  code: VERSION_MISMATCH
                  required: 1.1.3
                  provided: 1.0.8
        '500':
          description: '500'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: INTERNAL_SERVER_ERROR
                      status:
                        const: 500
                      message:
                        type: string
                        default: Unexpected server error.
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
              example:
                defined: true
                code: INTERNAL_SERVER_ERROR
                status: 500
                message: Unexpected server error.
                data: {}

````