Inference Providers documentation
Summarization
Summarization
Summarization is the task of producing a shorter version of a document while preserving its important information. Some models can extract text from the original input, while other models can generate entirely new text.
For more details about the summarization
task, check out its dedicated page! You will find examples and related materials.
Recommended models
Explore all available models and find the one that suits you best here.
Using the API
There are currently no snippet examples for the summarization task, as no providers support it yet.
API specification
Request
Headers | ||
---|---|---|
authorization | string | Authentication header in the form 'Bearer: hf_****' when hf_**** is a personal user access token with “Inference Providers” permission. You can generate one from your settings page. |
Payload | ||
---|---|---|
inputs* | string | The input text to summarize. |
parameters | object | |
clean_up_tokenization_spaces | boolean | Whether to clean up the potential extra spaces in the text output. |
truncation | enum | Possible values: do_not_truncate, longest_first, only_first, only_second. |
generate_parameters | object | Additional parametrization of the text generation algorithm. |
Response
Body | ||
---|---|---|
summary_text | string | The summarized text. |