Brief condenses an article, report, thread or transcript into a short summary written in full sentences. Pick short for a one-line gist, medium for a paragraph, long for more detail.
It rewrites from the text itself and works best on English news-style and business writing.
Use it
curl https://labs.greatwork.company/v1/run \
-H "Authorization: Bearer $GWL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "brief-1",
"input": "City officials approved a plan on Tuesday to convert three downtown parking garages into mixed-use buildings with apartments, shops and a public library branch. The project, expected to take four years, will add about 900 homes, a third of them priced for lower-income residents. Supporters said the garages sit half-empty since more people started working from home, while some business owners worried about losing parking for customers. The council added a requirement that each building keep at least 150 public parking spaces on its ground floors. Construction on the first garage is set to begin next spring.",
"length": "short"
}'const res = await fetch("https://labs.greatwork.company/v1/run", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GWL_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "brief-1",
"input": "City officials approved a plan on Tuesday to convert three downtown parking garages into mixed-use buildings with apartments, shops and a public library branch. The project, expected to take four years, will add about 900 homes, a third of them priced for lower-income residents. Supporters said the garages sit half-empty since more people started working from home, while some business owners worried about losing parking for customers. The council added a requirement that each building keep at least 150 public parking spaces on its ground floors. Construction on the first garage is set to begin next spring.",
"length": "short"
}),
});
const { output, usage } = await res.json();import os, requests
res = requests.post(
"https://labs.greatwork.company/v1/run",
headers={"Authorization": f"Bearer {os.environ['GWL_API_KEY']}"},
json={
"model": "brief-1",
"input": "City officials approved a plan on Tuesday to convert three downtown parking garages into mixed-use buildings with apartments, shops and a public library branch. The project, expected to take four years, will add about 900 homes, a third of them priced for lower-income residents. Supporters said the garages sit half-empty since more people started working from home, while some business owners worried about losing parking for customers. The council added a requirement that each building keep at least 150 public parking spaces on its ground floors. Construction on the first garage is set to begin next spring.",
"length": "short"
},
)
output = res.json()["output"]Set GWL_API_KEY to a key from your dashboard. The bare name brief works too and follows new versions.
Options
input: A string or array of up to 8 (up to 6,000 characters each; longer texts are cut).
| Name | Type | Default | What it does |
|---|---|---|---|
length | string short | medium | long | "medium" | Summary length: short (one sentence), medium (a paragraph) or long. |
Output
| Field | Type | Meaning |
|---|---|---|
summary | string | The summary. |
Every response wraps this in {"id", "model", "output", "usage": {"units", "unit", "cost_usd"}, "latency_ms"}. Send an array as input and output is an array in the same order.
Examples
News article
{
"model": "brief-1",
"input": "City officials approved a plan on Tuesday to convert three downtown parking garages into mixed-use buildings with apartments, shops and a public library branch. The project, expected to take four years, will add about 900 homes, a third of them priced for lower-income residents. Supporters said the garages sit half-empty since more people started working from home, while some business owners worried about losing parking for customers. The council added a requirement that each building keep at least 150 public parking spaces on its ground floors. Construction on the first garage is set to begin next spring.",
"length": "short"
}{
"summary": "City officials approve plan to convert three downtown parking garages into mixed-use buildings. The project will add about 900 homes, a third of them priced for lower-income residents. Supporters say the garages sit half-empty since more people started working from home."
}Captured on our production servers: 3238 ms, 1 text, $0.0003.
Good for
- Summaries for article cards and newsletters
- TL;DR for long support threads
- Digest daily reports
- Preview long emails
Limits and caveats
- English only.
- It can copy a sentence from the text word for word; that's normal for this style of model.
- For summaries that must be checked against the source, run Ground on the result.
Pricing
$0.30 per 1,000 summaries. One unit per started 3,000 characters of input. Failed calls aren't charged, and a call never costs more than its estimate (POST /v1/estimate tells you before you run it).
Built on
sshleifer/distilbart-cnn-6-6, 230M (DistilBART) parameters. License: Apache-2.0. We run it on our servers.