bella-openapi
Bella OpenAPI是一个提供了丰富的AI调用能力的API网关,可类比openrouter,与之不同的是除了提供聊天补全(chat-completion)能力外,还提供了文本向量化(text-embedding)、语音识别(ASR)、语音合成(TTS)、文生图、图生图等多种AI能力,同时集成了计费、限流和资源管理功能。且集成的所有能力都经过了大规模生产环境的验证。
Stars: 120
Bella OpenAPI is an API gateway that provides rich AI capabilities, similar to openrouter. In addition to chat completion ability, it also offers text embedding, ASR, TTS, image-to-image, and text-to-image AI capabilities. It integrates billing, rate limiting, and resource management functions. All integrated capabilities have been validated in large-scale production environments. The tool supports various AI capabilities, metadata management, unified login service, billing and rate limiting, and has been validated in large-scale production environments for stability and reliability. It offers a user-friendly experience with Java-friendly technology stack, convenient cloud-based experience service, and Dockerized deployment.
README:
Bella OpenAPI是一个提供了丰富的AI调用能力的API网关,可类比openrouter,与之不同的是除了提供聊天补全(chat-completion)能力外,还提供了文本向量化(text-embedding)、语音识别(ASR)、语音合成(TTS)、文生图、图生图等多种AI能力,同时集成了计费、限流和资源管理功能。且集成的所有能力都经过了大规模生产环境的验证。
- 我们部署了线上体验版的Bella OpenAPI,您可以登录访问Bella OpenAPI
- 如需快速启动并体验服务,请阅读:快速启动
- 想了解详细的环境变量配置和启动部署细节,请阅读:配置详情 和 启动与部署详情
-
文本处理
- 聊天补全:提供对话补全能力,同时支持OpenAI的ChatCompletion API和Anthropic的Message API
- 文本嵌入:生成文本的向量表示,用于语义搜索和相似度计算
-
语音服务
- 实时语音识别:支持流式语音识别和一句话语音识别,适用于实时交互场景
- 文件转写:支持上传音频文件进行离线转写
- 语音合成:将文本转换为自然语音输出,支持流式
- 实时对话:支持用户通过麦克风进行实时语音输入,系统自动识别语音内容,调用大模型生成回复,并将回复内容转换为语音输出
-
图像服务
- 图生图:对图片进行编辑,生成新的图片(敬请期待)
- 文生图:根据文本生成图片
-
多层级结构:采用Category-Endpoint-Model-Channel四层结构
- Category(类别):API服务的顶层分类,如语音服务、文本服务等
- Endpoint(端点):具体的API功能入口,如实时语音识别、聊天补全等
- Model(模型):支持各个端点的AI模型,如不同的语音识别模型、大语言模型等等
- Channel(通道):具体的服务提供方实现,包含供应商、协议和配置信息
-
灵活的路由机制:基于用户请求和配置,智能选择最合适的服务通道
-
可视化管理界面:提供直观的Web界面进行元数据配置和管理
- 多种认证方式:支持OAuth 2.0、CAS单点登录和API Key认证
- 会话管理:基于Redis的分布式会话存储
- 用户权限:细粒度的权限控制和管理
- API Key管理:支持层级化的API Key结构
- 配额控制:按月度配额管理API使用量
- 限流机制:基于Redis的分布式限流实现
- 极高的稳定性:已服务于贝壳找房全线业务,服务日均调用量1.5亿,经受住了大规模的生产环境考验
- 丰富的业务场景:业务场景覆盖广泛,可以适应生产环境中的绝大多数情况
- 广泛的使用场景:已服务于贝壳找房全线业务,经受住了大规模的生产环境考验
- 全面的AI能力:支持聊天补全、文本向量化、语音识别(实时、离线、一句话)、语音合成(支持流式)、文生图、图生图等多种AI能力
- Mock能力:内置能力点mock功能,可用于单元测试和压力测试
- Function Call支持:为不支持functioncall的LLM扩展了functioncall特性
- 路由策略:优秀的路由策略,确保高峰期能力点渠道的最大化处理能力
- 请求队列:支持队列特性,确保高峰期请求有序处理
- 备用模型:支持备用模型机制(敬请期待),提高服务可用性
- 最大等待时间:支持设置最大等待时间(敬请期待),优化用户体验
- 灵活的多层级结构:采用Category-Endpoint-Model-Channel四层结构,使系统具有高度的可扩展性和灵活性
- 集中式配置:所有API服务的配置集中管理,便于运维和监控
- 动态路由:基于用户请求和配置,智能选择最合适的服务通道,提高服务质量
- 多级缓存架构:结合Redisson、Caffeine和JetCache,实现本地缓存与分布式缓存的协同工作
- 高吞吐量:本地缓存减少网络开销,分布式缓存确保集群一致性
- 自动失效机制:智能的缓存失效策略,平衡数据一致性和性能
- 基于Disruptor的异步处理:采用高性能的Disruptor环形缓冲区实现日志事件的异步处理,大幅降低系统延迟
- 多处理器并行架构:支持多个事件处理器并行工作,同时处理计费、指标收集和限流控制
- 无锁设计:使用无锁队列和SleepingWaitStrategy策略,减少线程竞争,提高吞吐量
- 优雅的异常处理:集成专用的异常处理器,确保日志处理错误不影响主业务流程
- 低耦合性:基于日志实现,与主逻辑解耦,各个能力点只需按照规则上报日志即可自定义性能监测的维度
- 基于Lua脚本的原子操作:使用Redis+Lua脚本实现分布式限流,保证原子性和一致性
- 滑动窗口算法:采用精确的滑动窗口算法实现限流和监控,减少存储资源使用
- 多级缓存设计:结合本地缓存和分布式缓存,优化限流性能,减少网络开销
- 并发请求控制:对于试用APIKEY,精确跟踪并控制每个API Key的并发请求数,防止资源过度占用
- 自动过期机制:智能设置过期时间,避免资源泄漏,确保系统长期稳定运行
- 一致的用户体验:统一的错误提示格式和展示方式
- 细粒度错误分类:区分服务不可用和其他错误类型,提供更精准的反馈
- 友好的错误提示:针对不同错误类型使用不同的视觉样式,提高用户体验
- 多层次认证:支持OAuth 2.0、CAS单点登录和API Key认证
- 细粒度权限控制:基于角色的访问控制,确保资源安全
- 完善的审计日志:记录关键操作,便于追踪和问题排查
- 生产环境验证:经过大规模的生产环境的验证,稳定可靠
- 微服务架构:基于Spring Boot的微服务设计,便于横向扩展
- 容器化部署:Docker和Docker Compose支持,简化部署和扩展
- 第三方服务集成:灵活的通道机制,轻松集成各种AI服务提供商
- Spring Boot生态:基于Spring Boot框架,对Java开发者友好
- 丰富的工具链:集成了常用的Java开发工具和库
- 完善的文档:提供详细的API文档和开发指南
- 提供免费的云端体验服务:您可以登录访问Bella OpenAPI直接体验所有能力
- docker启动无需编译:提供了便捷的启动方式,通过启动脚本自动拉取镜像,无需编译
- 便捷的启动配置:启动脚本提供了丰富的启动参数,您可以根据需要配置,无需修改配置文件
本项目使用Docker Compose来启动所有服务,包括后端API、前端Web、MySQL和Redis。
- 安装 Docker
- 安装 Docker Compose
- 执行目录必须在bella-openapi项目的根目录下
如果本地不存在镜像,会拉取远端镜像
./start.sh
./start.sh --github-oauth CLIENT_ID:CLIENT_SECRET --google-oauth CLIENT_ID:CLIENT_SECRET --server URL (通过启动参数配置oauth登录服务和服务域名)注意:如果需要配置用户登录,方法见:OAuth配置
- 启动服务后会自动检查是否存在系统ak,如果不存在则执行生成系统ak和管理员授权
- 如果不想在启动时进行管理员授权(仍会检查系统ak是否需要生成),可以使用
--skip-auth参数:
./start.sh --skip-auth常用选项:
-
-b, --build: 修改代码后重新构建服务 -
--github-oauth CLIENT_ID:CLIENT_SECRET: 配置GitHub OAuth登录 -
--google-oauth CLIENT_ID:CLIENT_SECRET: 配置Google OAuth登录 -
--server URL: 配置服务域名 -
--skip-auth: 跳过管理员授权流程
更多详细的启动选项和配置说明,请参阅 启动与部署详情。
next.js在dev环境做了预加载相关的优化,如果一定需要使用dev环境,推荐使用next.dev单独启动web服务
- 删除数据库:
docker exec -it bella-openapi-mysql mysql -uroot -p123456 -e "drop database bella_openapi;"(如非默用户名和密码,请替换为您的用户名和密码) - 停止服务:
docker-compose down - 删除mysql数据:
rm -rf ./mysql - 删除redis数据:
rm -rf ./redis - 重新构建并启动:
./start.sh -b
最后更新: 2025-03-31
For Tasks:
Click tags to check more tools for each tasksFor Jobs:
Alternative AI tools for bella-openapi
Similar Open Source Tools
bella-openapi
Bella OpenAPI is an API gateway that provides rich AI capabilities, similar to openrouter. In addition to chat completion ability, it also offers text embedding, ASR, TTS, image-to-image, and text-to-image AI capabilities. It integrates billing, rate limiting, and resource management functions. All integrated capabilities have been validated in large-scale production environments. The tool supports various AI capabilities, metadata management, unified login service, billing and rate limiting, and has been validated in large-scale production environments for stability and reliability. It offers a user-friendly experience with Java-friendly technology stack, convenient cloud-based experience service, and Dockerized deployment.
ai_wiki
This repository provides a comprehensive collection of resources, open-source tools, and knowledge related to quantitative analysis. It serves as a valuable knowledge base and navigation guide for individuals interested in various aspects of quantitative investing, including platforms, programming languages, mathematical foundations, machine learning, deep learning, and practical applications. The repository is well-structured and organized, with clear sections covering different topics. It includes resources on system platforms, programming codes, mathematical foundations, algorithm principles, machine learning, deep learning, reinforcement learning, graph networks, model deployment, and practical applications. Additionally, there are dedicated sections on quantitative trading and investment, as well as large models. The repository is actively maintained and updated, ensuring that users have access to the latest information and resources.
AI-fundermentals
AI Fundamentals is a comprehensive AI infrastructure learning resource collection, covering a complete technical stack from hardware basics to advanced applications. It includes GPU architecture and programming, CUDA development, large language models, AI system design, performance optimization, enterprise deployment, and more. The repository aims to provide a systematic learning path and practical guidance for AI engineers, architects, GPU programming developers, large model application developers, and technical researchers.
ai-money-maker-handbook
The 'ai-money-maker-handbook' repository is a collection of information on using AI to earn extra income through side jobs. It includes strategies, resources, and verified methods for making money with AI technology in various fields. The repository provides insights on leveraging AI tools, platforms, and techniques to generate additional revenue streams in the AI era.
aio-hub
AIO Hub is a cross-platform AI hub built on Tauri + Vue 3 + TypeScript, aiming to provide developers and creators with precise LLM control experience and efficient toolchain. It features a chat function designed for complex tasks and deep exploration, a unified context pipeline for controlling every token sent to the model, interactive AI buttons, dual-view management for non-linear conversation mapping, open ecosystem compatibility with various AI models, and a rich text renderer for LLM output. The tool also includes features for media workstation, developer productivity, system and asset management, regex applier, collaboration enhancement between developers and AI, and more.
51mazi
51mazi is a desktop novel writing software developed based on Electron + Vue 3 technology stack, designed for novel creators. It provides a professional writing environment and integrates map design, relationship graph, character profiles, AI-assisted creation, and more. The software aims to make novel creation more efficient and enjoyable for authors.
BigBanana-AI-Director
BigBanana AI Director is an industrial AI motion comic and video workbench platform that provides a one-stop solution for creating short dramas and comics. It utilizes a 'Script-to-Asset-to-Keyframe' workflow with advanced AI models to automate the process from script to final production, ensuring precise control over character consistency, scene continuity, and camera movements. The tool is designed to streamline the production process for creators, enabling efficient production from idea to finished product.
chatwiki
ChatWiki is an open-source knowledge base AI question-answering system. It is built on large language models (LLM) and retrieval-augmented generation (RAG) technologies, providing out-of-the-box data processing, model invocation capabilities, and helping enterprises quickly build their own knowledge base AI question-answering systems. It offers exclusive AI question-answering system, easy integration of models, data preprocessing, simple user interface design, and adaptability to different business scenarios.
Flux-AI-Pro
Flux AI Pro - NanoBanana Edition is a high-performance, single-file AI image generation solution built on Cloudflare Workers. It integrates top AI providers like Pollinations.ai, Infip/Ghostbot, Aqua Server, Kinai API, and Airforce API to offer a serverless, fast, and feature-rich creative experience. It provides seamless interface for generating high-quality AI art without complex server setups. The tool supports multiple languages, smart language detection, RTL support, AI prompt generator, high-definition image generation, and local history storage with export/import functionality.
Daily-DeepLearning
Daily-DeepLearning is a repository that covers various computer science topics such as data structures, operating systems, computer networks, Python programming, data science packages like numpy, pandas, matplotlib, machine learning theories, deep learning theories, NLP concepts, machine learning practical applications, deep learning practical applications, and big data technologies like Hadoop and Hive. It also includes coding exercises related to '剑指offer'. The repository provides detailed explanations and examples for each topic, making it a comprehensive resource for learning and practicing different aspects of computer science and data-related fields.
CloudFlare-AI-Insight-Daily
CloudFlare-AI-Insight-Daily is a content aggregation and generation platform powered by Cloudflare Workers. It curates the latest updates in the AI field, including industry news, popular open-source projects, cutting-edge academic papers, and tech influencers' social media comments. The platform utilizes the Google Gemini model for intelligent processing and summary generation, automatically publishing AI daily reports on GitHub Pages. Its goal is to be your efficient assistant in staying ahead in the rapidly changing AI landscape and acquiring the most valuable information.
Snap-Solver
Snap-Solver is a revolutionary AI tool for online exam solving, designed for students, test-takers, and self-learners. With just a keystroke, it automatically captures any question on the screen, analyzes it using AI, and provides detailed answers. Whether it's complex math formulas, physics problems, coding issues, or challenges from other disciplines, Snap-Solver offers clear, accurate, and structured solutions to help you better understand and master the subject matter.
LLM_book
LLM_book is a learning record and roadmap for programmers with a certain AI foundation to learn Large Language Models (LLM). It covers topics such as PyTorch basics, Transformer architecture, langchain basics, foundational concepts of large models, fine-tuning methods, RAG (Retrieval-Augmented Generation), and building intelligent agents using LLM. The repository provides learning materials, code implementations, and documentation to help users progress in understanding and implementing LLM technologies.
AutoGLM-GUI
AutoGLM-GUI is an AI-driven Android automation productivity tool that supports scheduled tasks, remote deployment, and 24/7 AI assistance. It features core functionalities such as deploying to servers, scheduling tasks, and creating an AI automation assistant. The tool enhances productivity by automating repetitive tasks, managing multiple devices, and providing a layered agent mode for complex task planning and execution. It also supports real-time screen preview, direct device control, and zero-configuration deployment. Users can easily download the tool for Windows, macOS, and Linux systems, and can also install it via Python package. The tool is suitable for various use cases such as server automation, batch device management, development testing, and personal productivity enhancement.
TypeTale
TypeTale is an AIGC creation software designed specifically for content creators, primarily used for novel promotion. It offers a wide range of AI capabilities such as image, video, and audio generation, as well as text processing and story extraction. The tool also provides workflow customization, AI assistant support, and a vast library of creative materials. With a user-friendly interface and system requirements compatible with Windows operating systems, TypeTale aims to streamline the content creation process for writers and creators.
For similar tasks
StableDiffusion.NET
StableDiffusion.NET is a tool for creating images from text prompts using stable diffusion models. It allows users to build models with various configurations and options, supporting GPU acceleration for faster processing. The tool provides flexibility in choosing backends and integrating native libraries. Users can easily convert text prompts into images with default or custom parameters, and save the resulting images in PNG format. Additionally, users can extend the tool's functionality by writing custom extensions or installing pre-built extension sets like HPPH.System.Drawing and HPPH.SkiaSharp.
bella-openapi
Bella OpenAPI is an API gateway that provides rich AI capabilities, similar to openrouter. In addition to chat completion ability, it also offers text embedding, ASR, TTS, image-to-image, and text-to-image AI capabilities. It integrates billing, rate limiting, and resource management functions. All integrated capabilities have been validated in large-scale production environments. The tool supports various AI capabilities, metadata management, unified login service, billing and rate limiting, and has been validated in large-scale production environments for stability and reliability. It offers a user-friendly experience with Java-friendly technology stack, convenient cloud-based experience service, and Dockerized deployment.
vllm-mlx
vLLM-MLX is a tool that brings native Apple Silicon GPU acceleration to vLLM by integrating Apple's ML framework with unified memory and Metal kernels. It offers optimized LLM inference with KV cache and quantization, vision-language models for multimodal inference, speech-to-text and text-to-speech with native voices, text embeddings for semantic search and RAG, and more. Users can benefit from features like multimodal support for text, image, video, and audio, native GPU acceleration on Apple Silicon, compatibility with OpenAI API, Anthropic Messages API, reasoning models extraction, integration with external tools via Model Context Protocol, memory-efficient caching, and high throughput for multiple concurrent users.
LakeSoul
LakeSoul is a cloud-native Lakehouse framework that supports scalable metadata management, ACID transactions, efficient and flexible upsert operation, schema evolution, and unified streaming & batch processing. It supports multiple computing engines like Spark, Flink, Presto, and PyTorch, and computing modes such as batch, stream, MPP, and AI. LakeSoul scales metadata management and achieves ACID control by using PostgreSQL. It provides features like automatic compaction, table lifecycle maintenance, redundant data cleaning, and permission isolation for metadata.
datachain
DataChain is a Python-based AI-data warehouse for transforming and analyzing unstructured data like images, audio, videos, text, and PDFs. It integrates with external storage to process data efficiently without duplication and manages metadata for easy querying. Use cases include ETL, analytics, versioning, and incremental processing. Key features include multimodal dataset versioning, Python-friendly operations, data enrichment, and processing. The tool allows for generating metadata using AI models, filtering, joining, and grouping datasets, and performing high-performance vectorized operations.
aiometadata
AIOMetadata is a next-generation metadata addon for Stremio that aggregates and enriches movie, series, and anime metadata from multiple sources like TMDB, TVDB, MyAnimeList, AniList, IMDb, and more. It offers rich artwork, custom catalogs, streaming provider integration, dynamic search, user configuration, global caching, advanced ID mapping, and a modern UI. Users can host it or self-host using Docker Compose, configure catalogs, providers, search engines, integrations, and security settings via a UI, and access various API endpoints for managing user config, cache, posters, images, and more. Supported providers include TMDB, TVDB, IMDb, MyAnimeList, AniList, Kitsu, Fanart.tv, MDBList, and more. Development involves backend and frontend setup using Redis for caching and SQLite/PostgreSQL for config storage. The project is licensed under Apache 2.0.
bolna
Bolna is an open-source platform for building voice-driven conversational applications using large language models (LLMs). It provides a comprehensive set of tools and integrations to handle various aspects of voice-based interactions, including telephony, transcription, LLM-based conversation handling, and text-to-speech synthesis. Bolna simplifies the process of creating voice agents that can perform tasks such as initiating phone calls, transcribing conversations, generating LLM-powered responses, and synthesizing speech. It supports multiple providers for each component, allowing users to customize their setup based on their specific needs. Bolna is designed to be easy to use, with a straightforward local setup process and well-documented APIs. It is also extensible, enabling users to integrate with other telephony providers or add custom functionality.
agents
The LiveKit Agent Framework is designed for building real-time, programmable participants that run on servers. Easily tap into LiveKit WebRTC sessions and process or generate audio, video, and data streams. The framework includes plugins for common workflows, such as voice activity detection and speech-to-text. Agents integrates seamlessly with LiveKit server, offloading job queuing and scheduling responsibilities to it. This eliminates the need for additional queuing infrastructure. Agent code developed on your local machine can scale to support thousands of concurrent sessions when deployed to a server in production.
For similar jobs
sweep
Sweep is an AI junior developer that turns bugs and feature requests into code changes. It automatically handles developer experience improvements like adding type hints and improving test coverage.
teams-ai
The Teams AI Library is a software development kit (SDK) that helps developers create bots that can interact with Teams and Microsoft 365 applications. It is built on top of the Bot Framework SDK and simplifies the process of developing bots that interact with Teams' artificial intelligence capabilities. The SDK is available for JavaScript/TypeScript, .NET, and Python.
ai-guide
This guide is dedicated to Large Language Models (LLMs) that you can run on your home computer. It assumes your PC is a lower-end, non-gaming setup.
classifai
Supercharge WordPress Content Workflows and Engagement with Artificial Intelligence. Tap into leading cloud-based services like OpenAI, Microsoft Azure AI, Google Gemini and IBM Watson to augment your WordPress-powered websites. Publish content faster while improving SEO performance and increasing audience engagement. ClassifAI integrates Artificial Intelligence and Machine Learning technologies to lighten your workload and eliminate tedious tasks, giving you more time to create original content that matters.
chatbot-ui
Chatbot UI is an open-source AI chat app that allows users to create and deploy their own AI chatbots. It is easy to use and can be customized to fit any need. Chatbot UI is perfect for businesses, developers, and anyone who wants to create a chatbot.
BricksLLM
BricksLLM is a cloud native AI gateway written in Go. Currently, it provides native support for OpenAI, Anthropic, Azure OpenAI and vLLM. BricksLLM aims to provide enterprise level infrastructure that can power any LLM production use cases. Here are some use cases for BricksLLM: * Set LLM usage limits for users on different pricing tiers * Track LLM usage on a per user and per organization basis * Block or redact requests containing PIIs * Improve LLM reliability with failovers, retries and caching * Distribute API keys with rate limits and cost limits for internal development/production use cases * Distribute API keys with rate limits and cost limits for students
uAgents
uAgents is a Python library developed by Fetch.ai that allows for the creation of autonomous AI agents. These agents can perform various tasks on a schedule or take action on various events. uAgents are easy to create and manage, and they are connected to a fast-growing network of other uAgents. They are also secure, with cryptographically secured messages and wallets.
griptape
Griptape is a modular Python framework for building AI-powered applications that securely connect to your enterprise data and APIs. It offers developers the ability to maintain control and flexibility at every step. Griptape's core components include Structures (Agents, Pipelines, and Workflows), Tasks, Tools, Memory (Conversation Memory, Task Memory, and Meta Memory), Drivers (Prompt and Embedding Drivers, Vector Store Drivers, Image Generation Drivers, Image Query Drivers, SQL Drivers, Web Scraper Drivers, and Conversation Memory Drivers), Engines (Query Engines, Extraction Engines, Summary Engines, Image Generation Engines, and Image Query Engines), and additional components (Rulesets, Loaders, Artifacts, Chunkers, and Tokenizers). Griptape enables developers to create AI-powered applications with ease and efficiency.