# Ask AI button

> A single inline 'Ask AI' button that opens the assistant.

The Ask AI button is one button in your brand colour labelled "Ask AI". A click opens the chat window, ready for typing.

## Add the button

With the [widget script](/en/docs/widgets/) already on the page, add a container and the Ask AI module where the button should go:

```html
<div id="ask-ai-prosecaptain"></div>
<script
  src="https://widget-api.prosecaptain.com/embed-ask-ai.js"
  data-widget-token="YOUR_TOKEN"
  data-widget-id="WIDGET_ID"
  data-container="ask-ai-prosecaptain"
  data-widget-server-url="https://widget-api.prosecaptain.com"
></script>
```

## Parameters

| Parameter | Default | Description |
|---|---|---|
| `data-widget-token` | none | Workspace token. Required. |
| `data-widget-id` | none | Widget id. |
| `data-container` | `ask-ai-prosecaptain` | The `id` of the element the button renders into. |
| `data-theme` | `light` | `light` or `dark`. |
| `data-widget-server-url` | `https://widget-api.prosecaptain.com` | Widget server URL. |

## Your own button or link

Instead of the ready-made button you can use your own link. Add the `pc-ask-question` attribute to any link and a click opens the chat and sends that question:

```html
<a href="#" pc-ask-question="How much does onboarding cost?">Ask about pricing</a>
```

More in [JavaScript API](/en/docs/javascript-api/).