---
title: "Generate a module"
method: POST
path: "/v1/modules/generate"
tags: ["Training Modules"]
---

# Generate a module

`POST /v1/modules/generate`

## Request

- Base URL: `https://api.vidocu.ai`
- URL: `https://api.vidocu.ai/v1/modules/generate`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://vidocu.ai/oauth/authorize`, token URL `https://api.vidocu.ai/oauth/token`)

From a video or a knowledge-base article. Regenerating replaces the source's existing module rather than adding a second one.

**Scope:** `modules:write`

**Role permission:** `canCreate` (OAuth only — API keys carry full workspace permissions)

## Request body

- object
  - `videoId` string
  - `articleId` string
  - `questionCount` integer
  - `instructions` string

## Response `202`

Module generated

## Other responses

- `400`: Validation error
- `401`: Invalid or missing credentials
- `403`: Missing scope (`insufficient_scope`), insufficient role (`insufficient_role`), or quota exhausted (`limit_exceeded`)
- `429`: Rate limit exceeded (60 req/min)
- `500`: Server error

---

[API](https://skmtc.dev/vidocu/apis/vidocu-api.md) · [All operations](https://skmtc.dev/vidocu/apis/vidocu-api/llms.txt) · [OpenAPI document](https://skmtc.dev/vidocu/apis/vidocu-api/revisions/cc813d2ca5d2?raw)
