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

# CLAUDE

# CLAUDE.md

This is the Krea AI documentation repository, built with [Mintlify](https://mintlify.com/).

## Repository Structure

```
/docs (root)
├── api-reference/              # Auto-generated API documentation from OpenAPI spec
├── developers/                 # Developer guides and code examples
│   ├── examples/              # Code samples (text-to-image, image-to-video, etc.)
│   └── tutorials/             # In-depth tutorials
├── user-guide/                # End-user documentation
│   ├── features/              # Tool documentation (Flux, Video, RealTime, etc.)
│   ├── get-started/           # Onboarding content
│   └── help-and-support/      # Support guides (billing, SSO, subscriptions)
├── snippets/                  # Reusable React/JSX components for MDX
├── images/                    # Assets and logos
├── bin/                       # Utility scripts
│   └── uploadimg.py          # Upload images to R2 CDN
├── docs.json                  # Main Mintlify configuration
└── home.mdx                   # Documentation homepage
```

## Configuration

* **Platform:** Mintlify (`docs.json` is the main config file)
* **OpenAPI:** Auto-generates API reference from `https://api.krea.ai/openapi.json`
* **Theme:** Light/dark mode with primary color `#0C0C15`

## Page Conventions

### Frontmatter

All MDX pages use YAML frontmatter:

```yaml theme={null}
---
title: "Page Title"
description: "Short description for SEO (100-160 characters)"
sidebarTitle: "Sidebar label (optional, shorter than title)"
icon: "icon-name"
---
```

### Mintlify Components

* **Callouts:** `<Info>`, `<Tip>`, `<Warning>`, `<Note>`, `<Check>`
* **Cards:** `<Card title="..." icon="..." href="...">`, `<CardGroup cols={2}>`
* **Steps:** `<Steps>` / `<Step title="...">`
* **Tabs:** `<Tabs>` / `<Tab title="...">`
* **Accordions:** `<AccordionGroup>` / `<Accordion title="...">`
* **Code:** `<CodeGroup>` for multi-language examples

### Custom Components (in `/snippets`)

* `HeroHeader.jsx` - Banner with image/video
* `ImageCard.jsx` / `VideoCard.jsx` - Linked cards
* `ModelOverviewCard.jsx` - Model selection cards
* `ModelAccordion.jsx` - Expandable model details

## Adding New Pages

1. Create `.mdx` file in the appropriate directory
2. Add frontmatter with title and description
3. Add the page path to `docs.json` under the correct navigation group
4. Use existing pages as templates for consistent formatting

## Commands

```bash theme={null}
# Install Mintlify CLI
npm i -g mint

# Run local development server
mint dev

# Build for production
mint build
```

## Uploading Images

Images are hosted on Cloudflare R2 at `https://s.krea.ai/`. Use the upload utility:

```bash theme={null}
# Requires: npx (Node.js), wrangler login (one-time auth)
npx wrangler login  # First time only

# Upload an image (auto-prefixes with docs/)
./bin/uploadimg.py screenshot.png

# Upload with custom name
./bin/uploadimg.py screenshot.png --name sso-modal.png
# Result: https://s.krea.ai/docs/sso-modal.png
```

**R2 Details:**

* Bucket: `static`
* Public URL: `https://s.krea.ai/`
* Docs images go in: `docs/` folder (e.g., `s.krea.ai/docs/image.png`)

**Placeholder Images:**
Use `https://placehold.co/` for draft screenshots before real images are ready:

```markdown theme={null}
![Modal screenshot](https://placehold.co/600x400?text=SSO+Config+Modal)
```

CI will block merging until all `placehold.co` URLs are replaced with real images.

## Style Guidelines

* Use clear, concise language
* Include step-by-step instructions with `<Steps>` component
* Add provider-specific instructions in `<Tabs>` when applicable
* Include troubleshooting sections with `<AccordionGroup>`
* Link to related pages and external resources
* **External links:** Add ↗ arrow to link text (e.g., `[Google Docs ↗](https://...)`)
* Images hosted on `s.krea.ai` CDN or in `/images` folder

## Contact

* Support: [support@krea.ai](mailto:support@krea.ai)
* Sales (Enterprise): [sales@krea.ai](mailto:sales@krea.ai)
* Discord: [https://krea.ai/discord](https://krea.ai/discord)

***

## Krea Product Context

Krea is a creative AI platform for generating, enhancing, editing, and animating images and videos. It serves creative professionals in branding, architecture, filmmaking, and fashion.

### Subscription Plans

* **Free:** Limited usage for exploration
* **Pro:** Enhanced limits for regular users
* **Artist:** Higher limits for professional creators
* **Enterprise:** Custom limits, SAML SSO, dedicated support

### Core Features

1. **Flux / KREA Image** - Primary image generation tool combining text prompts, style references, and aspect ratio controls
   * Models: Flux, Flux 1.1 Pro, Flux 1.1 Pro Ultra, Ideogram 2.0, Imagen 4

2. **RealTime** - Dynamic environment for live, instant image updates as you adjust prompts
   * Supports text-based, canvas mode, screen sharing, and camera input

3. **Enhancer** - Upscale images up to 8x, adjust clarity, add effects
   * Presets: Default, Flat Sharp, Strong, Reinterpretation, Oil Painting, Digital Art

4. **Edit** - Canvas-based tool for modifying, blending, and expanding images
   * Tools: Select, Change Region, Cut Objects, Extend Frames (Outpainting), Add & Blend

5. **Video Models** - AI video generation for storytelling and promotional content
   * Models: Hunyuan, Hailuo, 01-Live, Luma, Runway, Kling, Veo 3

6. **Training** - Upload datasets to train custom models for consistent stylistic outputs
