# Hosted AI

> Build new documents with Describe anything and edit open pages with AI edit using your monthly Hyperclay AI credits.

Source: https://hyperclay.com/docs/hosted-ai/

Hyperclay includes hosted AI features on the [Personal and Maker plans](https://hyperclay.com/docs/billing/): **Describe anything** builds a complete malleable document from a written brief, **AI edit** modifies an open document in place when you press `Cmd+J`, and **Add CMS with AI** wires up inline editing controls on a static HTML page.

## Describe anything

**Describe anything** turns a written description of the document you need into a working malleable document in your workspace.

1. In your workspace, open **New** and choose **New document**.
2. Click the **Describe anything** card (`Tell us what you need in your own words. We build a working app and save it as a new document.`).
3. Describe what the document should do, what data it holds, and how it should look. Your description must be at least **200 words** (and up to 20,000 characters), and around 500 words gives the build more to work with. A live counter shows `<n> more words to go` until you reach 200 words.
4. Press **Next**. Hyperclay writes follow-up questions for your description. The screen shows `Writing questions for your brief`. It usually takes under a minute, and after 20 seconds a `Use the standard questions instead` button appears. Each generated question asks about something your description leaves open, says why it is asking, and has an `Anything to add?` box. A suggested answer is already picked on each question and tagged `Suggested`. Change any that do not fit. Writing the questions is free and uses no credits. If the questions cannot be written, or if your account is on a trial, you get the standard questions instead (starting with `Who will use it?`).
5. Review the brief and click **Build · up to 350 credits**.

A build takes about 5 to 10 minutes (`Takes about 5 to 10 minutes`) and saves the finished document in your workspace. Starting a build reserves **350 credits** up front; a finished build usually uses **100 to 200 credits**, and displays `<chargedCredits> credits · <remaining> left this month` when complete. Failed builds are free (`Failed builds are free.`).

To write the follow-up questions, Hyperclay sends your description to DeepInfra, which runs **DeepSeek V4.1 Flash**, an open-weights model hosted in the US. The build itself runs on **Claude Opus 5.5** from Anthropic, which receives your description, your answers, and your comments.

## AI edit

In any hosted document that loads the ClayJS [ai-edit](https://clayjs.com/docs/plugins/ai-edit/) plugin, switch to edit mode (the **Edit** switch on the page, `Cmd+Shift+E`, or **Return to editing** in the workspace's document menu), then press `Cmd+J` (`Ctrl+J` on Windows and Linux), describe the change you want, and submit it.

Hosted AI edits use **DeepSeek V4.1 Flash**, an open-weights model hosted in the US that DeepInfra runs, and apply the change directly to the open page so you can inspect the result in place.

Each **AI edit** run has the following limits:

- **Credits**: Each edit costs **1 credit**, and only finished edits are charged.

In a block-based document, `/ai` makes a small interactive tool in the page (see [Tools](https://clayjs.com/docs/plugins/tools/)). Each tool costs **2 credits**, and only a tool delivered to the page is charged.
- **Document size**: The page must be **400 KB** or smaller, and each reply can generate up to **128,000 tokens**.
- **Concurrency**: Only one AI edit can run on a given page at a time, and you can run one AI edit at a time across your account.
- **Hourly rate limits**: Up to **40** edit starts per hour per person, and up to **150** edit starts per hour per billing account.
- **No `@file` references**: Hosted pages do not support `@file` attachments in prompts (`@file references are not supported on hyperclay.com yet. Remove them and try again.`).

### Add CMS with AI

If you import or write a static HTML page, you can also open the document's three-dot menu in the dashboard and choose **Add CMS with AI** (or **Regenerate CMS with AI**). Hyperclay inspects the page, adds [CMS](https://clayjs.com/docs/plugins/cms/) editing attributes and supporting markup, and saves the updated document. Review the generated fields on the page before sharing it.

The run always adds four theme settings to the CMS form: accent color, background color, heading font, and body font, each bound to the page's own CSS. A setting the page's CSS did not already use starts empty and changes nothing until you pick a value. Where the page has sections that suit it, the run also adds layout choices (columns, image side, card style). Regenerating keeps the values you have already chosen. The generated page opens its CMS in the sidebar; add [`data-cms-view="inline"`](https://clayjs.com/docs/plugins/cms/#inline-and-sidebar-views) to the rules tag to edit on the page instead.

## Plans and roles

Hosted AI requires an active paid **Personal** or **Maker** subscription. Trial accounts must upgrade to a paid plan before starting a build or an AI edit.

| Role | Describe anything | AI edit (`Cmd+J`) |
|---|---|---|
| **Personal workspace owner** (on Personal or Maker) | Yes | Yes |
| **[Team](https://hyperclay.com/docs/teams/) owner** (on Maker) | Yes | Yes |
| **Team editor** (on a team whose owner is on Maker) | Yes | Yes |
| **Team viewer** | No | No |
| **[One-document viewer or editor](https://hyperclay.com/docs/share-with-a-person/)** | No | No |
| **[View link or edit link](https://hyperclay.com/docs/share-links/) holder** | No | No |

The `ai-edit` helper only connects for the document's owner or a team editor with edit rights on the workspace. People opening a document through an edit link or a one-document share do not get hosted AI edit.

## Credits and billing

Every paid subscription includes a monthly pool of AI credits that resets on the 1st of each month (UTC):

- **Personal**: **1,000 credits** per month
- **Maker**: **2,000 credits** per month

### How reservations and charges work

- Before a run starts, Hyperclay checks that your remaining monthly balance covers the action's ceiling: **350 credits** for a **Describe anything** build, **1 credit** for an **AI edit**, or **2 credits** for a tool.
- While the build or edit is running, that ceiling is reserved from your pool.
- When a build finishes, Hyperclay charges only the credits actually used by the model and releases the rest of the reservation. An edit or a tool is a flat charge.
- If a build or edit fails before finishing, **0 credits** are charged.

### Team billing

On a team, all hosted AI usage draws from the **team owner's** monthly credit pool. When a team editor runs **AI edit** or **Describe anything** in the team workspace, the credits are billed to the team owner's account.

## Refusal messages

When a build or edit cannot start, Hyperclay shows one of these messages:

| Message | Meaning |
|---|---|
| `Choose a plan to build` / `Building needs a paid plan.` | Your account does not have an active Personal or Maker subscription. |
| `AI editing comes with a paid plan. Upgrade at hyperclay.com/pricing to use it.` | You pressed `Cmd+J` and sent an edit on an account without an active paid plan. |
| `Upgrade to build` / `Upgrade to build.` / `AI editing starts once your trial becomes a paid plan.` | Your account is currently on a trial; upgrade to a paid plan to use hosted AI. |
| `The description needs at least 200 words.` | Your **Describe anything** brief has fewer than 200 words. |
| `Not enough credits left for another build this month. They reset on <date>.` / `There aren't enough credits left this month for another build.` | You have fewer than 350 unreserved credits left in this month's pool. Your brief is saved so you can build it after the reset date. |
| `This edit could use up to <N> AI credits and you have <M> left this month. They reset on <date>.` / `You've used this month's AI credits…` | The billing account does not have enough credits left to reserve the edit. |
| `Another AI edit of yours is still running.` / `Another AI edit is running on this page.` | Wait for the active edit on your account or on that document to finish before sending another. |
| `That's a lot of AI edits in the last hour. Please wait a few minutes and try again.` | You reached the hourly rate limit (40 edits per hour per person, or 150 per hour per billing account). |
| `@file references are not supported on hyperclay.com yet. Remove them and try again.` | Remove `@file` tokens from your prompt before sending. |
| `Due to high demand, we ran out of AI credits. AI is back on <date>. Your brief is saved.` / `AI editing is paused right now. Please try again later.` | Platform-wide AI capacity is temporarily paused; your brief stays saved. |
