Skip to main content
POST
/
models
/
v2
/
ainize
/
bart-base-cnn
summarization
curl --request POST \
  --url https://api.bytez.com/models/v2/ainize/bart-base-cnn \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. It was the first structure to reach a height of 300 metres. Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct.",
  "stream": true
}
'
{
  "error": "<string>",
  "output": "The Eiffel Tower is the tallest structure in Paris."
}

Authorizations

Authorization
string
header
required

Set Authorization header to BYTEZ_KEY 'Authorization: YOUR_BYTEZ_KEY_HERE'

Body

application/json

Schema for summarization models

text
string
required

The input text

Example:

"The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. It was the first structure to reach a height of 300 metres. Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct."

stream
boolean

Enable text streaming.

Response

Successful summarization response.

error
string | null
required

Null on success; otherwise an error message.

output
string
required

Successful response with the summary

Example:

"The Eiffel Tower is the tallest structure in Paris."