curl -X POST "https://api.tensorone.ai/v2/ai/summarization" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Artificial intelligence (AI) has emerged as one of the most transformative technologies of the 21st century. From its humble beginnings in the 1950s with simple rule-based systems, AI has evolved into sophisticated machine learning algorithms capable of processing vast amounts of data and making complex decisions. The field encompasses various subdomains including natural language processing, computer vision, robotics, and expert systems. Recent breakthroughs in deep learning, particularly with transformer architectures, have led to remarkable advances in language models, image recognition, and generative AI. These developments have profound implications for industries ranging from healthcare and finance to transportation and entertainment. However, the rapid advancement of AI also raises important ethical considerations around privacy, bias, job displacement, and the need for responsible AI development. As we move forward, the challenge lies in harnessing the immense potential of AI while addressing these concerns to ensure that AI benefits all of humanity.",
    "summaryType": "abstractive",
    "length": "medium",
    "focus": "general",
    "audience": "general",
    "includeQuotes": false
  }'
{
  "summary": "AI has evolved from basic 1950s rule-based systems into sophisticated machine learning algorithms with deep learning breakthroughs, particularly transformer architectures, driving advances in language models and image recognition. These developments impact various industries but raise ethical concerns about privacy, bias, and job displacement that must be addressed for responsible AI development.",
  "keyPoints": [
    "AI has transformed from simple 1950s rule-based systems to sophisticated machine learning algorithms",
    "Deep learning breakthroughs, especially transformer architectures, have revolutionized language models and image recognition",
    "AI impacts multiple industries including healthcare, finance, transportation, and entertainment",
    "Ethical concerns include privacy, bias, job displacement, and the need for responsible development",
    "The challenge is harnessing AI's potential while ensuring it benefits all of humanity"
  ],
  "wordCount": 52,
  "sentenceCount": 2,
  "compressionRatio": 0.31,
  "extractedQuotes": [],
  "topics": [
    "artificial intelligence",
    "machine learning", 
    "deep learning",
    "transformer architectures",
    "ethical considerations",
    "responsible AI development"
  ],
  "sentiment": {
    "overall": "neutral",
    "confidence": 0.82,
    "emotions": ["optimistic", "cautious"]
  },
  "metadata": {
    "originalWordCount": 168,
    "processingTime": 3.2,
    "model": "claude-3-haiku",
    "language": "en"
  }
}
Create intelligent summaries of long documents, articles, research papers, and other text content. Perfect for content curation, research assistance, and information processing.

Request Body

text
string
required
The text content to summarize (up to 100,000 characters)
url
string
URL to extract and summarize content from (alternative to text parameter)
summaryType
string
default:"abstractive"
Type of summarization: - abstractive - Generate new sentences that capture key ideas - extractive - Select and combine important sentences from original text - bullet_points - Create bullet-point summary - key_takeaways - Focus on main conclusions and insights - executive - Executive summary format for business documents
length
string
default:"medium"
Summary length preference: - short - 1-2 sentences or 50-100 words - medium - 3-5 sentences or 100-200 words - long - 6-10 sentences or 200-400 words - custom - Specify exact word/sentence count
wordCount
integer
Exact word count for summary (used when length is “custom”)
sentenceCount
integer
Exact sentence count for summary (alternative to wordCount)
focus
string
default:"general"
Focus area for summarization: - general - Overall content summary - main_arguments - Key arguments and claims - methodology - Methods and procedures (for research papers) - results - Findings and outcomes - recommendations
  • Action items and suggestions - timeline - Chronological events and dates - people - Key people and their roles
  • statistics - Numbers, data, and metrics
audience
string
default:"general"
Target audience for the summary: - general - General audience - technical - Technical/expert audience - business - Business executives - academic - Academic/research audience - children - Simplified for young readers
tone
string
default:"neutral"
Tone of the summary: - neutral - Objective and balanced - formal - Professional and formal - casual - Conversational and approachable - enthusiastic - Positive and engaging - critical - Analytical and questioning
includeQuotes
boolean
default:"false"
Whether to include important quotes from the original text
preserveStructure
boolean
default:"false"
Whether to maintain the original document structure in summary
language
string
default:"en"
Language of the input text and desired summary: - en - English - es - Spanish - fr - French - de - German - it - Italian - pt - Portuguese - ru - Russian - ja - Japanese - ko - Korean - zh - Chinese

