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

# Create New Quiz API

> Create a new quiz with AI-generated questions based on provided content and tags



## OpenAPI

````yaml POST /quiz/create
openapi: 3.0.1
info:
  license:
    name: MIT
  title: QuizRise API
  version: 1.0.0
  description: API for managing quizzes, questions, and related operations
servers:
  - url: https://app.quizrise.com/api/v1
security:
  - bearerAuth: []
paths:
  /quiz/create:
    post:
      summary: Create a new quiz
      description: Creates a new quiz based on the provided parameters
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - count
                - source
              properties:
                type:
                  type: string
                  description: The type of questions to create
                  enum:
                    - TRUEFALSE
                    - FILLBLANK
                    - MULTIPLECHOICE
                count:
                  type: integer
                  description: The number of questions to create. Maximum is 150.
                source:
                  type: string
                  description: The source of the content to create questions from
                  enum:
                    - WEBSITE
                    - TEXT
                    - PDF
                language:
                  type: string
                  description: >-
                    The language of the questions to create. Default is content
                    language. Example: 'English'
                difficulty:
                  type: string
                  description: The difficulty of the questions to create
                  enum:
                    - EASY
                    - MEDIUM
                    - HARD
                content:
                  type: string
                  description: >-
                    The content to create questions from. Required if url is not
                    provided.
                url:
                  type: string
                  description: >-
                    The url of the content to create questions from. Required if
                    content is not provided.
                tags:
                  type: array
                  items:
                    type: string
      responses:
        '200':
          description: Quiz created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  message:
                    type: string
                  quiz:
                    $ref: '#/components/schemas/Quiz'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Question not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Unknown error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Quiz:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        description:
          type: string
        slug:
          type: string
        visibility:
          type: string
        creator:
          type: object
          properties:
            name:
              type: string
            avatar:
              type: string
        tags:
          type: array
          items:
            type: string
        questionCount:
          type: integer
        flashcardCount:
          type: integer
        quizAttemptCount:
          type: integer
    Error:
      type: object
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````