Cloud resource optimization is a critical challenge in modern distributed systems, particularly as workloads become more dynamic and unpredictable. This paper presents an AI-driven framework for cloud resource optimization that autonomously manages and allocates resources in real time based on workload demands. By leveraging machine learning techniques, including predictive modeling and reinforcement learning, the framework dynamically adjusts CPU, memory, and bandwidth allocations to improve both cost efficiency and system performance. The proposed framework continuously learns from historical and real-time data, enabling proactive resource scaling to prevent over- or under-provisioning. We evaluate the framework using historical resource usage data from leading cloud platforms, demonstrating significant improvements in resource utilization, cost savings, and application performance. The results highlight the framework’s effectiveness in optimizing cloud environments for AI-driven applications and web services. Future research could expand this approach to hybrid cloud-edge environments and further generalize predictive models to adapt across diverse workloads and cloud platforms.