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

# AI Edit Study

Use AI to generate or modify study questions based on a prompt. Returns a list of suggested questions.


## OpenAPI

````yaml POST /api/v1/studies/{study_id}/ai-edit
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.getversive.com
security: []
paths:
  /api/v1/studies/{study_id}/ai-edit:
    post:
      tags:
        - Studies
      summary: Ai Edit Study
      operationId: ai_edit_study_api_v1_studies__study_id__ai_edit_post
      parameters:
        - name: study_id
          in: path
          required: true
          schema:
            type: string
            title: Study Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AIEditRequestV1'
            example:
              current_message: Add a question about age
              questions: []
              language: English
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AIEditResponseV1'
              example:
                questions:
                  - id: q_new_1
                    content: What is your experience level?
                    type: text
                    is_new: true
                change_log:
                  summary: Added a question about experience.
                deleted_questions: []
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
              example:
                detail:
                  - loc:
                      - body
                      - title
                    msg: field required
                    type: value_error.missing
      security:
        - HTTPBearer: []
components:
  schemas:
    AIEditRequestV1:
      properties:
        current_message:
          type: string
          title: Current Message
        questions:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Questions
        language:
          type: string
          title: Language
      type: object
      required:
        - current_message
        - questions
        - language
      title: AIEditRequestV1
    AIEditResponseV1:
      properties:
        questions:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Questions
        change_log:
          additionalProperties: true
          type: object
          title: Change Log
        deleted_questions:
          items:
            type: string
          type: array
          title: Deleted Questions
      type: object
      required:
        - questions
        - change_log
        - deleted_questions
      title: AIEditResponseV1
    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
      scheme: bearer

````