# bella-openapi | Ke Technologies | Knowledge Base | Instagit

Bella OpenAPI是一个提供了丰富的AI调用能力的API网关，可类比openrouter，与之不同的是除了提供聊天补全(chat-completion)能力外，还提供了文本向量化(text-embedding)、语音识别(ASR)、语音合成(TTS)、文生图、图生图等多种AI能力，同时集成了计费、限流和资源管理功能。且集成的所有能力都经过了大规模生产环境的验证。

GitHub Stars: 207

Repository: https://github.com/lianjiatech/bella-openapi

---

## Articles

### [How the Bella OpenAPI Endpoint Logging System Handles Metrics and Cost Reporting](/lianjiatech/bella-openapi/bella-openapi-endpoint-logging-metrics-collection-cost-reporting)

Discover how the Bella OpenAPI logging system efficiently collects metrics and reports costs using a high-performance Disruptor pipeline with specialized handlers.

- Tags: internals
- Published: 2026-03-06

### [Bella OpenAPI Video Generation Workflow: How Video Jobs Are Processed](/lianjiatech/bella-openapi/bella-openapi-video-generation-workflow-job-processing)

Discover the Bella OpenAPI video generation workflow. Learn how video jobs are processed via a two-stage asynchronous pipeline using Redis and AI providers.

- Tags: how-to-guide
- Published: 2026-03-06

### [How Real-Time Speech Recognition (ASR) Streaming Works in Bella OpenAPI](/lianjiatech/bella-openapi/bella-openapi-real-time-speech-recognition-asr-streaming)

Discover how Bella OpenAPI handles real-time ASR streaming. Learn about its WebSocket bridge, binary audio frame forwarding, and standardized transcription messages for efficient audio processing.

- Tags: deep-dive
- Published: 2026-03-06

### [Bella OpenAPI Security Measures for API Access Control: A Layered Defense Architecture](/lianjiatech/bella-openapi/bella-openapi-api-access-control-security-measures)

Discover Bella OpenAPI's robust API access control. Explore layered security including API keys, RBAC, rate limiting, and quotas for comprehensive defense.

- Tags: architecture
- Published: 2026-03-06

### [How to Configure High-Performance Settings in Bella OpenAPI: JVM Tuning, Connection Pooling, and Threading](/lianjiatech/bella-openapi/configure-bella-openapi-high-performance-settings-connection-pooling-jvm-options)

Optimize Bella OpenAPI performance. Learn JVM tuning, connection pooling, and threading configurations in run.sh and application.yml for faster API responses.

- Tags: how-to-guide
- Published: 2026-03-06

### [Bella OpenAPI Channel Routing Strategy: Load Balancing and Cost Optimization Explained](/lianjiatech/bella-openapi/bella-openapi-channel-routing-strategy-load-balancing-cost-optimization)

Discover Bella OpenAPI channel routing strategy optimizing costs and balancing load. Learn how the nine-step pipeline selects AI providers efficiently.

- Tags: deep-dive
- Published: 2026-03-06

### [Understanding the Job Queue System in Bella OpenAPI: How `@EnableJobQueue` Works](/lianjiatech/bella-openapi/bella-openapi-job-queue-system-enablejobqueue)

Discover Bella OpenAPI's job queue system leveraging Redis. Learn how `@EnableJobQueue` activates this powerful feature to decouple long-running tasks and improve performance.

- Tags: internals
- Published: 2026-03-06

### [How Bella OpenAPI Simulates Function Calling for LLMs Without Native Support](/lianjiatech/bella-openapi/bella-openapi-function-calling-llm-native-support)

Bella OpenAPI enables function calling for LLMs lacking native support by translating requests into code generation prompts and parsing output into tool calls. Achieve seamless integration with Claude Gemini, and more.

- Tags: deep-dive
- Published: 2026-03-06

### [MockAdaptor in Bella OpenAPI: A Complete Testing Guide for AI Service Simulation](/lianjiatech/bella-openapi/bella-openapi-mockadaptor-purpose-testing)

Master the MockAdaptor in Bella OpenAPI for effective AI service simulation. Learn how this tool provides isolated, deterministic test responses without real API calls.

- Tags: how-to-guide
- Published: 2026-03-06

### [How Bella OpenAPI Implements Sliding Window Rate Limiting with Redis Lua Scripts](/lianjiatech/bella-openapi/bella-openapi-redis-lua-scripts-sliding-window-rate-limiting)

Discover how Bella OpenAPI leverages Redis Lua scripts for atomic sliding window rate limiting. Learn how it prevents race conditions and enforces request quotas effectively.

- Tags: how-to-guide
- Published: 2026-03-06

### [Bella OpenAPI OAuth 2.0 and CAS Integration: Complete SSO Implementation Guide](/lianjiatech/bella-openapi/bella-openapi-oauth-2.0-cas-single-sign-on-integration)

