# Generate API Markdown

> Generate an API markdown file and token file using ApiView. Use this when the user wants to generate an API markdown file and review API changes.

- Skill: `azure-azure-sdk-for-python/generate-api-markdown` (Agent Skill)
- Install (CLI): `npx skillmds@latest add azure-azure-sdk-for-python/generate-api-markdown`
- Raw SKILL.md: https://api.skillmd.com/api/skills/azure-azure-sdk-for-python/generate-api-markdown/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: Azure (https://skillmd.com/u/azure-azure-sdk-for-python)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/azure-azure-sdk-for-python/generate-api-markdown

---


# Generate API Markdown

## Prerequisites

1. Activate your virtual environment.
2. Install the required dependencies:
   ```bash
   cd <repo_root>
   pip install -e ./eng/tools/azure-sdk-tools
   ```

## Instructions

1. Navigate to the desired package directory
2. Run the command:
   ```bash
   azpysdk apistub .
   ```
3. The command generates `api.md` and `api.metadata.yml` in the package directory, which are the files needed to pass the API consistency check. Provide these files to the user for review.
4. If the user explicitly asks for the raw APIView token file, run `azpysdk apistub . --token-file` instead.
