A FastAPI-powered application that leverages Claude AI (Anthropic) to generate diverse content for social media platforms, including YouTube, Instagram, and TikTok. The application is being expanded to include video downloading capabilities for Reddit, Facebook, Instagram, LinkedIn, X (formerly Twitter), Pinterest, and TikTok (currently under development).
- Description Generator: Creates optimized descriptions for both long and short-form videos
- Hashtag Generator: Generates platform-specific hashtags in multiple languages
- Title Generator: Creates 10 catchy video titles based on provided details
- Username Generator: Suggests creative channel usernames based on name, topic, and style
- Caption Generator: Creates engaging captions with relevant emojis and hashtags
- Username Generator: Generates Instagram-specific usernames following platform guidelines
- Caption Generator: Creates platform-optimized captions with trending hashtags
- Hashtag Generator: Produces relevant hashtags in multiple languages
- Video Hook Generator: Creates 10 engaging hooks based on topic, target audience, and context
- Video Script Generator: Produces well-structured, markdown-formatted video scripts
- Video Idea Generator: Generates 10 creative video ideas from keywords
- Framework: FastAPI
- AI Model: claude-3-5-sonnet-20241022 (Anthropic)
- Python Libraries:
- anthropic
- pydantic
- python-dotenv
- fastapi
Install the dependencies:
pip install -r requirements.txt
- Set up your environment variables:
ANTHROPIC_API_KEY=your_api_key_here
- Run the project:
uvicorn main:app --reload
The API will be available at http://localhost:8000
- Access the API documentation:
- Swagger UI:
http://localhost:8000/docs
- ReDoc:
http://localhost:8000/redoc
POST /youtube/description-generator
POST /youtube/hashtag-generator
POST /youtube/title-generator
POST /youtube/username-generator
POST /instagram/caption-generator
POST /instagram/username-generator
POST /tiktok/caption-generator
POST /tiktok/hashtag-generator
POST /content-creation/video-hook-generator
POST /content-creation/video-script-generator
POST /content-creation/ai-video-idea-generator
- Multi-platform Support: Generates content for YouTube, Instagram, and TikTok
- Language Support: Multilingual hashtag generation
- Error Handling: Robust error handling with appropriate HTTP status codes
- Input Validation: Request validation using Pydantic models
- Consistent Response Format: Standardized JSON responses across all endpoints
All endpoints return responses in the following JSON format:
{
"data": "<generated_content>",
"message": "Success | Error",
"error": false | true
}
The API implements comprehensive error handling:
- 200: Successful response
- 400: Bad request (invalid input)
- 500: Internal server error
Add .env
file in the root directory.
Required environment variables:
ANTHROPIC_API_KEY=your_api_key_here
Tests can be run using pytest:
pytest app/free_tools/testing/test_api.py -v
Note: This API utilizes claude-3-5-sonnet-20241022 for content generation. Ensure you have the necessary API credentials before deployment.