Use Craft’s API to Build With Lovable
With the API switched on, your Craft docs are ready to power the apps you create. From there, you can jump into Lovable and build something new with your doc’s data
Enabling the API for Documents
First, you have to enable the API in order for Craft to setup an API endpoint for your documents. Then, you use the API endpoint URL to connect to the server from Lovable.

Step 1

Step 2

Step 3

Step 4

Step 5

Step 6
Using the API in a Lovable Prompt
Once the API is enabled for your Craft docs, you can now focus on writing a prompt that Lovable will use to generate your project.
In order for Lovable to see how to use the API and understand the structure of your document, you attach the AI bundle to your prompt. This bundle is a markdown document that contains the current content of your Craft doc as well as the API documentation.

Step 1

Step 2
Now you can add a prompt to describe the app you want to build. Here is a very general example that can be used for testing:
Please create a website that visualises the content of my connected Craft docs. You find instructions on how to access this data and its structure in the attached file.

Step 3





