Text Management

Shorten content

Overview

Reduces the length of a text while preserving its original meaning and essential information.


Endpoint

  • POST /api/v1/text/compact

Use cases

  • Create shortened versions from long texts
  • Shorten content that is too long
  • Adapt texts to different spaces, channels or formats
  • Generate variants of the same content at different lengths
  • Integrate text shortening into application flows via API

Technical specifications

  • INPUT: content
  • OUTPUT: content
  • ACCESS: API REST
  • CHANNELS: Cloud Management Platform, API Platform

Implementation examples

Input
curl --location 'https://api.ai.devops.aruba.it/api/services/textmanagement/v1/text/compact' \
--header 'Content-Type: application/json' \
--header 'ai-platform-key: ••••••' \
--header 'conversation-id: ••••••' \
--header 'Authorization: ••••••' \
--data '{
"content": "Ciao, ci troviamo domani a cena? Vorrei proporre di incontrarci alle [orario] presso [luogo], dove potremo gustare un menù speciale con [piatto principale] e un dessert a base di [dessert]. Se hai preferenze alimentari o allergie, fammi sapere così posso informare il ristorante. Ti prego di confermare la tua presenza entro [data di conferma] rispondendo a questa email o inviandomi un messaggio. Non vedo l’ora di passare una serata piacevole insieme!"
}'
Output
{
"content": "Ciao, ci vediamo domani a cena alle [orario] a [luogo] con un menù speciale: [piatto principale] e dessert [dessert]. Se hai allergie o preferenze, avvisa il ristorante. Conferma entro [data di conferma] rispondendo a questa email o inviandomi un messaggio. Non vedo l’ora di passare una serata piacevole insieme!",
"ai_platform_usage": {
"service": "text-management",
"namespace": "ai-platform",
"prompt_tokens": 522,
"completion_tokens": 405,
"total_tokens": 927
},
"ai_generated": true
}

Cost

0,0318 € + VAT / 1M token (input)
0,1533 € + VAT / 1M token (output)

NOTE

Submitted data is not used to train the models.