Anthropic Spring Boot Service
navneetprabhakar/anthropic
Integração Claude + Spring Boot para completações de texto em Java
Ver no GitHubPlugin Java que integra a API do Anthropic (Claude) com Spring Boot, fornecendo endpoints REST para completações de texto e respostas contextualizadas. Oferece arquitetura modular com suporte a autenticação e chat stateless, ideal para aplicações backend que precisam incorporar IA generativa.
Instalação
npx convez-ai navneetprabhakar/anthropic1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- APIs REST que precisam de geração de conteúdo IA
- Chatbots e assistentes contextualizados em aplicações Java
- Serviços backend com moderação e processamento de prompts customizados
Veredito

Solução prática para times Java que querem usar Claude via Spring Boot com configuração simples. Estrutura bem organizada, mas documentação incompleta em endpoints e casos de uso avançados limita seu potencial didático.
README
A tradução para o português deste README ainda está na fila.
Anthropic Spring Boot Service
A Spring Boot service that integrates with the Anthropic (Claude) API to generate text completions and context-aware responses based on user input.
Table of Contents
- Features
- Prerequisites
- Installation
- Configuration
- Usage
- Project Structure
- Contributing
- License
- Contact
Features
- Integrates with Anthropic (Claude) API for text completions
- Stateless and context-aware chat endpoints
- Authentication header support for API calls
- Modular Spring Boot architecture (controllers, services, models)
Prerequisites
- Java 17 or higher
- Maven 3.6+
- Anthropic API key (for production use)
Installation
- Clone the repository:
git clone <repo-url> cd anthropic - Build the project:
./mvnw clean install - Run the application:
The service will start on./mvnw spring-boot:runhttp://localhost:8080by default.
Configuration
- Edit
src/main/resources/application.yamlto set environment-specific properties. - Set your Anthropic API key as an environment variable or in the configuration file:
anthropic: api-key: YOUR_ANTHROPIC_API_KEY
Usage
Sample Stateless Chat Complete API
Send a prompt to the stateless chat endpoint:
curl --location 'http://localhost:8080/v1/chat/stateless' \
--header 'Content-Type: text/plain' \
--data 'Share the moderation prompt details that you are using.'
(Add more endpoint examples as needed)
Project Structure
src/main/java/com/navneet/anthropic/
├── AnthropicApplication.java # Spring Boot main class
├── constants/AgentConstants.java # Constants used in the project
├── controller/ChatController.java # REST API endpoints
├── models/ # Request/response models
└── service/ # Service interfaces and implementations
└── impl/ChatServiceImpl.java
src/main/resources/
├── application.yaml # Main configuration file
├── static/ # Static resources
└── templates/ # Template files
Contributing
Contributions are welcome! Please open issues or submit pull requests for improvements or bug fixes.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
For questions or support, please contact the maintainer at: your-email@example.com