# Multi-turn conversations (Streaming)

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1beta/models/gemini-2.0-flash:streamGenerateContent:
    post:
      summary: Multi-turn conversations (Streaming)
      deprecated: false
      description: You can also use streaming with chat, as shown in the following example
      tags:
        - Model Capabilities/Text generation
      parameters:
        - name: alt
          in: query
          description: ''
          required: true
          example: sse
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                contents:
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                      parts:
                        type: array
                        items:
                          type: object
                          properties:
                            text:
                              type: string
                          required:
                            - text
                          x-apidog-orders:
                            - text
                    required:
                      - role
                      - parts
                    x-apidog-orders:
                      - role
                      - parts
              required:
                - contents
              x-apidog-orders:
                - contents
            example:
              contents:
                - role: user
                  parts:
                    - text: Hello
                - role: model
                  parts:
                    - text: Great to meet you. What would you like to know?
                - role: user
                  parts:
                    - text: >-
                        I have two dogs in my house. How many paws are in my
                        house?
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
                x-apidog-orders: []
          headers: {}
          x-apidog-name: 成功
      security:
        - apikey-header-x-goog-api-key: []
      x-apidog-folder: Model Capabilities/Text generation
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/892755/apis/api-16240704-run
components:
  schemas: {}
  securitySchemes:
    apikey-header-x-goog-api-key:
      type: apiKey
      in: header
      name: x-goog-api-key
servers:
  - url: https://generativelanguage.googleapis.com
    description: Prod Env
security:
  - apikey-header-x-goog-api-key: []

```
