# Use Krexel in ChatGPT

This guide takes about **5 minutes**. You'll create a Custom GPT that can read, edit, and ship sites on your Krexel account from inside ChatGPT. Once set up, you can say things like:

- *"Show me my last 5 deploys"*
- *"Edit the headline on my homepage to 'Welcome to my shop'"*
- *"Roll back to yesterday's deploy"*

…and ChatGPT calls Krexel for you.

> **Note on other paths:** The ChatGPT "Apps SDK" / OAuth connector is on our roadmap. Until it ships, the Custom GPT path documented here is what every ChatGPT customer uses. If you prefer terminal/IDE clients, see [/docs/install-mcp](https://krexel.com/docs/install-mcp) for Claude Code / Cursor / Windsurf / Codex.

## What you need

- A Krexel account (free at [krexel.com](https://krexel.com))
- A Krexel API key — get one at [krexel.com/settings/keys](https://krexel.com/settings/keys). **Create a dedicated key just for this GPT** so you can revoke it later without affecting anything else.
- ChatGPT Plus, Team, Enterprise, or Edu (free ChatGPT can't create Custom GPTs)
- The OpenAPI schema URL: **<https://krexel.com/chatgpt-gpt/openapi.json>** (you'll paste this into the GPT builder — don't download it)

---

## Step 1 — Get your Krexel API key

1. Open <https://krexel.com/settings/keys> in a browser.
2. Click **Create key**.
3. **Name:** `chatgpt-gpt` (so you remember what this is for).
4. **Scopes:** leave at default.
5. Click **Create**.
6. **Copy the key.** It looks like `krx_5ISKFqWcABC123…`. You can only see it once — paste it somewhere safe for the next step (or just keep the tab open).

> Keys always start with `krx_`. If yours starts with anything else, you copied the wrong thing.

## Step 2 — Open the GPT builder

1. Open ChatGPT in your browser.
2. Click your profile picture (top right) → **My GPTs** → **Create a GPT** (green button, top right).
3. Click the **Configure** tab at the top (not "Create").

You'll see a left panel with these fields, in this order. Fill them in one by one.

## Step 3 — Fill the basics panel

| Field in ChatGPT | What to type or paste |
|---|---|
| **Icon** | (Optional — leave the default if you don't care) |
| **Name** | `Krexel` |
| **Description** | `Reads, edits, and ships sites on Krexel. Use it to manage your Krexel deployments from ChatGPT.` |
| **Instructions** | Paste everything in the box below ↓ |

**Instructions (copy this entire block):**

```
You are the Krexel assistant. You help users read, edit, and ship sites on their Krexel account.

Before doing anything else, call getMyAccount. If it returns 401, the API key is wrong — tell the user to re-paste it in this GPT's Configure → Actions → Authentication panel and link them to https://krexel.com/settings/keys.

When the user wants to inspect or edit a deployed site:
1. Call listDeploys to find the relevant site/deploy.
2. If you need to see what files are in a deploy, call listFiles on that deploy.
3. To edit a file, call editFile with the EXACT current text in the "find" field. Read the file first (via listFiles → getDeploy) if you don't have it.
4. After every edit, show the user the new preview URL and a 1-line summary of what changed.

Always confirm before destructive operations (rollbacks, large rewrites, deletes).

Never echo the API key back to the user. Never log it. Never include it in error messages.

If the user asks to do something you cannot do (deploy from a folder, upload a binary file, attach a custom domain from inside ChatGPT), tell them honestly and point them to https://krexel.com/integrations for the local MCP path or the dashboard.
```

| Field | What to type |
|---|---|
| **Conversation starters** (4 boxes) | `Show me my recent deploys` · `Edit the headline on my homepage` · `Roll back my last change` · `What files are in my latest deploy?` |
| **Knowledge** | Leave empty |
| **Capabilities** | Turn OFF **Web Browsing** and **Canvas**. **Actions** (the next step) is the only capability we need. |

## Step 4 — Add the Krexel API as an Action

Scroll down to the **Actions** section at the bottom of the left panel.

1. Click **Create new action**.
2. A new panel opens. Find the **Authentication** box at the top.

   | Sub-field | Value |
   |---|---|
   | **Authentication type** (dropdown) | **API Key** |
   | **Auth Type** (second dropdown, appears after picking API Key) | **Bearer** |
   | **API Key** (the text field below) | Paste your Krexel key — just the key itself, like `krx_5ISKFqWcABC123…`. **Do NOT include the word "Bearer " — ChatGPT adds that automatically.** |

3. Below Authentication, find the **Schema** section. It has two options: **Import from URL** or paste JSON.

   Click **Import from URL** and paste:
   ```
   https://krexel.com/chatgpt-gpt/openapi.json
   ```

   ChatGPT will fetch it and populate the action list. You should see 14 actions appear: `getMyAccount`, `listDeploys`, `getDeploy`, `listFiles`, `getDeployLogs`, `editFile`, `rollbackDeploy`, `listSites`, `createSite`, `getSite`, `listSiteDeploys`, `triggerDeploy`, `listDomains`, `attachDomain`.

   If the import fails (red error text), the URL might be unreachable from your network. In that case click **Schema** instead and paste the raw JSON you can fetch from the URL above.

## Step 5 — Save and try it

1. Click **Save** (top right of the GPT builder).
2. Choose **Only me** (private) or **Anyone with a link** (shareable).
3. Open your new GPT from the **My GPTs** list.
4. Type: `Show me my account`

You should see ChatGPT respond with something like:

> Connected as you@example.com — Plan: free

If you see that, you're done.

---

## Troubleshooting

### "Authentication failed" or 401 on first call

The most common cause is a typo in the **API Key** field in the Actions panel.

1. Open **Configure → Actions → Authentication**.
2. Check the value — it should be just the key (`krx_…`). If you see `Bearer krx_…` in the field, remove the `Bearer ` prefix — ChatGPT adds it itself.
3. Check there are no leading or trailing spaces.
4. If your key has been revoked (you deleted it at krexel.com/settings/keys), create a new one and paste that.

### "Something went wrong" when you try to talk to it

Open the GPT, click the GPT's name (top of the chat) → **Configure** → **Actions** and confirm:

- The schema is still there (14 actions listed)
- Authentication shows **API Key → Bearer** with a non-empty key

If the schema is empty, re-import from the URL in Step 4.

### The GPT says it can't do something

Some operations aren't available in this surface:

- **Ship from a folder on your computer** — needs the local MCP ([krexel.com/docs/install-mcp](https://krexel.com/docs/install-mcp)) or the dashboard's drag-drop. The Custom GPT only edits sites that already exist on Krexel.
- **Upload a binary file** (image, PDF) — same as above.
- **Attach a custom domain from inside ChatGPT** — `attachDomain` records the CNAME setup, but the actual DNS change has to happen at your registrar. See [krexel.com/docs/connect-custom-domain](https://krexel.com/docs/connect-custom-domain).
- **Provision SSL** — automatic via Cloudflare once the CNAME is in place. Watch the dashboard's Domains tab for status.

### The GPT echoes my API key back at me

That shouldn't happen — the Instructions field tells it not to. If it does, your API key is now exposed in your conversation history. **Go to krexel.com/settings/keys and delete that key immediately**, then create a new one and re-paste it in the GPT's Configure → Actions panel.

---

## Security

- Your key is stored by OpenAI in the GPT config. Revoke any time at [krexel.com/settings/keys](https://krexel.com/settings/keys) — access cuts off the next time the GPT tries to call.
- Create a **dedicated key per integration** (one for this GPT, one for any other tools). That way revoking one doesn't break anything else.
- Use the **Scopes** field when you create the key to limit what it can do (e.g. read-only if you only want the GPT to inspect, never deploy).

## Help

Stuck? Email **help@krexel.com** or check [/integrations](https://krexel.com/integrations) for other ways to connect (Claude Code, Cursor, Windsurf, Codex).

---

Last reviewed: 2026-07-19. Schema URL: <https://krexel.com/chatgpt-gpt/openapi.json>. Auth shape: HTTP Bearer (just the `krx_…` key, no prefix).