Docs / Generate tables with AI

Generate tables with AI

Generate tables with AI

AI Generate lets you describe the table you want in plain language and have MMTable populate it for you. It calls the Anthropic API with your prompt and the response fills the editor as if you'd typed every cell.

One-time setup: add your Anthropic API key

Get a key from console.anthropic.com. Anthropic charges per API call; for table generation a typical call costs a fraction of a cent.

  1. In WordPress admin, go to MMTables → Settings → AI.
  2. Paste your API key (it starts with sk-ant-) into the field.
  3. Click Save. The key is stored in WordPress options with autoload disabled so it doesn't bloat every page load.

The key is masked when you return to the settings page — only the last four characters are visible, and re-submitting the masked value preserves the stored key.

Generate a table

  1. Open a new MMTable in the editor.
  2. Click the AI Generate button in the toolbar (sparkle icon).
  3. Pick a starter prompt chip or type your own. Be specific — "top 10 most populous US cities with state and population" works far better than "cities".
  4. Click Generate. After a few seconds the table fills with rows.
  5. Edit anything you want — it's a normal table from here on.

Writing effective prompts

Two patterns work well:

Pattern 1 — describe rows and columns explicitly. Tell the AI both axes:

"10 SaaS unicorns founded after 2015, with company name, year founded, headquarters, and total funding raised."

Pattern 2 — describe the use case. The AI picks reasonable columns:

"A comparison table of the four major US wireless carriers' unlimited plans for shoppers."

Avoid prompts that ask for tables that change daily ("today's stock prices") — the AI doesn't have live data, only training-data approximations. Live data goes through remote data sources (Pro).

Troubleshooting

"API key is required" — you haven't pasted a key in Settings yet, or you have but the save didn't take. Reload the settings page and confirm the masked key shows the right last four characters.

"Anthropic keys start with sk-ant-" — you pasted a key from a different provider. MMTable uses Anthropic only.

The table comes back almost empty — the prompt was too vague. Add column names you want, a row count, or an example row to anchor the response.