# AI Service Integration

The SmartPasteButton requires an AI service endpoint that processes clipboard text and returns structured values for the form fields.

In the demos, the SmartPasteButton is configured with the Telerik demo AI service.

## Configuring the SmartPasteButton Service

```Razor HtmlHelper
@(Html.Kendo().SmartPasteButton()
    .Name("smartPasteButton")
    .Service("https://demos.telerik.com/service/v2/ai/smartpaste/smartpaste")
    .Text("Smart Paste")
)
```

## Using the Service through the Form SmartPaste Configuration

```Razor HtmlHelper
@(Html.Kendo().Form<ResponsiveFormViewModel>()
    .Name("responsiveForm")
    .Orientation("vertical")
    .ClearButton(true)
    .SmartPaste(s => s
        .Name("smartPaste")
        .Service("https://demos.telerik.com/service/v2/ai/smartpaste/smartpaste")
        .Text("Smart Paste")
        .Events(e => e.RequestStart("onRequestStart").RequestEnd("onRequestEnd").Error("onError"))
    )
)
```

> When using the SmartPaste configuration through the Form TagHelper (`form-smart-paste`), the available event handler attributes are `on-request-start` and `on-request-end`.

## See Also

* [SmartPasteButton Overview](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/navigation/smartpastebutton/overview)

* [Events of the SmartPasteButton](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/navigation/smartpastebutton/events)

* [Error Handling](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/navigation/smartpastebutton/error-handling)

* [Server-Side API of the SmartPasteButton ](https://www.telerik.com/aspnet-mvc/documentation/api/smartpastebutton)

* [Knowledge Base Section](https://www.telerik.com/aspnet-mvc/documentation/knowledge-base)
