Augment2Api 使用此项目会迅速导致您的帐户被禁用,因此不再推荐使用。
English | 中文
A middleware service for connecting to Augment API, providing OpenAI-compatible interfaces with support for Claude3.7、Claude4 model calls.
Risk Warning: Using this project may result in your account being flagged, restricted, or banned. Use at your own risk!
AGENT mode, all tool calls are blocked, using the model's native capabilities to respond, otherwise conversations may be interrupted by tool calls1 request every 3 seconds, with default Block Token cooldown rulesAgent mode is very powerful. We recommend using the official plugin in your editor for an experience comparable to CursorModel names ending with -chat use CHAT mode for responses
Model names ending with -agent use AGENT mode for responses
Other model names default to CHAT mode| Variable | Description | Required | Example |
|---|---|---|---|
| REDIS_CONN_STRING | Redis connection string | ✅ Yes | redis://default:password@localhost:6379 |
| ACCESS_PWD | Admin panel access password | ✅ Yes | your-access-password |
| AUTH_TOKEN | API access authentication token | ❌ No | your-auth-token |
| ROUTE_PREFIX | API request prefix | ❌ No | your_api_prefix |
| CODING_MODE | Debug mode switch | ❌ No | false |
| CODING_TOKEN | Debug token | ❌ No | empty |
| TENANT_URL | Debug tenant URL | ❌ No | empty |
| PROXY_URL | HTTP proxy address | ❌ No | http://127.0.0.1:7890 |
| REMOVE_FREE | Remove free accounts switch | ❌ No | false |
Tip: If the page fails to get tokens, you can set
CODING_MODE=trueand configureCODING_TOKENandTENANT_URLto use a specific token and tenant URL (limited to single token usage).
Since Augment doesn't automatically switch to Free plan after trial ends, causing conversations to respond with plan switching prompts, if you need to automatically remove these accounts, you can set REMOVE_FREE=true. The system will automatically identify and disable free accounts during batch detection.
If the response contains the following content:
The token will be automatically marked as unavailable and will not participate in subsequent API call allocations.
This helps improve API success rates and stability, avoiding request failures due to free account limitations.
docker run -d \
--name augment2api \
-p 27080:27080 \
-e REDIS_CONN_STRING="redis://default:yourpassword@your-redis-host:6379" \
-e ACCESS_PWD="your-access-password" \
-e AUTH_TOKEN="your-auth-token" \
--restart always \
linqiu1199/augment2apigit clone https://github.com/linqiu1199/augment2api.git
cd augment2apiCreate a .env file:
# Set Redis password (required)
REDIS_PASSWORD=your-redis-password
# Set admin panel access password (required)
ACCESS_PWD=your-access-password
# Set api authentication token (optional)
AUTH_TOKEN=your-auth-tokendocker-compose up -dThis will start both Redis and Augment2Api services and automatically handle network connections between them.
Visit http://ip:27080/ to access the admin login page, enter your access password to enter the admin panel
Click the Add TOKEN menu
Follow these steps to get tokens:
augment code to the authorization response input box, click get tokenStart conversation testing
Tips:
- If conversation returns 503 error, run
batch detectiononce to update tenant URLs before testing conversations (tenant URL error)- If conversation returns 401 error, run
batch detectiononce to disable invalid tokens before testing conversations (account banned)
curl -X GET http://localhost:27080/v1/modelscurl -X POST http://localhost:27080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "claude-3.7",
"messages": [
{"role": "user", "content": "Hello, please introduce yourself"}
]
}'Visit http://localhost:27080/ to open the admin login page. After logging in, you can interactively get and manage tokens.
curl -X POST http://localhost:27080/api/add/tokens \
-H "Content-Type: application/json" \
-d '[
{
"token": "token1",
"tenantUrl": "https://tenant1.com"
},
{
"token": "token2",
"tenantUrl": "https://tenant2.com"
}
]'curl -X POST http://localhost:27080/api/add/tokens \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-auth-token" \
-d '[
{
"token": "token1",
"tenantUrl": "https://tenant1.com"
},
{
"token": "token2",
"tenantUrl": "https://tenant2.com"
}
]' 暂无开放 Issues,或尚未同步最近议题。