Extract all AI-related logic from the main REST handler into a new standalone `ais` package. This improves code organization by isolating AI-specific concerns, reduces coupling in the handler layer, and prepares for independent testing and future extension of AI capabilities.
Implement a new ApiClient class in api_client.cs providing core HTTP functionality including GET, POST, PUT, and DELETE methods with configurable base URL, timeout settings, and structured error response handling for REST API interactions.