Loading...
Loading...
> Suite of utilities for text summarization, translation, and sentiment analysis.
A comprehensive set of text processing tools powered by AI. Quickly integrate features like summarization, language translation, grammar correction, and tone adjustment into your application.
DESC: Add the text tools to your page.
1import { Card, CardHeader, CardContent } from "@/components/ui/card";2import { Button } from "@/components/ui/button";3import { Textarea } from "@/components/ui/textarea";
Copy the template from the library page.
1// See /library/ai-text-tools for full template2// Operations: summarize, rewrite, translate, expand, grammar, tone34const handleTransform = async (text: string, operation: string) => {5 const response = await fetch('/api/ai/text', {6 method: 'POST',7 headers: { 'Content-Type': 'application/json' },8 body: JSON.stringify({ text, operation }),9 });10 return await response.json();11};
| Option | Type | Default | Description |
|---|---|---|---|
| operations | Operation[] | all 6 operations | Available: summarize, rewrite, translate, expand, grammar, tone. |
| targetLanguage | string | "Spanish" | Target language for translation operation. |
| tone | string | "professional" | Target tone for rewriting (professional, casual, formal, friendly). |