doubao-free-api  by LLM-Red-Team

Free API for Doubao LLM with web search

created 8 months ago
451 stars

Top 67.8% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a reverse-engineered, zero-configuration API for ByteDance's Doubao LLM, targeting developers and researchers who need to integrate Doubao's capabilities, particularly its web search functionality, into their applications. It offers OpenAI-compatible endpoints for easy integration with existing tools and clients, aiming to provide a free, albeit unstable, alternative to official APIs.

How It Works

The service acts as a proxy, intercepting requests and forwarding them to Doubao's web interface using a user-provided sessionid as an authorization token. It supports streaming output and multi-turn conversations by managing message history. The project leverages Node.js for its backend and offers various deployment options including Docker, Docker Compose, Render, and Vercel, catering to different user preferences and infrastructure setups.

Quick Start & Requirements

  • Install/Run: Deploy via Docker: docker run -it -d --init --name doubao-free-api -p 8000:8000 -e TZ=Asia/Shanghai vinlic/doubao-free-api:latest
  • Prerequisites: A sessionid obtained from Doubao's web login (via browser developer tools).
  • Deployment: Docker, Docker-compose, Render, Vercel, or native Node.js.
  • Links: Doubao Official

Highlighted Details

  • OpenAI-compatible /v1/chat/completions endpoint.
  • Supports multi-account access by concatenating sessionids.
  • Includes a sessionid liveness check endpoint.
  • Provides Nginx configuration recommendations for optimized streaming.

Maintenance & Community

The project is part of a series of reverse-engineered APIs for various LLMs. No specific maintainer or community links (like Discord/Slack) are provided in the README.

Licensing & Compatibility

The project is explicitly stated as for research and learning purposes only. It prohibits commercial use or providing services to others due to potential strain on official services and risk of being blocked. The license is not explicitly stated, but the usage restrictions are clear.

Limitations & Caveats

This is a reverse-engineered API and is inherently unstable; users are strongly advised to use official paid APIs. Token usage statistics are not available as inference is external. Vercel deployments may encounter 504 timeouts due to the 10-second response limit on free tiers. Multi-turn conversations are implemented via message merging, which may degrade performance and is subject to token limits.

Feedback? Help us improve.