ILD AI API Documentation

The ILD AI service provides endpoints for AI-powered features including chatbots, text tutors, image generation, and PDF chat functionality. The API is divided into three main sections: Public, Private, and Admin endpoints.

Public Endpoints

These endpoints are accessible without authentication, but require appropriate AI tokens.

Chatbot

Send Chatbot Message

  • Endpoint: POST /planer/component/:componentId/chatbot/:chatbotId/message
  • Description: Sends a message to a chatbot within a planer component
  • Parameters:
  • componentId (path): Planer component identifier
  • chatbotId (path): Chatbot identifier
  • Authentication: Requires AI tokens
  • Response: Chatbot response message
  • Status Codes:
  • 200: Success
  • 400: Bad Request
  • 401: Unauthorized
  • 500: Internal Server Error

Image Generation

Generate Image

  • Endpoint: POST /planer/component/:componentId/imagegen
  • Description: Generates an image based on provided parameters
  • Parameters:
  • componentId (path): Planer component identifier
  • Authentication: Requires AI tokens (17000)
  • Response: Generated image data
  • Status Codes:
  • 200: Success
  • 400: Bad Request
  • 401: Unauthorized
  • 500: Internal Server Error

Text Tutor

Send Text Tutor Component Message

  • Endpoint: POST /planer/component/:componentId/texttutor/:textTutorId/component/:tComponentId/message
  • Description: Sends a message to a text tutor component
  • Parameters:
  • componentId (path): Planer component identifier
  • textTutorId (path): Text tutor identifier
  • tComponentId (path): Text tutor component identifier
  • Authentication: Requires AI tokens
  • Response: Text tutor response message
  • Status Codes:
  • 200: Success
  • 400: Bad Request
  • 401: Unauthorized
  • 500: Internal Server Error

Private Endpoints

These endpoints require authentication and appropriate role permissions.

Chatbot Management

Get Chatbots

  • Endpoint: GET /chatbot
  • Description: Retrieves all chatbots for the authenticated user/team
  • Authentication: Required
  • Response: Array of chatbot objects
  • Status Codes:
  • 200: Success
  • 401: Unauthorized
  • 500: Internal Server Error

Create Chatbot

  • Endpoint: POST /chatbot
  • Description: Creates a new chatbot
  • Authentication: Required (Team role: READ_GROUP, License: CHATBOT)
  • Request Body: Multipart form data
  • placeholder (file): Chatbot placeholder image
  • Other chatbot configuration fields
  • Response: Created chatbot object
  • Status Codes:
  • 201: Created
  • 400: Bad Request
  • 401: Unauthorized
  • 403: Forbidden
  • 500: Internal Server Error

Get Chatbot

  • Endpoint: GET /chatbot/:chatbotId
  • Description: Retrieves a specific chatbot
  • Authentication: Required
  • Parameters:
  • chatbotId (path): Chatbot identifier
  • Response: Chatbot object
  • Status Codes:
  • 200: Success
  • 401: Unauthorized
  • 404: Chatbot not found
  • 500: Internal Server Error

Update Chatbot

  • Endpoint: PUT /chatbot/:chatbotId
  • Description: Updates an existing chatbot
  • Authentication: Required (Team role: EDIT_GROUP)
  • Parameters:
  • chatbotId (path): Chatbot identifier
  • Request Body: Multipart form data
  • placeholder (file): Updated chatbot placeholder image
  • Other chatbot configuration fields
  • Response: Updated chatbot object
  • Status Codes:
  • 200: Success
  • 400: Bad Request
  • 401: Unauthorized
  • 403: Forbidden
  • 404: Chatbot not found
  • 500: Internal Server Error

Delete Chatbot

  • Endpoint: DELETE /chatbot/:chatbotId
  • Description: Deletes a chatbot
  • Authentication: Required (Team role: DELETE_GROUP)
  • Parameters:
  • chatbotId (path): Chatbot identifier
  • Status Codes:
  • 204: No Content
  • 401: Unauthorized
  • 403: Forbidden
  • 404: Chatbot not found
  • 500: Internal Server Error

Send Chatbot Message

  • Endpoint: POST /chatbot/:chatbotId/message
  • Description: Sends a message to a chatbot
  • Authentication: Required (Team role: READ_GROUP, AI tokens)
  • Parameters:
  • chatbotId (path): Chatbot identifier
  • Response: Chatbot response message
  • Status Codes:
  • 200: Success
  • 400: Bad Request
  • 401: Unauthorized
  • 403: Forbidden
  • 500: Internal Server Error

Create Chatbot Document

  • Endpoint: POST /chatbot/:chatbotId/document
  • Description: Creates a document for a chatbot
  • Authentication: Required (Team role: EDIT_GROUP)
  • Parameters:
  • chatbotId (path): Chatbot identifier
  • Response: Created document object
  • Status Codes:
  • 201: Created
  • 400: Bad Request
  • 401: Unauthorized
  • 403: Forbidden
  • 500: Internal Server Error

Delete Chatbot Document

  • Endpoint: DELETE /chatbot/:chatbotId/document
  • Description: Deletes a chatbot document
  • Authentication: Required (Team role: EDIT_GROUP)
  • Parameters:
  • chatbotId (path): Chatbot identifier
  • Status Codes:
  • 204: No Content
  • 401: Unauthorized
  • 403: Forbidden
  • 404: Document not found
  • 500: Internal Server Error

Image Generation

Generate Image

  • Endpoint: POST /imagegen
  • Description: Generates an image based on provided parameters
  • Authentication: Required (Team role: EDIT_GROUP, AI tokens: 17000)
  • Response: Generated image data
  • Status Codes:
  • 200: Success
  • 400: Bad Request
  • 401: Unauthorized
  • 403: Forbidden
  • 500: Internal Server Error

PDF Chat

Create Chat PDF Context

  • Endpoint: POST /chatpdf
  • Description: Creates a new PDF chat context
  • Authentication: Required (Team role: EDIT_GROUP)
  • Response: Created PDF chat context object
  • Status Codes:
  • 201: Created
  • 400: Bad Request
  • 401: Unauthorized
  • 403: Forbidden
  • 500: Internal Server Error