Use cases

Choosing an AI API for summarization

Summarising is input-heavy: you send a long document and get a short answer back. Input price per million tokens drives the bill.

What summarization needs

  • Low input price
  • Enough context for the document
  • Faithful summaries without invented detail

Models that fit

ModelMakerList price (in / out per 1M)Through SomnusWhy
Gemini 3.8 FlashGoogle$0.75 / $3.75$0.38 / $1.88low input price
DeepSeek V4 FlashDeepSeek$0.22 / $0.66$0.11 / $0.33lowest input price in the table
Claude Sonnet 5Anthropic$2 / $10$1 / $5nuanced or high-stakes documents

Somnus column uses the minimum 2× credit; larger top-ups go further.

Cost example

1,000 requests of about 1,500 input and 400 output tokens on DeepSeek V4 Flash cost about $0.59 at list price — roughly $0.30 with Somnus credit.

Tips

  • Split very long documents and summarise the summaries.
  • Tell the model the target length and audience.
  • Use cached input when you summarise the same source repeatedly.

Common mistakes

  • Choosing a model on output price when your cost is almost all input.
  • Not asking the model to quote or cite, which hides errors.

Example

python
from openai import OpenAI
import os

client = OpenAI(
    api_key=os.environ["SOMNUS_API_KEY"],
    base_url="https://gateway-production-c837.up.railway.app/v1",
)

resp = client.chat.completions.create(
    model="claude-sonnet-5",
    messages=[
      {"role": "user", "content": "Summarise this meeting transcript in five bullet points."}
    ],
)
print(resp.choices[0].message.content)

Questions

What is the cheapest model for summarization?

Of the models suggested here, DeepSeek V4 Flash has the lowest list price ($0.22 / $0.66 per 1M tokens). Test it on your own examples before committing.

Can I switch models later?

Yes. With Somnus you change the model name; the rest of the code stays the same.

Run this code with free credit

Create an account and get $5 of free API credit — enough to try every example on this page.

Get $5 free credit

Related

Browse more: Alternatives · Compare · Use cases · Developers · Solutions · Tools

WindowsStart with $5 free