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

# Create Speech Task

> Adds the text to the avatar speech queue.
If the avatar is already speaking, the text fragment is queued to be spoken at a later time.
Nothing is said until you connect or while you're disconnected.



## OpenAPI

````yaml https://api.avaturn.live/api/v1/openapi.json post /api/v1/sessions/{id}/tasks
openapi: 3.1.0
info:
  title: API
  version: 0.1.0
servers:
  - url: https://api.avaturn.live
security: []
paths:
  /api/v1/sessions/{id}/tasks:
    post:
      summary: Create Speech Task
      description: >-
        Adds the text to the avatar speech queue.

        If the avatar is already speaking, the text fragment is queued to be
        spoken at a later time.

        Nothing is said until you connect or while you're disconnected.
      operationId: append_text_api_v1_sessions__id__tasks_post
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: id
            description: Session ID
          description: Session ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_append_text_api_v1_sessions__id__tasks_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionSayResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    Body_append_text_api_v1_sessions__id__tasks_post:
      properties:
        text:
          type: string
          title: Text
          description: Text to say
      type: object
      required:
        - text
      title: Body_append_text_api_v1_sessions__id__tasks_post
    SessionSayResponse:
      properties:
        task_id:
          type: string
          title: Task Id
          description: Speech task ID
      type: object
      required:
        - task_id
      title: SessionSayResponse
    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
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      description: avaturn.live API key
      scheme: bearer

````