Response

summary
string
The generated summary text
keyPoints
array
Array of key points extracted from the text
wordCount
integer
Number of words in the generated summary
sentenceCount
integer
Number of sentences in the generated summary
compressionRatio
number
Ratio of summary length to original text length
extractedQuotes
array
Important quotes from the original text (if requested)
topics
array
Main topics identified in the text
sentiment
object
Sentiment analysis of the original text
metadata
object
Processing metadata

Example

curl -X POST "https://api.tensorone.ai/v2/ai/summarization" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Artificial intelligence (AI) has emerged as one of the most transformative technologies of the 21st century. From its humble beginnings in the 1950s with simple rule-based systems, AI has evolved into sophisticated machine learning algorithms capable of processing vast amounts of data and making complex decisions. The field encompasses various subdomains including natural language processing, computer vision, robotics, and expert systems. Recent breakthroughs in deep learning, particularly with transformer architectures, have led to remarkable advances in language models, image recognition, and generative AI. These developments have profound implications for industries ranging from healthcare and finance to transportation and entertainment. However, the rapid advancement of AI also raises important ethical considerations around privacy, bias, job displacement, and the need for responsible AI development. As we move forward, the challenge lies in harnessing the immense potential of AI while addressing these concerns to ensure that AI benefits all of humanity.",
    "summaryType": "abstractive",
    "length": "medium",
    "focus": "general",
    "audience": "general",
    "includeQuotes": false
  }'
{
  "summary": "AI has evolved from basic 1950s rule-based systems into sophisticated machine learning algorithms with deep learning breakthroughs, particularly transformer architectures, driving advances in language models and image recognition. These developments impact various industries but raise ethical concerns about privacy, bias, and job displacement that must be addressed for responsible AI development.",
  "keyPoints": [
    "AI has transformed from simple 1950s rule-based systems to sophisticated machine learning algorithms",
    "Deep learning breakthroughs, especially transformer architectures, have revolutionized language models and image recognition",
    "AI impacts multiple industries including healthcare, finance, transportation, and entertainment",
    "Ethical concerns include privacy, bias, job displacement, and the need for responsible development",
    "The challenge is harnessing AI's potential while ensuring it benefits all of humanity"
  ],
  "wordCount": 52,
  "sentenceCount": 2,
  "compressionRatio": 0.31,
  "extractedQuotes": [],
  "topics": [
    "artificial intelligence",
    "machine learning", 
    "deep learning",
    "transformer architectures",
    "ethical considerations",
    "responsible AI development"
  ],
  "sentiment": {
    "overall": "neutral",
    "confidence": 0.82,
    "emotions": ["optimistic", "cautious"]
  },
  "metadata": {
    "originalWordCount": 168,
    "processingTime": 3.2,
    "model": "claude-3-haiku",
    "language": "en"
  }
}

URL-Based Summarization

Summarize content directly from web pages:
Python
# Summarize content from URL
def summarize_url(url, summary_type="abstractive", length="medium"):
    response = requests.post(
        "https://api.tensorone.ai/v2/ai/summarization",
        headers={"Authorization": "Bearer YOUR_API_KEY"},
        json={
            "url": url,
            "summaryType": summary_type,
            "length": length,
            "focus": "general",
            "audience": "general"
        }
    )
    return response.json()

# Summarize a news article

article_summary = summarize_url(
"https://example.com/news-article",
"key_takeaways",
"medium"
)

print("Article Summary:")
print(article_summary['summary'])

Specialized Summarization Types

Research Paper Summarization

