Skip to content

cnbeining/Zed2API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zed2API

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.

Features

  • Supports Claude 3.5 Sonnet model (default)
  • Customizable model parameters
  • Streaming responses
  • JWT authentication

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/Zed2API.git
    cd Zed2API
    
  2. 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.

  1. Build and run the Docker container:

    docker build -t zed2api .
    docker run -p 8000:8000 zed2api
    
  2. The API will be available at http://localhost:8000/chat.

Usage

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.

Environment Variables

  • HTTP_PROXY: Set this if you need to use a proxy server for outgoing requests.

Note

This API uses random GitHub usernames and Zed user IDs for authentication. In a production environment, you should implement proper user authentication and management.

License

GPLv3

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors