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

# Create AI suggestion

> Rewrite a text (improve, polish, formalize, friendly, shorten), or draft a reply or an internal note for a chat.



## OpenAPI

````yaml https://api.useinvent.com/openapi.json post /orgs/{org_id}/ai/suggestions
openapi: 3.1.0
info:
  version: 1.0.0
  title: Invent API
servers:
  - url: https://api.useinvent.com
security:
  - bearerAuth: []
tags:
  - name: Inbox
  - name: Chats
  - name: Messages
  - name: Contacts
  - name: Custom channels
  - name: Segments
  - name: Suppressions
  - name: Assistants
  - name: Agents
  - name: Skills
  - name: Knowledge
  - name: AI
  - name: Broadcasts
  - name: Email sending
  - name: WhatsApp
  - name: WhatsApp Meta agent
  - name: Tables
  - name: Records
  - name: Views
  - name: Pages
  - name: Connections
  - name: Workspace
  - name: Sub-organizations
  - name: Analytics and logs
  - name: Workflows
paths:
  /orgs/{org_id}/ai/suggestions:
    post:
      tags:
        - AI
      summary: Create AI suggestion
      description: >-
        Rewrite a text (improve, polish, formalize, friendly, shorten), or draft
        a reply or an internal note for a chat.
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the org
          name: org_id
          in: path
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAiSuggestionSchema'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateAiSuggestionSchema'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiSuggestionSchema'
components:
  schemas:
    CreateAiSuggestionSchema:
      type: object
      properties:
        action:
          $ref: '#/components/schemas/AiSuggestionAction'
        text:
          type: string
          maxLength: 3072
          description: >-
            The text to rewrite. Required for every action except `reply` and
            `note`
        chat_id:
          type: string
          maxLength: 128
          description: The chat to draft from. Required for the `reply` and `note` actions
      required:
        - action
      description: Schema for creating an AI suggestion
    AiSuggestionSchema:
      type: object
      properties:
        suggestion:
          type: string
      required:
        - suggestion
      description: Schema representing an AI suggestion
    AiSuggestionAction:
      type: string
      enum:
        - improve
        - polish
        - formalize
        - friendly
        - shorten
        - reply
        - note
      description: Schema for the action to perform on the suggestion
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer token authentication using your API key

````