
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-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.

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.

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.

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.

py-xiaozhi
py-xiaozhi is a Python-based XiaoZhi voice client designed for learning through code and experiencing AI XiaoZhi's voice functions without hardware conditions. The repository is based on the xiaozhi-esp32 port. It supports AI voice interaction, visual multimodal capabilities, IoT device integration, online music playback, voice wake-up, automatic conversation mode, graphical user interface, command-line mode, cross-platform support, volume control, session management, encrypted audio transmission, automatic captcha handling, automatic MAC address retrieval, code modularization, and stability optimization.

PythonPark
PythonPark is a paradise for learning Python, providing babysitter-level tutorials on AI labs, treasure videos, data structures, study guides, machine learning practicals, deep learning practicals, Python basics, web scraping, big company interview experiences, programming life, and resource sharing. Original articles are published at least twice a week, with the latest articles being first released on WeChat and videos on Bilibili. Join the WeChat group for technical discussions or to provide feedback. Continuously improving and outputting content!

Thinking_in_Java_MindMapping
Thinking_in_Java_MindMapping is a repository that started as a project to create mind maps based on the book 'Java Programming Ideas'. Over time, it evolved into a collection of programming notes, blog posts, book summaries, personal reflections, and even gaming content. The repository covers a wide range of topics, allowing the author to freely express thoughts and ideas. The content is diverse and reflects the author's dedication to consistency and creativity.

hongbomiao.com
hongbomiao.com is a personal research and development (R&D) lab that facilitates the sharing of knowledge. The repository covers a wide range of topics including web development, mobile development, desktop applications, API servers, cloud native technologies, data processing, machine learning, computer vision, embedded systems, simulation, database management, data cleaning, data orchestration, testing, ops, authentication, authorization, security, system tools, reverse engineering, Ethereum, hardware, network, guidelines, design, bots, and more. It provides detailed information on various tools, frameworks, libraries, and platforms used in these domains.

terraform-provider-airbyte
Programatically control Airbyte Cloud through an API. Developers can create an API Key within the Developer Portal to make API requests. The provider allows for integration building by showing network request information and API usage details. It offers resources and data sources for various destinations and sources, enabling users to manage data flow between different services.

nix-ai-tools
Exploring the integration between Nix and AI coding agents, this repository serves as a testbed for packaging, sandboxing, and enhancing AI-powered development tools within the Nix ecosystem. It provides a collection of AI tools with descriptions, versions, sources, licenses, homepages, and usage instructions. The repository also supports daily updates using GitHub Actions and offers a platform for experimental features like sandboxed execution, provider abstraction, and tool composition in Nix environments. Contributions are welcome, and the Nix packaging code in this repository is licensed under MIT.

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.

ChatGPT-airport-tizi-fanqiang
This repository provides a curated list of recommended airport proxies for accessing ChatGPT and other AI tools while bypassing internet restrictions. The proxies are tested and verified to ensure reliability and stability. The readme includes detailed instructions on how to set up and use the proxies with various devices and platforms. Additionally, the repository offers advanced tutorials on upgrading to GPT-4/Plus, deploying a 24/7 ChatGPT微信机器人 server, and using Claude-3 securely and for free.
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.

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.

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.

RVC_CLI
**RVC_CLI: Retrieval-based Voice Conversion Command Line Interface** This command-line interface (CLI) provides a comprehensive set of tools for voice conversion, enabling you to modify the pitch, timbre, and other characteristics of audio recordings. It leverages advanced machine learning models to achieve realistic and high-quality voice conversions. **Key Features:** * **Inference:** Convert the pitch and timbre of audio in real-time or process audio files in batch mode. * **TTS Inference:** Synthesize speech from text using a variety of voices and apply voice conversion techniques. * **Training:** Train custom voice conversion models to meet specific requirements. * **Model Management:** Extract, blend, and analyze models to fine-tune and optimize performance. * **Audio Analysis:** Inspect audio files to gain insights into their characteristics. * **API:** Integrate the CLI's functionality into your own applications or workflows. **Applications:** The RVC_CLI finds applications in various domains, including: * **Music Production:** Create unique vocal effects, harmonies, and backing vocals. * **Voiceovers:** Generate voiceovers with different accents, emotions, and styles. * **Audio Editing:** Enhance or modify audio recordings for podcasts, audiobooks, and other content. * **Research and Development:** Explore and advance the field of voice conversion technology. **For Jobs:** * Audio Engineer * Music Producer * Voiceover Artist * Audio Editor * Machine Learning Engineer **AI Keywords:** * Voice Conversion * Pitch Shifting * Timbre Modification * Machine Learning * Audio Processing **For Tasks:** * Convert Pitch * Change Timbre * Synthesize Speech * Train Model * Analyze Audio

awesome-large-audio-models
This repository is a curated list of awesome large AI models in audio signal processing, focusing on the application of large language models to audio tasks. It includes survey papers, popular large audio models, automatic speech recognition, neural speech synthesis, speech translation, other speech applications, large audio models in music, and audio datasets. The repository aims to provide a comprehensive overview of recent advancements and challenges in applying large language models to audio signal processing, showcasing the efficacy of transformer-based architectures in various audio tasks.

nexa-sdk
Nexa SDK is a comprehensive toolkit supporting ONNX and GGML models for text generation, image generation, vision-language models (VLM), and text-to-speech (TTS) capabilities. It offers an OpenAI-compatible API server with JSON schema mode and streaming support, along with a user-friendly Streamlit UI. Users can run Nexa SDK on any device with Python environment, with GPU acceleration supported. The toolkit provides model support, conversion engine, inference engine for various tasks, and differentiating features from other tools.
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.