Python
# Summarize research paper focusing on methodology and results
research_summary = requests.post(
    "https://api.tensorone.ai/v2/ai/summarization",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "text": research_paper_text,
        "summaryType": "abstractive",
        "length": "long",
        "focus": "methodology",
        "audience": "academic",
        "tone": "formal",
        "preserveStructure": True,
        "includeQuotes": True
    }
)

result = research_summary.json()
print("Research Summary:")
print(result['summary'])

if result['extractedQuotes']:
    print("\nKey Quotes:")
    for quote in result['extractedQuotes']:
        print(f"- \"{quote}\"")

Business Document Summarization

Python
# Executive summary for business documents
business_summary = requests.post(
    "https://api.tensorone.ai/v2/ai/summarization",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "text": business_report_text,
        "summaryType": "executive",
        "length": "medium",
        "focus": "recommendations",
        "audience": "business",
        "tone": "formal"
    }
)

result = business_summary.json()
print("Executive Summary:")
print(result['summary'])

Meeting Notes Summarization

Python
# Summarize meeting transcript
meeting_summary = requests.post(
    "https://api.tensorone.ai/v2/ai/summarization",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "text": meeting_transcript,
        "summaryType": "bullet_points",
        "length": "medium",
        "focus": "recommendations",
        "audience": "business",
        "tone": "casual"
    }
)

result = meeting_summary.json()
print("Meeting Summary:")
print(result['summary'])

Batch Summarization

Process multiple documents at once:
Python
def batch_summarize(texts, summary_type="abstractive", length="medium"):
    """Summarize multiple texts in batch"""
    results = []
    
    for i, text in enumerate(texts):
        response = requests.post(
            "https://api.tensorone.ai/v2/ai/summarization",
            headers={"Authorization": "Bearer YOUR_API_KEY"},
            json={
                "text": text,
                "summaryType": summary_type,
                "length": length,
                "focus": "general",
                "audience": "general"
            }
        )
        
        result = response.json()
        result['document_id'] = i
        results.append(result)
    
    return results

# Batch process multiple articles

articles = [
"Article 1 text...",
"Article 2 text...",
"Article 3 text..."
]

batch_results = batch_summarize(articles, "key_takeaways", "short")

for i, result in enumerate(batch_results):
print(f"Summary {i+1}:")
print(result['summary'])
print(f"Topics: {', '.join(result['topics'])}")
print()

Advanced Features

Multi-Document Summarization

Combine and summarize multiple related documents:
Python
# Multi-document summarization
multi_doc_summary = requests.post(
    "https://api.tensorone.ai/v2/ai/summarization/multi-document",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "documents": [
            {"text": document1_text, "title": "Document 1"},
            {"text": document2_text, "title": "Document 2"},
            {"text": document3_text, "title": "Document 3"}
        ],
        "summaryType": "abstractive",
        "length": "long",
        "focus": "general",
        "consolidateTopics": True,
        "showSourceAttribution": True
    }
)

result = multi_doc_summary.json()
print("Multi-Document Summary:")
print(result['summary'])

Comparative Summarization

Compare and contrast multiple documents:
Python
# Comparative analysis
comparative_summary = requests.post(
    "https://api.tensorone.ai/v2/ai/summarization/comparative",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "documents": [
            {"text": article1_text, "title": "Article A"},
            {"text": article2_text, "title": "Article B"}
        ],
        "summaryType": "comparative",
        "length": "medium",
        "focus": "main_arguments",
        "highlightDifferences": True,
        "findCommonThemes": True
    }
)

result = comparative_summary.json()
print("Comparative Summary:")
print(result['summary'])
print("\nCommon Themes:")
print(result['commonThemes'])
print("\nKey Differences:")
print(result['differences'])

Summarization with Custom Instructions

Provide specific instructions for summarization:
Python
# Custom instruction summarization
custom_summary = requests.post(
    "https://api.tensorone.ai/v2/ai/summarization",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "text": technical_document_text,
        "summaryType": "abstractive",
        "length": "custom",
        "wordCount": 150,
        "customInstructions": "Focus on practical applications and avoid technical jargon. Include specific examples mentioned in the text.",
        "audience": "general",
        "tone": "casual"
    }
)

