### Run lobsterai2api server with config.json Source: https://github.com/xinxinshuhao-create/lobsterai2api/blob/master/README.md Starts the API bridge with the specified configuration file. The server listens on port 8367 by default. ```bash ./lobsterai2api.exe -config config.json ``` -------------------------------- ### Login and add an account with login.sh Source: https://github.com/xinxinshuhao-create/lobsterai2api/blob/master/README.md Adds an account via OAuth login. The script starts a local callback server, prints a login URL, and after browser login, polls for the callback to exchange credentials and save the auth file. ```bash ./login.sh # or manually: ./login.exe url # prints login URL (local callback server ready) # open URL in browser → phone/WeChat login ./login.exe poll # wait for callback → exchange → save auths/lobsterai-.json ``` -------------------------------- ### Build lobsterai2api, login, and credit executables Source: https://github.com/xinxinshuhao-create/lobsterai2api/blob/master/README.md Builds the three executables: the main server, the login helper, and the credit query tool. Run from the project root. ```bash go build -o lobsterai2api.exe ./cmd/server go build -o login.exe ./cmd/login go build -o credit.exe ./cmd/credit ``` -------------------------------- ### Query account credits with credit.sh or credit.exe Source: https://github.com/xinxinshuhao-create/lobsterai2api/blob/master/README.md Queries account credits. The shell script outputs human-readable text; the executable outputs JSON for scripting. ```bash ./credit.sh # human-readable ./credit.exe # JSON output (for scripts) ``` -------------------------------- ### Test chat completions, models, and status endpoints with curl Source: https://github.com/xinxinshuhao-create/lobsterai2api/blob/master/README.md Test commands for the API: non-streaming and streaming chat completions, model list, and status. Replace the Bearer token with a valid API key. ```bash # non-streaming curl -s http://127.0.0.1:8367/v1/chat/completions \ -H "Authorization: Bearer ***" \ -H "Content-Type: application/json" \ -d '{"model":"deepseek-v4-pro","messages":[{"role":"user","content":"你好"}],"stream":false}' # streaming curl -s http://127.0.0.1:8367/v1/chat/completions \ -H "Authorization: Bearer ***" \ -H "Content-Type: application/json" \ -d '{"model":"deepseek-v4-pro","messages":[{"role":"user","content":"你好"}],"stream":true}' # model list curl -s http://127.0.0.1:8367/v1/models -H "Authorization: Bearer ***" # status curl -s http://127.0.0.1:8367/status ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.