Deploy CLIProxyAPI via Cloudflare Workers and Container (serverless).
Before you get going: this project requires the Worker Paid Plan (5$/month) as it uses Cloudflare Container and Durable Object for the backend service, both are paid features.
Step 1: put these environment variables in your Cloudflare secrets:
# Your Cloudflare Account ID
R2_ACCOUNT_ID=xxx
# Your Cloudflare R2 Access Key ID
AWS_ACCESS_KEY_ID=xxx
# Your Cloudflare R2 Access Key
AWS_SECRET_ACCESS_KEY=xxxVisit the cloudflare official guide to get R2 access key and secret.
Step 2: copy ./container_src/config.example.yaml to ./container_src/config.yaml and follow instruction on CLIProxyAPI docs to fill out required fields.
These fields are mandatory:
secret-keyapi-keys
Step 3: run the command to deploy to Cloudflare:
bun install && bun deployNote: bun have to be installed on your machine, or you cloud use
npm,pnpminstead.
The base url for endpoint is: https://your-project-name.smycd.workers.dev/. For more details, refer to CLIProxyAPI docs.
After installation, you'll need EasyCLI to set up your providers.