canonical: https://jentic.com/apis/docuwriter.ai/docuwriter

# DocuWriter.ai REST API

The DocuWriter.ai API generates software documentation from source code and organizes it in Spaces. It documents a single file or a multi-file codebase, generates Swagger/OpenAPI documentation and UML diagrams, and stores the output as documents inside Spaces you can search. It also lists past generations and the repositories connected to your account.

## For AI agents

Generate code documentation, OpenAPI specs, and UML diagrams from source with DocuWriter.ai, then store and search the results in Spaces.

## Scope

Does not handle version control, CI pipelines, or documentation hosting. Use for generating and organizing software documentation, OpenAPI specs, and UML diagrams only.

## Capabilities

- Generate documentation for a single code file or a multi-file codebase
- Generate Swagger/OpenAPI documentation from code
- Generate UML diagrams from code
- Organize generated documentation into Spaces as documents
- Search the documents within a Space
- List past generations and connected repositories

## Use cases

### Agent-Generated Code Docs

An AI agent connected through Jentic sends a source file to DocuWriter.ai, receives generated documentation, and stores it as a document in the right Space. The API exposes the generation and Space operations the agent needs, and Jentic injects the bearer token at call time so the agent never holds it.

Example prompt: Generate documentation for a source file and save it as a document in a named Space

### OpenAPI and UML from Code

Teams that keep specs and diagrams in sync with the code generate them on demand. The DocuWriter.ai API produces Swagger/OpenAPI documentation and UML diagrams from source, so an agent can refresh a spec or diagram when the code changes.

Example prompt: Generate a Swagger/OpenAPI document and a UML diagram from a module's source files

### Searchable Documentation Spaces

Generated documentation is only useful if the team can find it. The DocuWriter.ai API creates Spaces, stores documents in them, and searches those documents, so an agent can answer a question by searching the team's documentation.

Example prompt: Search a Space for documentation mentioning a function and return the matching documents

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/generate-code-documentation` | Generate code documentation |
| POST | `/generate-multi-file-documentation` | Generate documentation from multiple files |
| POST | `/generate-swagger-api` | Generate Swagger/OpenAPI documentation |
| POST | `/generate-uml-diagram` | Generate UML diagrams |
| GET | `/spaces` | List Spaces |
| POST | `/spaces` | Create a Space |
| POST | `/spaces/{space}/documents` | Create a Space document |
| POST | `/spaces/{space}/search` | Search documents in a Space |

## Key resources

- **Generations** — Generate code documentation, OpenAPI specs, and UML diagrams, and list past generations
- **Spaces** — Create and list Spaces and create, list, and search their documents
- **Repositories** — List the repositories connected to the account

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 61 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 100 / 100
  - Developer Experience & Jentic Compatibility: 56 / 100
  - AI-Readiness & Agent Experience: 45 / 100
  - Agent Usability: 94 / 100
  - Security: 60 / 100
  - AI Discoverability: 45 / 100
- **View full report:** https://jentic.com/apis/docuwriter.ai/docuwriter/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring DocuWriter.ai by hand means managing its bearer token and sending source files to the right generation endpoint for docs, specs, or diagrams yourself. Through Jentic you install once, import DocuWriter.ai from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** DocuWriter.ai puts the Space id in the URL path (`/spaces/{space}/...`), so a rule can pin your agent to one Space: it can create and search documents there and nothing else. You choose which operations it may call, so the code-generation operations are included only if you add them.
- **Credential handling:** Your DocuWriter.ai token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'generate code documentation' or 'search a Space', and Jentic returns the matching DocuWriter.ai operation with its input schema so the agent calls the right endpoint directly.

## Related APIs

- **ReadMe** — ReadMe hosts interactive API documentation, while DocuWriter.ai generates documentation from source code.
- **Mintlify** — Mintlify builds and hosts AI-assisted docs sites, overlapping with DocuWriter.ai's documentation generation.
- **Stoplight** — Stoplight designs and documents APIs from OpenAPI specs, complementing DocuWriter.ai's generation.
- **APIMatic** — APIMatic turns an OpenAPI spec into SDKs, consuming the spec DocuWriter.ai can generate.

## FAQ

### What authentication does the DocuWriter.ai API use?

The DocuWriter.ai API authenticates with a bearer token sent in the Authorization header, per its OpenAPI spec. Create the token in your DocuWriter.ai account and send it on every call. Through Jentic the token is stored encrypted by your own Jentic One instance and injected at execution time, so it never enters the agent's prompt or logs.

### Can I generate code documentation with the DocuWriter.ai API?

Yes. The API generates documentation for a single file or a multi-file codebase, and produces Swagger/OpenAPI documentation and UML diagrams from source. The output can be stored as documents in Spaces that you can later search.

### Is there a DocuWriter.ai MCP server?

You don't need an MCP server to give your agent the DocuWriter.ai API. Jentic connects it directly from the API Directory: import it, store your token once, and your agent calls the generation and Space operations. Operations load on demand, so your agent's context stays lean instead of holding another server's tool definitions.

### Can I limit what my agent is allowed to do with the DocuWriter.ai API?

Yes. Write a rule that allows only the document-creation and search operations within one Space, so the agent can add and find documentation there but cannot trigger new code-documentation generations or reach other Spaces. Every call the agent makes is logged.

### What are the rate limits for the DocuWriter.ai API?

The OpenAPI spec does not specify rate limits. Check the DocuWriter.ai documentation at https://docuwriter.ai for current limits before running a large multi-file documentation job.

### How do I generate documentation with the DocuWriter.ai API through Jentic?

Search Jentic for an intent like 'generate code documentation', add the DocuWriter.ai API from the directory, and store your token once. Your agent then sends the source and saves the result as a document in a Space. To run it on your own infrastructure, install Jentic One from its GitHub repo.
