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

# Edit

> The edit endpoint uses generative AI to apply requested edits to a document



## OpenAPI

````yaml /specs/language-api.yaml post /language/edit
openapi: 3.1.0
info:
  description: cxconnect.ai Omni Language API
  version: 1.0.0
  title: cxconnect.ai Omni Language API
  contact:
    email: support@cxconnect.ai
  license:
    name: cxconnect.ai EULA
    url: https://cxconnect.ai
servers:
  - url: https://test.api.cxconnect.ai
security:
  - OAuth2:
      - access
      - read
      - write
  - BearerAuth:
      - access
      - read
      - write
tags:
  - name: language
    description: cxconnect.ai Language endpoints
externalDocs:
  description: cxconnect.ai
  url: https://cxconnect.ai
paths:
  /language/edit:
    post:
      tags:
        - language
      summary: Edit
      description: >-
        The edit endpoint uses generative AI to apply requested edits to a
        document
      operationId: edit
      requestBody:
        $ref: '#/components/requestBodies/EditRequest'
      responses:
        '200':
          description: Successful edit response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EditResult'
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
components:
  requestBodies:
    EditRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EditRequest'
  schemas:
    EditResult:
      type: object
      properties:
        document:
          $ref: '#/components/schemas/Document'
        original:
          $ref: '#/components/schemas/Document'
        meta:
          type: object
          additionalProperties:
            type: string
          example:
            foo: bar
    EditRequest:
      type: object
      properties:
        document:
          $ref: '#/components/schemas/Document'
        edits:
          type: array
          items:
            type: string
            enum:
              - grammar
              - syntax
              - simplify
              - clarify
        length:
          type: string
          enum:
            - default
            - expand
            - shorten
        tone:
          type: string
          enum:
            - none
            - academic
            - admiring
            - amused
            - angry
            - annoyed
            - approving
            - aware
            - confident
            - confused
            - curious
            - disappointed
            - disapproving
            - eager
            - embarrassed
            - excited
            - fearful
            - friendly
            - funny
            - grateful
            - joyful
            - loving
            - mournful
            - neutral
            - optimistic
            - professional
            - relieved
            - remorseful
            - repulsed
            - sad
            - worried
            - surprised
            - sympathetic
        tone_level:
          type: integer
          minimum: 1
          maximum: 10
        temperature:
          type: number
          format: float
          minimum: 0
          maximum: 1
        meta:
          type: object
          additionalProperties:
            type: string
          example:
            foo: bar
    Document:
      type: object
      properties:
        value:
          oneOf:
            - type: string
            - type: object
        mime_type:
          type: string
        language:
          type: string
        meta:
          type: object
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://test.auth.cxconnect.ai
          scopes:
            access: API level access to permit operations
            read: Allow read level access to stored configs and settings
            write: Allow write level access to store configs and settings
    BearerAuth:
      type: http
      scheme: bearer

````