Introduction

Use Rest API that comes with the Davinci AI to connect your applications and leverage core AI features of Davinci AI.

Support for more AI tools via Rest API is coming in the near future

Rest API Configuration

To setup Rest API at your installation, follow these steps:

1

Step 1

Open terminal in your hosting platform.

2

Step 2

Next, you will need to install Laravel Passport feature and generate the encryption keys. Run the following command in your terminal

php artisan passport:install
3

Step 3

Copy and save the generated Client ID and Client Secret values generated in your terminal after running the Step 2 command. You’ll need these for accessing the RestAPI

4

Step 4

Laravel Passport tables should already be included in your database as they come with the update package but you can migration command at any time if needed as it does not alter any of the existing tables.

php artisan migrate
5

Step 5

To generate RestAPI documentation using L5-Swagger so that you can have access to the actual supported Rest API calls list, type the following command in your terminal:

php artisan l5-swagger:generate
6

Step 6

Congratulations! You now have RestAPI and documentation properly installed in your script. To access RestAPI documentations visit following URL in your browser:
https://YOUR-DOMAIN-NAME/api/v1/documentation

7

Step 6

You have successfully configured the RestAPI, follow the RestAPI docs on further information