result = custom_summary.json()
print("Custom Summary:")
print(result['summary'])

Quality Assessment

Evaluate summary quality and relevance:
Python
# Get summary with quality metrics
quality_summary = requests.post(
    "https://api.tensorone.ai/v2/ai/summarization",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "text": document_text,
        "summaryType": "abstractive",
        "length": "medium",
        "includeQualityMetrics": True,
        "assessRelevance": True,
        "checkFactualAccuracy": True
    }
)

result = quality_summary.json()
print("Summary:")
print(result['summary'])

print("\nQuality Metrics:")
print(f"Relevance Score: {result['qualityMetrics']['relevanceScore']}")
print(f"Coherence Score: {result['qualityMetrics']['coherenceScore']}")
print(f"Factual Accuracy: {result['qualityMetrics']['factualAccuracy']}")
print(f"Coverage Score: {result['qualityMetrics']['coverageScore']}")

Content Type Detection

Automatically detect and optimize for different content types:
Python
# Auto-detect content type and optimize
auto_summary = requests.post(
    "https://api.tensorone.ai/v2/ai/summarization",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "text": unknown_content_text,
        "autoDetectContentType": True,
        "adaptSummaryStyle": True,
        "length": "medium"
    }
)

result = auto_summary.json()
print(f"Detected Content Type: {result['detectedContentType']}")
print(f"Optimized Summary Style: {result['appliedSummaryStyle']}")
print("\nSummary:")
print(result['summary'])

Use Cases

Content Curation

  • News Aggregation: Summarize daily news articles
  • Research Compilation: Digest academic papers and reports
  • Social Media: Create summaries for long-form content sharing
  • Newsletter Creation: Generate newsletter content from multiple sources

Business Intelligence

  • Market Research: Summarize industry reports and competitor analysis
  • Meeting Minutes: Convert transcripts to actionable summaries
  • Customer Feedback: Synthesize reviews and feedback
  • Financial Reports: Extract key insights from financial documents

Education and Research

  • Literature Reviews: Summarize research papers for academic work
  • Study Materials: Create concise study guides from textbooks
  • Lecture Notes: Convert lengthy lectures to key points
  • Book Summaries: Generate chapter and book summaries
  • Legal Documents: Summarize contracts and legal briefs
  • Regulatory Updates: Digest policy changes and regulations
  • Case Studies: Extract key points from legal cases
  • Compliance Reports: Summarize audit and compliance documents

Best Practices

Input Preparation

  • Clean Text: Remove unnecessary formatting and artifacts
  • Structure: Maintain logical document structure when possible
  • Context: Provide context about the document type and purpose
  • Language: Specify language for non-English content

Summary Optimization

  • Appropriate Length: Choose length based on use case and audience
  • Target Audience: Adjust complexity and terminology for intended readers
  • Focus Area: Specify what aspects are most important
  • Tone Matching: Match tone to intended use and audience

Quality Control

  • Review Output: Always review generated summaries for accuracy
  • Fact Checking: Verify important facts and figures
  • Bias Detection: Check for potential bias in summarization
  • Source Attribution: Maintain proper attribution when needed

Pricing

  • Standard Summarization: $0.005 per 1K characters of input text
  • Advanced Features: Additional $0.002 per 1K characters for quality metrics, sentiment analysis
  • Multi-Document: $0.008 per 1K characters total across all documents
  • Batch Processing: 20% discount for 50+ documents
  • Custom Models: Available for enterprise customers

Limitations

  • Maximum Input: 100,000 characters per request
  • Processing Time: 2-15 seconds depending on length and complexity
  • Language Support: Quality varies by language, best for English
  • Accuracy: Summaries may not capture all nuances of complex texts
Summarization quality improves with well-structured input text. Documents with clear sections, headings, and logical flow produce better summaries.
For technical or specialized content, use the appropriate audience setting and consider providing custom instructions to ensure the summary captures domain-specific concepts accurately.