---
title: bart-large-cnn · Cloudflare Workers AI docs
description: BART is a transformer encoder-encoder (seq2seq) model with a bidirectional (BERT-like) encoder and an autoregressive (GPT-like) decoder. You can use this model for text summarization.
source_url:
  html: https://patricia-pcx17119-l7-overrides.preview.developers.cloudflare.com/workers-ai/models/bart-large-cnn/index.md
  md: https://patricia-pcx17119-l7-overrides.preview.developers.cloudflare.com/workers-ai/models/bart-large-cnn/
---

f

# bart-large-cnn Beta

Summarization • facebook

@cf/facebook/bart-large-cnn

BART is a transformer encoder-encoder (seq2seq) model with a bidirectional (BERT-like) encoder and an autoregressive (GPT-like) decoder. You can use this model for text summarization.

| Model Info | |
| - | - |
| Beta | Yes |
| Unit Pricing | $0.00 per M input tokens |

## Usage

## Parameters

\* indicates a required field

### Input

* `input_text * `string min 1

  The text that you want the model to summarize

* `max_length `integer default 1024

  The maximum length of the generated summary in tokens

### Output

* `summary `string

  The summarized version of the input text

## API Schemas

The following schemas are based on JSON Schema

* Input

  ```json
  {
      "type": "object",
      "properties": {
          "input_text": {
              "type": "string",
              "minLength": 1,
              "description": "The text that you want the model to summarize"
          },
          "max_length": {
              "type": "integer",
              "default": 1024,
              "description": "The maximum length of the generated summary in tokens"
          }
      },
      "required": [
          "input_text"
      ]
  }
  ```

* Output

  ```json
  {
      "type": "object",
      "contentType": "application/json",
      "properties": {
          "summary": {
              "type": "string",
              "description": "The summarized version of the input text"
          }
      }
  }
  ```
