droid2api  by 1e0n

OpenAI-compatible API proxy for unified LLM access

Created 4 weeks ago

New!

271 stars

Top 94.9% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

droid2api is an OpenAI-compatible API proxy server designed to unify access to diverse Large Language Models (LLMs). It targets developers seeking a single interface for multiple AI providers, offering robust authentication, intelligent inference control, and seamless integration with tools like Claude Code, thereby simplifying complex LLM orchestration.

How It Works

The project functions as a Node.js-based proxy, abstracting LLM provider differences. Core features include a prioritized, multi-factor authentication system (API key, refresh token, client auth) with automatic token renewal. It intelligently manages LLM inference parameters via five "reasoning" levels (auto, off, low, medium, high), dynamically adjusting settings for OpenAI and Anthropic models. The server exposes a standard OpenAI API endpoint, handling automatic request/response format conversion and streaming.

Quick Start & Requirements

  • Install dependencies: npm install
  • Run server: npm start
  • Docker: docker-compose up -d
  • Prerequisites: Node.js, npm. Docker for containerized deployment.
  • Configuration: Requires config.json for model definitions and ~/.factory/auth.json or environment variables (FACTORY_API_KEY, DROID_REFRESH_KEY) for authentication.

Highlighted Details

  • Unified OpenAI API: Provides a familiar interface for accessing various LLMs.
  • Intelligent Reasoning Control: Five levels (auto, off, low, medium, high) allow fine-grained management of LLM inference effort and token usage.
  • Claude Code Integration: Seamlessly integrates with Claude Code CLI via transparent proxying, automatic system prompt injection, and header standardization.
  • Dynamic Format Conversion: Automatically adapts requests and responses between different LLM provider formats.
  • Streaming Support: Fully respects the stream parameter for real-time or batched responses.

Maintenance & Community

A QQ discussion group (ID: 824743643) is available for user support and discussion. No other community or maintenance signals are detailed in the README.

Licensing & Compatibility

Licensed under the permissive MIT License, allowing for broad compatibility with commercial and closed-source applications.

Limitations & Caveats

Requires Node.js/npm for local setup. Configuration relies on environment variables or specific JSON files. The primary community channel is a QQ group, which may limit accessibility for some users. Performance claims are not benchmarked.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
6
Issues (30d)
10
Star History
278 stars in the last 29 days

Explore Similar Projects

Feedback? Help us improve.