← Back to Home

API Documentation

Complete guide to using the CopyPasteSummarize API.

Authentication

All API requests require an API key. You'll receive your API key via email after purchase.

Include your API key in the request header:

X-API-Key: your-api-key-here

Rate Limits & Usage

Your plan includes a token quota. Each request consumes tokens based on the length of input and output text. Monitor your usage in real-time via our dashboard.

Plan Tokens Included Additional Cost
Starter 100,000 $0.12 per 1,000 tokens
Professional 500,000 $0.12 per 1,000 tokens
Enterprise 5,000,000 $0.12 per 1,000 tokens

Endpoints

POST/summary

Summarize text using OpenAI GPT-3.5-turbo or local LSA algorithm.

Request

Parameter Type Required Description
text string Yes The text to summarize (max 512KB)
summary_sentences integer No Number of sentences in summary (1-6, default: 3)

Response

{
  "summary": "The summarized text here...",
  "word_count": 245,
  "summary_count": 52
}

Example: cURL

curl -X POST https://api.summary-service.com/summary \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Your long text here...",
    "summary_sentences": 3
  }'

Example: Python

import requests

response = requests.post(
    'https://api.summary-service.com/summary',
    headers={'X-API-Key': 'your-api-key'},
    json={
        'text': 'Your long text here...',
        'summary_sentences': 3
    }
)

data = response.json()
print(data['summary'])

Example: JavaScript

const response = await fetch('https://api.summary-service.com/summary', {
  method: 'POST',
  headers: {
    'X-API-Key': 'your-api-key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    text: 'Your long text here...',
    summary_sentences: 3
  })
});

const data = await response.json();
console.log(data.summary);

Error Handling

The API returns standard HTTP status codes:

Status Code Meaning
200 Success
400 Bad Request (missing text, invalid JSON, etc.)
403 Forbidden (invalid API key, quota exceeded)
405 Method Not Allowed (only GET/POST supported)
413 Payload Too Large (text exceeds 512KB)
500 Internal Server Error (temporary issue)

Getting Help

For questions or issues: