> For the complete documentation index, see [llms.txt](https://docs.scaleflex.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scaleflex.com/digital-asset-management-dam/plugins-and-connectors/connectors/kontent.ai.md).

# Kontent.ai

#### Installation <a href="#od_d213f5ca" id="od_d213f5ca"></a>

1. Have a Kontent CMS setup. <https://kontent.ai/>
2. Add custom element

Content model (left hand side) > Create new > Custom element (right hand side). You will then have the below view.

<figure><img src="https://docs.scaleflex.com/~gitbook/image?url=https%3A%2F%2F3586816136-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fl0Yvbyw1t10jWRzoi0FW%252Fuploads%252FV3nimJLeFXOLGJLNv2Xv%252FKontent_custom_element.png%3Falt%3Dmedia%26token%3D8b0a594d-880f-4884-ad0b-bcf7faacd3ed&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=ffd90988&#x26;sv=1" alt=""><figcaption></figcaption></figure>

\*\*Hosted code URL: <https://scaleflex.cloudimg.io/v7/plugins/filerobot-kontent/filerobot-custom-element.html?func=proxy>

**Parameters:**

```
{
    "token": "token",
    "secTemplate": "your_security_template",
    "dir": "/base_directory"
}
```

*note: "dir" element is optional, by default will go to the root folder of your library. Do not add "/" at the end of the directory string.*

1. Create new content with this Custom Element

Content & asset (left hand side) > Create new > Chose type: Your\_Type\_Name. Chose and add some images, publish. You will then have the below view.

<figure><img src="https://docs.scaleflex.com/~gitbook/image?url=https%3A%2F%2F3586816136-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fl0Yvbyw1t10jWRzoi0FW%252Fuploads%252FPm9fBBl1hfQpawk5pkSp%252FK2.png%3Falt%3Dmedia%26token%3De4c76961-0c40-4d38-87d0-1d4d6d5258f7&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=ba0f02ee&#x26;sv=1" alt=""><figcaption></figcaption></figure>

The images below are the images added in from the Widget into a Kontent content-item. When they are added, they will have DAM-URLs (instead of their Strapi CMS URLs).

#### Previewing <a href="#od_7791d727" id="od_7791d727"></a>

Tutorial: <https://kontent.ai/learn/tutorials/develop-apps/build-strong-foundation/set-up-preview/>

Go to **Settings > API Keys**. For this, you will need your **Project ID**. You may also need your **API Key** (depends on what you want to do, but for simple things Project ID is enough).

<figure><img src="https://docs.scaleflex.com/~gitbook/image?url=https%3A%2F%2F3586816136-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fl0Yvbyw1t10jWRzoi0FW%252Fuploads%252F3yWcVAT9VshUcrJQxl9U%252FK3.png%3Falt%3Dmedia%26token%3Ddf6d8cd9-400a-4f6e-911b-5c98b39d83b1&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=437e3637&#x26;sv=1" alt=""><figcaption></figcaption></figure>

Write a **client app** that utilizes the **Delivery API**

*Recall that Kontent have 3 sets of APIs that you can interact with*

<figure><img src="https://docs.scaleflex.com/~gitbook/image?url=https%3A%2F%2F3586816136-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fl0Yvbyw1t10jWRzoi0FW%252Fuploads%252FaG9492jCM5IdlZBCwMV3%252FK4.png%3Falt%3Dmedia%26token%3D246f64d0-5c1e-4293-9f3f-3a2881e30fd4&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=57c5babf&#x26;sv=1" alt=""><figcaption></figcaption></figure>

*Delivery APIs in plain HTTPS form can be downloaded from* [*https://kontent.ai/learn/tutorials/develop-apps/get-started/postman-collection/*](https://kontent.ai/learn/tutorials/develop-apps/get-started/postman-collection/) *and imported into POSTMAN*

<figure><img src="https://docs.scaleflex.com/~gitbook/image?url=https%3A%2F%2F3586816136-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fl0Yvbyw1t10jWRzoi0FW%252Fuploads%252FxDcoDt2SyX2ZBRRfkdKv%252FK5.png%3Falt%3Dmedia%26token%3D2626c674-598a-4619-bd58-bb656fe9a07a&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=8f478a13&#x26;sv=1" alt=""><figcaption></figcaption></figure>

For the 3 content items that come out of the box, Kontent already have an **example client app**, which we can **imitate**.

* This example app was made by using React JS <https://github.com/kontent-ai/sample-app-react>
* Hosted on various Github Pages.

<figure><img src="https://docs.scaleflex.com/~gitbook/image?url=https%3A%2F%2F3586816136-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fl0Yvbyw1t10jWRzoi0FW%252Fuploads%252FODySP974EauGcFoQ9ukk%252FK6.png%3Falt%3Dmedia%26token%3D60aadaa6-5193-454d-b1d8-b478d52b85fc&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=ba05b29a&#x26;sv=1" alt=""><figcaption></figcaption></figure>

After writing and hosting your client app, go to **Settings > Preview URLs** and **define your Preview URL formats**.

See how Kontent defined their preview URLs for their example app:

<figure><img src="https://docs.scaleflex.com/~gitbook/image?url=https%3A%2F%2F3586816136-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fl0Yvbyw1t10jWRzoi0FW%252Fuploads%252Fqnyups0iuAsXPxmrZGaE%252FK7.png%3Falt%3Dmedia%26token%3D4b7fd9b0-68b9-4942-a5b6-cba174a40163&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=7711f24a&#x26;sv=1" alt=""><figcaption></figcaption></figure>

`Codename`, `URLSlug` & `ItemId` are obtained as follows:

<figure><img src="https://docs.scaleflex.com/~gitbook/image?url=https%3A%2F%2F3586816136-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fl0Yvbyw1t10jWRzoi0FW%252Fuploads%252FOUoV6xxyViU6mg2gvLoM%252FK8.png%3Falt%3Dmedia%26token%3D058bce09-31f3-4588-be16-64ecacd779c4&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=fcd6d23f&#x26;sv=1" alt=""><figcaption></figcaption></figure>

Once you done all the above, you can preview by clicking **Preview:**

<figure><img src="https://docs.scaleflex.com/~gitbook/image?url=https%3A%2F%2F3586816136-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fl0Yvbyw1t10jWRzoi0FW%252Fuploads%252FvPaNKhiG5rt03rPbUgqi%252FK9.png%3Falt%3Dmedia%26token%3Dea832172-8068-4313-99c9-d2993128904a&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=6378d261&#x26;sv=1" alt=""><figcaption></figcaption></figure>

#### Support <a href="#od_dd36effa" id="od_dd36effa"></a>

* <https://kontent.ai/community/> or <https://kontent.ai/discord>
* <https://scaleflex.zendesk.com/hc/en-gb/requests/new> or <hello@scaleflex.com>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.scaleflex.com/digital-asset-management-dam/plugins-and-connectors/connectors/kontent.ai.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
