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

# Generate a quiz from a document

> Automatically generate a quiz based on the content of a stored document



## OpenAPI

````yaml https://api.arcsolutionsteam.workers.dev/openapi get /api/v1/quizzes/documents
openapi: 3.1.0
info:
  title: IntelliQ API
  description: API for IntelliQ
  version: 2.0.0
servers:
  - url: http://localhost:8787
    description: Local server
  - url: https://app.intelliq.dev
    description: Production server
security: []
paths:
  /api/v1/quizzes/documents:
    get:
      tags:
        - Quizzes
      summary: Generate a quiz from a document
      description: Automatically generate a quiz based on the content of a stored document
      operationId: getApiV1QuizzesDocuments
      parameters:
        - in: query
          name: documentId
          schema:
            type: number
          required: true
        - in: query
          name: numberOfQuestions
          schema:
            type: number
            minimum: 1
            maximum: 10
          required: true
        - in: query
          name: quizType
          schema:
            type: string
            enum:
              - singleplayer
              - multiplayer
              - document
              - random
            default: document
          required: false
        - in: query
          name: language
          schema:
            type: string
            enum:
              - en
              - de
              - fr
              - es
              - it
              - ro
              - sr
              - tl
              - pl
            default: en
          required: false
      responses:
        '200':
          description: Quiz generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  quiz:
                    type: object
                    properties:
                      quizTitle:
                        type: string
                      questions:
                        type: array
                        items:
                          type: object
                          properties:
                            questionTitle:
                              type: string
                            text:
                              type: string
                            options:
                              type: array
                              items:
                                type: string
                            correctAnswer:
                              type: string
                          required:
                            - questionTitle
                            - text
                            - options
                            - correctAnswer
                    required:
                      - quizTitle
                      - questions
                required:
                  - quiz
        '404':
          description: Document not found
        '429':
          description: Too many requests

````