> ## Documentation Index
> Fetch the complete documentation index at: https://genui.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Markdown Template

> Create rich text documents with full Markdown support

The `markdown` template renders Markdown content as a beautiful, readable document.

## Content Schema

<ParamField body="content.text" type="string" required>
  Markdown-formatted text content. Supports GitHub Flavored Markdown.
</ParamField>

## Supported Markdown Features

* **Headings** (`#`, `##`, `###`, etc.)
* **Bold** and *italic* text
* `Inline code` and code blocks with syntax highlighting
* [Links](https://genui.sh) and images
* Ordered and unordered lists
* Tables
* Blockquotes
* Horizontal rules
* Task lists

## Example Request

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://genui.sh/api/artifacts \
    -H "Authorization: Bearer $GENUI_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "template": "markdown",
      "title": "Project Status Update",
      "content": {
        "text": "# Q4 Progress Report\n\n## Summary\n\nWe achieved **95%** of our quarterly goals.\n\n## Key Metrics\n\n| Metric | Target | Actual |\n|--------|--------|--------|\n| Revenue | $1M | $950K |\n| Users | 10,000 | 12,500 |\n\n## Next Steps\n\n1. Launch new feature\n2. Expand to new markets\n3. Hire 5 engineers"
      }
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://genui.sh/api/artifacts",
      headers={"Authorization": f"Bearer {GENUI_API_KEY}"},
      json={
          "template": "markdown",
          "title": "Project Status Update",
          "content": {
              "text": """# Q4 Progress Report

  ## Summary

  We achieved **95%** of our quarterly goals.

  ## Key Metrics

  | Metric | Target | Actual |
  |--------|--------|--------|
  | Revenue | $1M | $950K |
  | Users | 10,000 | 12,500 |

  ## Next Steps

  1. Launch new feature
  2. Expand to new markets
  3. Hire 5 engineers"""
          }
      }
  )
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://genui.sh/api/artifacts', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${GENUI_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      template: 'markdown',
      title: 'Project Status Update',
      content: {
        text: `# Q4 Progress Report

  ## Summary

  We achieved **95%** of our quarterly goals.

  ## Key Metrics

  | Metric | Target | Actual |
  |--------|--------|--------|
  | Revenue | $1M | $950K |
  | Users | 10,000 | 12,500 |

  ## Next Steps

  1. Launch new feature
  2. Expand to new markets
  3. Hire 5 engineers`
      }
    })
  });
  ```

  ```go Go theme={null}
  payload := map[string]interface{}{
      "template": "markdown",
      "title":    "Project Status Update",
      "content": map[string]string{
          "text": "# Q4 Progress Report\n\n## Summary\n\nWe achieved **95%** of our quarterly goals.",
      },
  }
  body, _ := json.Marshal(payload)

  req, _ := http.NewRequest("POST", "https://genui.sh/api/artifacts", bytes.NewBuffer(body))
  req.Header.Set("Authorization", "Bearer "+apiKey)
  req.Header.Set("Content-Type", "application/json")
  ```

  ```ruby Ruby theme={null}
  response = http.post(uri, {
    template: 'markdown',
    title: 'Project Status Update',
    content: {
      text: "# Q4 Progress Report\n\n## Summary\n\nWe achieved **95%** of our quarterly goals."
    }
  }.to_json)
  ```

  ```rust Rust theme={null}
  let response = client.post("https://genui.sh/api/artifacts")
      .header("Authorization", format!("Bearer {}", api_key))
      .json(&json!({
          "template": "markdown",
          "title": "Project Status Update",
          "content": {
              "text": "# Q4 Progress Report\n\n## Summary\n\nWe achieved **95%** of our quarterly goals."
          }
      }))
      .send().await?;
  ```

  ```csharp .NET theme={null}
  var response = await client.PostAsJsonAsync("https://genui.sh/api/artifacts", new {
      template = "markdown",
      title = "Project Status Update",
      content = new {
          text = "# Q4 Progress Report\n\n## Summary\n\nWe achieved **95%** of our quarterly goals."
      }
  });
  ```
</CodeGroup>

## Example Response

```json theme={null}
{
  "id": "art_md_abc123",
  "template": "markdown",
  "title": "Project Status Update",
  "status": "active",
  "createdAt": "2024-01-15T12:00:00Z"
}
```

## Use Cases

* **Documentation**: README files, guides, tutorials
* **Reports**: Status updates, summaries, analysis
* **Notes**: Meeting notes, research findings
* **Content**: Blog posts, articles, announcements
