Zed2API is a Flask-based API that serves as a proxy for the Anthropic Claude AI model. It allows users to interact with the Claude model through a simple HTTP interface.
- Supports Claude 3.5 Sonnet model (default)
- Customizable model parameters
- Streaming responses
- JWT authentication
-
Clone the repository:
git clone https://github.com/yourusername/Zed2API.git cd Zed2API -
Add GitHub username and Zed User ID in
gh_username_zed_userid.txt.
Look for a request like https://zed.dev/api/auth/session once logged in.
-
Build and run the Docker container:
docker build -t zed2api . docker run -p 8000:8000 zed2api -
The API will be available at
http://localhost:8000/chat.
To use the API, send a POST request to the /chat/completions endpoint with your message payload. The API will return a streaming response with the AI's reply.
HTTP_PROXY: Set this if you need to use a proxy server for outgoing requests.
This API uses random GitHub usernames and Zed user IDs for authentication. In a production environment, you should implement proper user authentication and management.
GPLv3