> For the complete documentation index, see [llms.txt](https://docs.diaflow.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.diaflow.io/pages/ai-assistant-and-media.md).

# AI Assistant & Media

Accelerate content creation with native generative AI writing, instant 14-language translation, prompt-based in-document image generation, and curated visual media controls.

## Generative AI Writing Assistant

Diaflow Pages embeds generative artificial intelligence directly into the authoring canvas, eliminating the friction of switching between external AI tools and your collaborative workspace.

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FLzIp57mpWi64t4i266Wu%2Frounded-image%20(42).png?alt=media&amp;token=d8f7f078-80e6-463d-b131-5a2ded75c683" alt=""><figcaption></figcaption></figure>

### Write with AI (Full-Page Drafts)

Generate comprehensive, production-ready document drafts from a single natural language description:

1. Type `/` on any empty line and choose **Write with AI** from the command menu.
2. Enter a descriptive prompt detailing the objective, audience, and key sections (e.g., *"Draft a Standard Operating Procedure for resolving customer escalation tickets, including triage severity levels, SLA response targets, and notification protocols"*).
3. Click **Generate**. The AI synthesizes the structure and writes a complete, multi-section page within seconds, complete with headings, bullet points, checklists, and summary tables.
4. **Review & Accept**: Preview the generated draft inline. You can accept the draft, request a refined variation, or discard it without altering previous content.

### Prompt Crafting Best Practices

* **Specify Structure**: Ask for specific elements such as tables, callout warnings, or numbered checklists.
* **Provide Context**: Mention the target department (e.g., *"for onboarding junior frontend engineers"*).
* **Define Tone**: Guide the voice toward *Executive Brief*, *Technical Precision*, or *Customer-Facing Empathy*.

***

## Contextual Inline AI Toolbar

Refine and transform existing content on the fly by highlighting any text selection or block to invoke the contextual AI refinement bar.

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FdVdwxQtjW65sKY93TE4T%2Frounded-image%20(43).png?alt=media&amp;token=9834a99e-cfc7-455f-8965-a999fe37818b" alt=""><figcaption></figcaption></figure>

### Editorial Actions Matrix

| Action                    | Function & Output                                                                                                  |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| **Proofread**             | Detects grammatical inconsistencies, typos, and syntax errors, offering clean one-click replacements.              |
| **Rewrite & Simplify**    | Deconstructs dense industry jargon into accessible, reader-friendly prose without losing technical accuracy.       |
| **Make Shorter / Longer** | Condenses lengthy paragraphs into concise executive summaries or expands brief notes into exhaustive explanations. |
| **Change Tone**           | Modulates text styling between *Professional*, *Casual*, *Authoritative*, *Friendly*, or *Urgent*.                 |
| **Continue Writing**      | Analyzes the preceding context, tone, and formatting to organically draft the next logical paragraph.              |
| **Summarize / Explain**   | Generates high-level key takeaways or explains complex technical passages for cross-functional stakeholders.       |

### 14-Language Native Translation

Diaflow Pages features native multi-language translation, allowing distributed global teams to collaborate seamlessly across languages.

* **Supported Languages**: English, Spanish, French, German, Japanese, Korean, Vietnamese, Chinese (Simplified & Traditional), Portuguese, Italian, Dutch, Russian, and Arabic.
* **Format Preservation**: Markdown formatting, bold/italic text, hyperlinked anchors, code snippets, and nested bullet structures remain intact during the translation process.

### Smart Block Conversions

Transform unstructured paragraphs into high-impact structural blocks with a single click:

* **Text to Table**: Convert comma-separated or list-based data into an editable matrix.
* **Paragraph to Checklists**: Turn procedural descriptions into interactive action items.
* **Bullet Points to Callouts**: Elevate critical guidelines into styled visual callout boxes.

***

## In-Document AI Image Generation

Create bespoke diagrams, illustrations, and conceptual graphics directly within your page without external design tools or stock photo subscriptions.

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2F20ji79mT0MpWowiluU5o%2Frounded-image%20(44).png?alt=media&amp;token=49ca9355-5f46-4bc4-ac5a-83d49ac35df7" alt=""><figcaption></figcaption></figure>

### Prompt & Style Parameters

* **Prompt-Driven Generation**: Describe the required visual in detail (e.g., *"Isometric 3D illustration of an enterprise cloud data pipeline with glowing nodes and server racks, slate and teal palette"*).
* **Reference Image Guidance**: Upload existing company brand assets, UI mockups, or sketches to guide the AI's composition, lighting, and color harmony.
* **Aspect Ratio Selection**:
  * `16:9 (Landscape)`: Optimized for page covers, section dividers, and presentation headers.
  * `1:1 (Square)`: Ideal for user avatars, badges, feature highlights, and thumbnail graphics.
  * `4:3 (Standard)`: Perfect for embedded inline diagram cards and side-by-side comparisons.

### Search Grounding for Visual Assets

Enable **Search Grounding** to allow the generative image model to pull verified real-world context, current brand logos, hardware designs, or timely architectural patterns into your generated graphics.

{% hint style="warning" %} <mark style="color:$warning;">**Archived Pages Restriction**</mark>\
AI generation tools (both text generation and image generation) are disabled while a document resides in the **Archive** state. You must restore the page before generating new AI content.
{% endhint %}

***

## Rich Media & Visual Customization

Enhance document legibility and brand consistency with native media embeds and workspace-wide design assets.

### Media Blocks & Asset Uploads

* **Image & File Embeds**: Insert `.png`, `.jpg`, `.jpeg`, `.webp`, `.svg`, or `.gif` files up to **30 MB** per asset.
* **Interactive Controls**: Resize images smoothly, align them (left, center, right, or full-width), add descriptive captions, and click to view full-screen lightbox previews.
* **Code & Math Blocks**: Embed syntax-highlighted code blocks across 20+ programming languages and render LaTeX mathematical expressions seamlessly.
* **Collapsible Sections & TOC**: Organize long-form documentation using collapsible toggle headings and an auto-generated, clickable Table of Contents.

### Admin Cover Gallery & Custom Banners

* **Admin Cover Gallery**: Workspace administrators can curate a shared collection of official brand banners (up to **10 MB** per image) for team-wide consistency.
* **Focal Point Repositioning**: Click and drag uploaded covers vertically to position the focal point perfectly across desktop and mobile screens.
* **Custom Icons**: Assign expressive emojis or upload company emblems to visually distinguish documents in the sidebar hierarchy and search results.
* **Explicit Attribute Clearing**: Reset or clear covers, icons, descriptions, or tags at any time with a single click without impacting the document's body content.

***

## Model Configuration & Administrative Controls

Diaflow gives workspace administrators granular governance over how generative AI is utilized across the organization.

### Per-Feature Model Assignment

Administrators can bind specific AI models to individual features to optimize between cost, speed, and analytical depth:

* **Fast Models**: Assigned to lightweight, high-frequency operations like *Proofread*, *Grammar Fix*, and *Formatting Conversion*.
* **High-Reasoning Models**: Assigned to complex tasks like *Write with AI (Full-Page Drafts)*, *Technical Specifications*, and *Deep Document Summarization*.
* **Image Synthesis Engines**: Assigned to in-document visual generation with customizable safety parameters.

***

### Next Steps

* [**Use Cases & Blueprints**:](/pages/use-cases.md) Explore operational blueprints for Product Specs, Engineering Wikis, Multilingual SOPs, and AI Agent RAG Bases.
* [**Import & Export in Pages**:](/pages/import-and-export-in-pages.md) Master document migration across 12+ formats and automated RAG compilation.
* [**Working with Pages**:](/pages/working-with-pages.md) Review rich text block editing, folder navigation, and comment threads.
* [**Diaflow Tables**:](/tables/introduction-to-diaflow-tables.md) Pair dynamic documentation with structured, actionable data grids.
