---
title: "Generate quiz questions for a topic with AI."
method: POST
path: "/v1/ai/questions/generate"
tags: ["AI"]
---

# Generate quiz questions for a topic with AI.

`POST /v1/ai/questions/generate`

## Request

- Base URL: `https://127.0.0.1/api`
- URL: `https://127.0.0.1/api/v1/ai/questions/generate`
- Auth: none declared

## Headers

- `X-AI-Base-Url` string
- `X-AI-Api-Key` string
- `X-AI-Model` string

## Request body

- ReqGenerateAIQuestions
  - `difficulty` string
  - `language` string
  - `number_of_questions` integer
  - `topic` string

## Response `200`

- object
  - `data` ResGenerateAIQuestions
    - `difficulty` string
    - `generated` integer
    - `language` string
    - `notice` string
    - `questions` AIQuestion[]
      - `correct_answer` integer
      - `options` string[]
      - `options_media` string
      - `question` string
      - `question_media` string
      - `question_type` string
      - `resource` string
    - `suggested_description` string
    - `suggested_title` string
    - `topic` string
  - `status` string

## Other responses

- `400`: Fail due to resource not exists
- `401`: Server understand request but refuse to authorize it
- `500`: Unexpected error occurred

## Changes

- **2026-09-16** `15ae2821b57b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/improwised/apis/improwised-technologies-pvt-ltd-jovvix-api/changes/v1/ai/questions/generate/post.md)

---

[API](https://skmtc.dev/improwised/apis/improwised-technologies-pvt-ltd-jovvix-api.md) - [All operations](https://skmtc.dev/improwised/apis/improwised-technologies-pvt-ltd-jovvix-api/llms.txt) - [OpenAPI document](https://skmtc.dev/improwised/apis/improwised-technologies-pvt-ltd-jovvix-api/revisions/15ae2821b57b?raw)
