POST /api/summarize

Summarize Text

Summarize long text into concise, focused summaries. Choose from different styles (bullet points, paragraph, or ultra-concise) and focus areas (key points, executive summary, or technical details).

$0.03 per request

> REQUEST_PARAMETERS

Parameter Type Required Description
text string Yes Text to summarize (1-10,000 characters)
options.style enum No bullet, paragraph, concise
options.focus enum No key-points, executive, technical
options.maxLength number No Maximum summary length (50-500 words)

> EXAMPLE_REQUEST

POST /api/summarize
Headers:
  Content-Type: application/json
  PAYMENT-SIGNATURE: [x402 payment signature via Faremeter SDK]

{
  "text": "Artificial intelligence (AI) is intelligence demonstrated by machines, as opposed to the natural intelligence displayed by humans or animals. Leading AI textbooks define the field as the study of 'intelligent agents': any system that perceives its environment and takes actions that maximize its chance of achieving its goals. Some popular accounts use the term 'artificial intelligence' to describe machines that mimic 'cognitive' functions that humans associate with the human mind, such as 'learning' and 'problem solving'.",
  "options": {
    "style": "bullet",
    "focus": "key-points",
    "maxLength": 100
  }
}

> EXAMPLE_RESPONSE

{
  "result": {
    "summary": "- AI is machine intelligence as opposed to natural intelligence\n- AI involves 'intelligent agents' that perceive and act to achieve goals\n- AI mimics cognitive functions like learning and problem solving",
    "original_length": 527,
    "summary_length": 168,
    "style": "bullet",
    "focus": "key-points"
  },
  "tokens_used": {
    "prompt_tokens": 156,
    "completion_tokens": 42,
    "total_tokens": 198
  }
}

> STYLE_OPTIONS

bullet

Returns a bulleted list of key points - best for quick scanning.

paragraph

Returns a coherent paragraph that flows naturally.

concise

Returns a single, highly condensed sentence capturing the core message.

> FOCUS_OPTIONS

key-points

Focus on the main ideas, key takeaways, and essential information from the text.

executive

Focus on business impact, key takeaways, and actionable insights for decision-makers.

technical

Focus on technical details, implementation specifics, and technical considerations for developers.

> ERROR_RESPONSES

400 Bad Request
Validation failed or content blocked by security checks
402 Payment Required
Invalid or missing x402 payment headers
451 Unavailable
Generated content filtered by security checks

> NOTES

> TRY_IT_OUT

Get the schema and examples programmatically:

curl https://textmerchant.xyz/api/summarize/docs/schema