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

# API and MCP

Create API keys and connect AI assistants such as ChatGPT, Claude and Cursor to your Luw\.ai account from the API & MCP page.

This page covers the **API & MCP** page in app.luw\.ai, where you create API keys for your own software and connect AI assistants to your Luw\.ai account. For the full API reference, see the [Luw.ai API docs](https://luw-ai.gitbook.io/api).

Open it with **API & MCP** in the sidebar, or **View API keys** in the phone menu. The page is titled **Luw\.ai API & MCP** and has two tabs, **API** and **MCP**. Status dots at the top show whether the services are up, and **API Documentation** links to the API docs.

## The API tab

### Create an API key

1. Open the **API** tab. If you're signed out, sign in first: "Sign in to create and manage your API keys."
2. Under **API keys**, type a name for the key in the "Enter token name" box. A name that says where you'll use it helps later.
3. Click **Create token**. The new key appears in the list.

### Copy a key

Click the copy button next to the key. "API token copied to your clipboard!" confirms it. Paste it into your software or your assistant's settings.

{% hint style="warning" %}
Treat an API key like a password: don't share it with anyone.
{% endhint %}

### Delete a key

1. Click the delete button next to the key.
2. The "Delete token" window warns that this can't be undone and that MCP setups and integrations using this key will stop working.
3. Click **Delete**, or **Cancel** to keep it.

### REST API quick start

Under the keys, **REST API quick start** shows how to call the API with your key. The [API docs](https://luw-ai.gitbook.io/api) have every endpoint and parameter.

## The MCP tab

MCP lets an AI assistant, such as ChatGPT or Claude, use Luw\.ai's tools for you: you ask in the chat, and the assistant runs the Luw\.ai tool on your behalf.

<figure><img src="https://1930792265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4yESzclcaZeSiIDZ8eIa%2Fuploads%2Fgit-blob-e1381bae2f9ee45919dfd217376f5078f4f0e987%2Fapi-mcp-mcp-tab.webp?alt=media" alt="The MCP tab: &#x27;Connect your AI assistant in seconds&#x27;, the note &#x27;No key needed: your assistant will ask you to sign in to Luw.ai.&#x27;, step 1 Pick your assistant with ChatGPT, claude.ai, Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, Codex CLI, Gemini CLI and Other, step 2 Install, a sample request, and What you can do with tools and their credit costs"><figcaption><p>Pick your assistant, follow the install steps, then just ask</p></figcaption></figure>

### Connect your assistant

The tab is headed "Connect your AI assistant in seconds", with the note "No key needed: your assistant will ask you to sign in to Luw\.ai."

1. Under **1 Pick your assistant**, click yours: **ChatGPT**, **claude.ai**, **Claude Code**, **Claude Desktop**, **Cursor**, **VS Code**, **Windsurf**, **Codex CLI**, **Gemini CLI**, or **Other** for any other assistant that supports MCP.
2. Under **2 Install**, follow the steps shown for that assistant.
3. If your assistant asks you to sign in, sign in with your Luw\.ai account.

For Claude Code, Cursor, VS Code and Other, the install step lets you choose **Cloud** or **Local**:

* **Cloud** needs nothing installed, but only works with images you give as links.
* **Local** can read image files on your computer. It needs Node.js 18 or later. It uses an API key, which the page creates for you automatically when you're signed in.

ChatGPT and claude.ai always use the cloud setup. Windsurf, Codex CLI and Gemini CLI use the local one. Claude Desktop is local too, but installs from a downloaded file (**Download luw\.mcpb**) and doesn't need Node.js.

### Try it

Once it's installed, try the page's own example: tell your assistant "Redesign this living room in Japandi style" and give it a link to the photo. With a local setup, you can give it the photo's path on your computer instead.

### What you can do

**What you can do** lists the tools your assistant can use and what each costs, for example "Redesign a room or furnish an empty one", luw\_interior\_design, 1 credit. Everything your assistant makes uses credits from your Luw\.ai account, at the prices shown there.

### Connect by hand

If your assistant asks for a server address, the hosted Luw\.ai MCP server is:

```
https://mcp.luw.ai/mcp
```

You sign in with your Luw\.ai account. There is also an npm package, `@luw-ai/mcp`, for running it on your own computer.

## Related

* [Luw.ai API docs](https://luw-ai.gitbook.io/api)
* [Credits and engines](/luw.ai-app-docs/getting-started/credits-and-engines.md)
* [Help and support](/luw.ai-app-docs/connect/help-and-support.md)
