This is a FastAPI service that provides a RESTful API for the Anthropic Claude AI model using anthropic-sdk-python. For more information on the model, please refer to the Anthropic Claude AI model
The API documentation can be found at http://localhost:8000/docs
- Clone the repository
git clone https://github.com/furkankyildirim/anthropic-fastapi-service.git
cd anthropic-fastapi-service/
- Create a
.env
file in the root directory and add the following environment variables
ANTHROPIC_API_KEY=YOUR_API_KEY
- Create a system message file on src/data/system-messages.txt (Optional)
echo "You are a personal AI assistant" > src/data/system-messages.txt
- Create a virtual environment and install the dependencies
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- Run the following commands to start the server
chmod +x runner.sh
./runner.sh
- Clone the repository
git clone https://github.com/furkankyildirim/anthropic-fastapi-service.git
cd anthropic-fastapi-service/
- Create a
.env
file in the root directory and add the following environment variables
ANTHROPIC_API_KEY=YOUR_API_KEY
- Create a system message file on src/data/system-messages.txt (Optional)
echo "You are a personal AI assistant" > src/data/system-messages.txt
- Build and run the docker container
docker-compose up --build