chat-api  by ai365vip

OpenAI API aggregation/management platform

created 1 year ago
566 stars

Top 57.7% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a unified API management gateway for various AI models, primarily targeting developers and businesses looking to integrate advanced AI capabilities into their products. It offers a user-friendly interface, flexible billing options, and robust administrative features for managing API channels and user access, simplifying the integration of services like OpenAI and Claude.

How It Works

The system acts as a proxy, aggregating multiple AI model APIs under a single interface. It supports various models including GPT-4V and Claude variants, with features like custom request headers, retry mechanisms for empty responses, and token suffix customization. The architecture allows for flexible database configurations (SQLite, MySQL, PostgreSQL) and optional Redis caching for performance.

Quick Start & Requirements

  • Docker:
    # SQLite
    docker run --name chat-api -d --restart always -p 3000:3000 -e TZ=Asia/Shanghai ai365/chat-api:latest
    # MySQL
    docker run --name chat-api -d --restart always -p 3000:3000 -e SQL_DSN="root:123456@tcp(localhost:3306)/oneapi" -e TZ=Asia/Shanghai ai365/chat-api:latest
    
  • Docker Compose: docker-compose up -d
  • Prerequisites: Docker, optionally MySQL/PostgreSQL, Redis (for caching).
  • Access: Admin: http://localhost:3000/admin, User: http://localhost:3000/. Initial login: root/123456.
  • Docs: 宝塔一键部署指南 (linked from README, but not directly for this project)

Highlighted Details

  • New UI for both end-users and administrators.
  • Supports token-based billing (multiplier or per-request) with grouping and model limits.
  • Includes WxPusher integration for notifications and an invitation-based rebate system.
  • Features channel management with RPM limits, custom headers, and health checks.

Maintenance & Community

The project is a fork of One API and New API. It is presented as a personal learning project, with no explicit mention of active maintenance, community channels (like Discord/Slack), or a roadmap.

Licensing & Compatibility

The project's README does not explicitly state a license. It warns against illegal use and compliance with OpenAI's terms of service and relevant regulations.

Limitations & Caveats

The project is explicitly stated to be for personal learning use only and does not guarantee stability or provide technical support. Users are responsible for adhering to OpenAI's terms and local regulations, particularly regarding AI service provision in China.

Health Check
Last commit

2 weeks ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
3
Star History
31 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.