transfer-api  by eooce

Cloudflare Worker for AI API compatibility

Created 2 weeks ago

New!

435 stars

Top 67.7% on SourcePulse

GitHubView on GitHub
Project Summary

This Cloudflare Worker acts as an adapter, transforming the unlimited.surf API into OpenAI and Anthropic-compatible endpoints. It targets developers seeking to integrate with unlimited.surf using standard AI API interfaces, offering a serverless solution that simplifies API consumption and abstracts the underlying service.

How It Works

The project deploys a Cloudflare Worker that intercepts requests and routes them to the unlimited.surf backend. It specifically translates requests to OpenAI-compatible formats (e.g., /v1/chat/completions) and Anthropic/Claude Code formats (e.g., /v1/messages). Additionally, it provides a direct proxy for raw /api/* requests to unlimited.surf, enabling access to all original functionalities. Key features like Web Search, Merge AI, and File extraction are mapped to their respective upstream unlimited.surf endpoints.

Quick Start & Requirements

  • Deployment: Can be deployed via Cloudflare Workers & Pages by connecting a GitHub repository or manually using the wrangler CLI.
  • Prerequisites: npm, wrangler CLI, and an unlimited.surf API key.
  • Configuration: Requires setting UNLIMITED_SURF_API_KEY and an optional WORKER_API_KEY as Cloudflare Secrets.
  • Verification: Check https://<your-worker>.workers.dev/health.
  • Links: Cloudflare Dashboard (Workers & Pages), GitHub.

Highlighted Details

  • Provides OpenAI-compatible routes including /v1/chat/completions, /v1/models, and /v1/files.
  • Supports Anthropic-compatible routes such as /v1/messages, /anthropic/v1/messages, and /v1/models.
  • Offers a raw upstream proxy for all /api/* requests to unlimited.surf.
  • Maps specific features like Web Search, Merge AI, and File extraction to upstream endpoints.
  • Includes info endpoints for Agent Setup, Codex, and MCP.

Maintenance & Community

No specific details regarding maintainers, community channels, or project health signals were found in the provided documentation.

Licensing & Compatibility

The license type is not explicitly stated in the provided README. This absence may pose compatibility concerns for commercial use or integration into closed-source projects.

Limitations & Caveats

The Worker returns a 501 error for Embeddings, audio, and image-related requests, as these are not exposed by the unlimited.surf documentation. A community warning suggests potential security risks with unlimited.surf itself, advising caution when connecting it to agents with control over local systems. MCP tool execution remains a local process.

Health Check
Last Commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
3
Star History
441 stars in the last 19 days

Explore Similar Projects

Feedback? Help us improve.