Implement OAuth 2.0 and CAS single sign-on with Bella OpenAPI. This guide details Spring Boot filter integration validating tickets and mapping user attributes for secure SSO.

- Tags: how-to-guide
- Published: 2026-03-06

### [Multi-Tenant Architecture with Spaces in Bella OpenAPI: How Tenant Isolation Works](/lianjiatech/bella-openapi/bella-openapi-multi-tenant-architecture-spaces-tenant-isolation)

Explore Bella OpenAPI multi-tenant architecture. Discover how Spaces ensure tenant isolation via UUID binding and database query filtering for secure, separated API access.

- Tags: architecture
- Published: 2026-03-06

### [How Bella OpenAPI Achieves High Throughput with Its Disruptor-Based Async Logging Framework](/lianjiatech/bella-openapi/bella-openapi-disruptor-async-logging-high-throughput)

Discover how Bella OpenAPI's Disruptor-based async logging framework achieves millions of events per second using a lock-free ring buffer and CAS operations. Learn about high-throughput logging.

- Tags: performance
- Published: 2026-03-06

### [How Bella OpenAPI Calculates and Tracks API Usage Costs per Request](/lianjiatech/bella-openapi/bella-openapi-api-usage-cost-calculation-tracking)

Discover how Bella OpenAPI calculates API usage costs per request using its unique three-stage pipeline. Learn about pricing formulas, log handling, and delta aggregation for accurate billing.

- Tags: how-to-guide
- Published: 2026-03-06

### [Understanding the Channel-Endpoint-Model-Category Hierarchy in Bella OpenAPI Routing](/lianjiatech/bella-openapi/bella-openapi-channel-endpoint-model-category-hierarchy-routing)

Discover the Channel-Endpoint-Model-Category hierarchy for intelligent routing in Bella OpenAPI. Learn how this structure optimizes AI requests and provider selection for effective load balancing.

- Tags: deep-dive
- Published: 2026-03-06

### [How Bella OpenAPI Handles Streaming Responses for Chat Completions and TTS](/lianjiatech/bella-openapi/bella-openapi-streaming-responses-chatcompletions-tts)

Bella OpenAPI expertly manages streaming responses for chat completions and TTS using SSE and chunked HTTP. Discover its unified callback architecture `HttpUtils.streamRequest` for real-time audio and text.

- Tags: how-to-guide
- Published: 2026-03-06

### [AdaptorManager in Bella OpenAPI: How Protocol Requests Are Routed to AI Providers](/lianjiatech/bella-openapi/bella-openapi-adaptormanager-request-routing-protocol-adapters)

Discover how Bella OpenAPI's AdaptorManager routes requests to AI providers using a thread-safe map for efficient endpoint and protocol matching. Learn about this core component.

- Tags: internals
- Published: 2026-03-06

### [How to Add a New AI Provider to Bella OpenAPI by Implementing IProtocolAdaptor](/lianjiatech/bella-openapi/add-new-ai-provider-bella-openapi-iprotoocoladaptor-implementation)

Learn to add a new AI provider to Bella OpenAPI by implementing IProtocolAdaptor. Follow Spring integration steps for seamless API extension and enhanced functionality.

- Tags: how-to-guide
- Published: 2026-03-06

### [How Bella OpenAPI Implements Distributed Rate Limiting Using Redis and Lua Scripts](/lianjiatech/bella-openapi/bella-openapi-distributed-rate-limiting-redis-lua-scripts)

Discover how Bella OpenAPI achieves distributed rate limiting with Redis and Lua scripts. Learn about consistent, atomic throttling across all nodes without extra services.

- Tags: internals
- Published: 2026-03-06

### [How Bella OpenAPI Implements Multi-Level Caching with Caffeine, Redis, and JetCache](/lianjiatech/bella-openapi/bella-openapi-multi-level-caching-architecture-caffeine-redis-jetcache)

Discover how Bella OpenAPI achieves lightning-fast data retrieval with its multi-level caching architecture using JetCache, Caffeine, and Redis. Learn how this system boosts performance and scalability.

- Tags: architecture
- Published: 2026-03-06

### [How Bella OpenAPI Processes Requests Through Interceptors and Handles Authentication](/lianjiatech/bella-openapi/bella-openapi-interceptor-request-flow-and-authentication)

Discover how Bella OpenAPI processes requests through its interceptor chain, handling authentication, rate limiting, and quota enforcement before reaching controllers.

- Tags: deep-dive
- Published: 2026-03-06

### [How Bella OpenAPI Implements the Protocol Adapter Pattern for AI Provider Routing](/lianjiatech/bella-openapi/how-bella-openapi-implements-protocol-adapter-pattern-for-ai-provider-routing)

Discover how Bella OpenAPI uses the protocol adapter pattern and Spring auto-configuration to seamlessly route requests to various AI providers without altering core controller logic.

- Tags: how-to-guide
- Published: 2026-03-06

