Skip to content

Text tools

Summaries with sources, translations that keep your terms

Summarize, translate and grammar share one word meter. Summaries point to the text they came from and grammar edits show what changed, so your app can show the result next to the original.

Endpoints
summarize, translate, grammar
Meter
text.words, shared by all three
Per request
20,000 words to summarize, 10,000 to translate or correct
From
$5 a month for 1,000,000 words

One notice, three calls

text

31 words

  1. 0 to 57The city council approved a new bike lane on Main Street.
  2. 58 to 113Construction starts in March and takes about six weeks.
  3. 114 to 172Parking on the north side will be removed during the work.

POST/v1/text/summarize

length: "short"

  • The city council approved a new bike lane on Main Street.source_span 0 to 57
  • Construction starts in March and takes about six weeks.source_span 58 to 113
  • Left out of a short summary

POST/v1/text/translate

target: "de", 3 glossary terms

  1. Der Stadtrat hat einen neuen Radweg auf der Main Street genehmigt.
  2. Der Bau beginnt im März und dauert etwa sechs Wochen.
  3. Die Parkplätze auf der Nordseite fallen während der Arbeiten weg.

POST/v1/text/grammar

on the draft, mode: "standard"

    • theThecapitalizationoffset 0
    • aprovedapprovedspellingoffset 17
    • startstartsgrammaroffset 70
    • therepeated_wordoffset 126
Sample output, not a live callSummarize is the documented example. The translation and the edits on this notice are illustrations, not model output.x-units-charged per call 31, 31, 32

One document, three operations. Each response says what it used or what it changed.

A summary nobody can check, a translation that renames your product, or a grammar fix that rewrites the whole paragraph all send someone back to the original text. The output is only useful when you can see what it was based on and what it changed.

The three operations, side by side

Summarize

POST/v1/text/summarize

Used for
Support tools that summarize long threads and link each line back to the message it came from
You send
text, length, format, language
You get back
summary, bullets, coverage[], words
Checked by
Every statement traced to a span of your text
Points at your text with
source_span: start, end
Limit per request
20,000 words, 150,000 characters

Translate

POST/v1/text/translate

Used for
Product teams translating help articles and interface strings with a fixed glossary of product names
You send
text, source, target, glossary, formality
You get back
text, detected_source, target, words
Checked by
Glossary terms verified, then the text translated back to compare meaning
Points at your text with
No offsets: it returns the text
Limit per request
10,000 words, 80,000 characters, 200 glossary entries

Grammar

POST/v1/text/grammar

Used for
Editors and form builders that underline grammar fixes inline, one underline per edit
You send
text, language, mode
You get back
text, edits[], words
Checked by
Edits cut to the smallest diff, each with a reason
Points at your text with
offset, length
Limit per request
10,000 words, 80,000 characters
Offsets
UTF-16 code units, the same as JavaScript string indices. An end offset is exclusive.
Meter
text.words, one meter for all three.
Answers
JSON, or a stream when the request sends Accept: text/event-stream on its own.

Every statement points back. Offsets into the text you sent.

The documented summarize example, length short172 UTF-16 units in the request
  1. The city council approved a new bike lane on Main Street.

    start 0end 57

    coverage[0]"source_span": { "start": 0, "end": 57 }
  2. Construction starts in March and takes about six weeks.

    start 58end 113

    coverage[1]"source_span": { "start": 58, "end": 113 }
  3. Parking on the north side will be removed during the work.

    start 114end 172

    Not in a short summarylength: medium covers it

Each coverage entry pairs a statement with source_span, the offsets of the sentence it came from. The end is exclusive, so text.slice(start, end) gives that sentence back. Use it to light up the source, or to check a statement before you show it.

One notice through all three. Pick a call and read what it returns.

Nothing here calls the API. The short summary is the documented example. The medium summary, the translations and the draft's edits are written by hand in the real response shape, and are not model output.

POST/v1/text/summarizeSample output, not a live call
Sample input
length
format

text

The city council approved a new bike lane on Main Street. Construction starts in March and takes about six weeks. Parking on the north side will be removed during the work.

summary

The city council approved a new bike lane on Main Street. Construction starts in March and takes about six weeks.

Coverage

112 of 172 characters traced

Not in this summary: 114 to 172

status 200 OKx-units-charged 31meter text.words

One model, a check per task. What runs between your text and the response.

We run one instruction-tuned open model on our own servers and put a check for each task after it: source tracing for summaries, glossary and back-translation for translations, a minimal diff for grammar. You pay for input words at what the stack costs us to run plus a margin.

What runs for one request

Steps, in order:

  1. Your text (input)
  2. Split by structure (check)
  3. Your glossary (input)
  4. Task routing (check)
  5. Model registry (store)
  6. Instruction-tuned open model (model)
  7. Task check (check)
  8. Entity guard (check)
  9. Text with coverage or edits (output)

Connections:

  • Your text to Split by structure
  • Split by structure to Task routing
  • Task routing to Instruction-tuned open model
  • Your glossary to Instruction-tuned open model: terms
  • Model registry to Instruction-tuned open model: weights
  • Instruction-tuned open model to Task check
  • Task check to Entity guard
  • Entity guard to Text with coverage or edits
  1. 01 · segment

    Split by structure

    Splits the text into headings, paragraphs, list items and sentences and records their offsets, so the output can keep the same shape.

    Runs on
    CPU worker, before any model call
    In and out
    text -> segments[] with offsets
  2. 02 · route

    Route the task

    Sets the task parameters: length and format for a summary, target language, formality and glossary for a translation, minimal or standard mode for grammar.

    Runs on
    CPU worker
    In and out
    segments[] + request -> task plan
  3. 03 · generate

    Generate under constraints

    The instruction-tuned open model writes the output with constrained decoding, so the requested format and glossary terms hold.

    Runs on
    Our GPU nodes
    In and out
    task plan -> draft output
  4. 04 · check

    Check the task

    Summaries: every statement is traced to a source span. Translations: glossary terms are verified and the text is translated back to compare meaning. Grammar: edits are reduced to the smallest diff and each one gets a reason tag.

    Runs on
    CPU worker plus small scoring models
    In and out
    draft output -> checked output
  5. 05 · entities

    Guard names and numbers

    Compares names, numbers and other entities between input and output.

    Runs on
    CPU worker
    In and out
    checked output -> guarded output
  6. 06 · assemble

    Reassemble

    Puts the segments back in their original order and structure, attaches coverage or edits, and counts the input words charged. With Accept: text/event-stream the text is sent in chunks as it is ready.

    Runs on
    API node
    In and out
    guarded output -> response

Three endpoints, plain HTTP. JSON in, JSON or a stream out.

All three take the same key in the x-api-key header. Branch on error.code, never on the message.

  • POST/v1/text/summarize

    Returns the summary and traces every statement to a span of the input.

    Answers
    Sync or stream
    Meter
    text.words
  • POST/v1/text/translate

    Translates sentence by sentence and keeps structure, names and glossary terms.

    Answers
    Sync or stream
    Meter
    text.words
  • POST/v1/text/grammar

    Returns the corrected text and the edits, each with an offset and a reason.

    Answers
    Sync or stream
    Meter
    text.words

Request

POST/v1/text/summarizeTo stream, send Accept: text/event-stream on its own. A tie with application/json, or */*, returns JSON.

# Summarize (each statement comes back with its source span)
curl "$BASE_URL/v1/text/summarize" \
  -H "x-api-key: sk_live_..." \
  -H "content-type: application/json" \
  -d '{"text": "The city council approved a new bike lane on Main Street. Construction starts in March and takes about six weeks. Parking on the north side will be removed during the work.", "length": "short"}'

# Translate
curl "$BASE_URL/v1/text/translate" \
  -H "x-api-key: sk_live_..." \
  -H "content-type: application/json" \
  -d '{"text": "Good morning. The train leaves at nine.", "target": "de", "glossary": [{"from": "train", "to": "Zug"}]}'

# Correct grammar.
# Add -H "accept: text/event-stream" to any of the three to stream the text.
curl "$BASE_URL/v1/text/grammar" \
  -H "x-api-key: sk_live_..." \
  -H "content-type: application/json" \
  -d '{"text": "i think their is a error in the the report."}'

Sample responses

{
  "data": {
    "summary": "The city council approved a new bike lane on Main Street. Construction starts in March and takes about six weeks.",
    "coverage": [
      {
        "claim": "The city council approved a new bike lane on Main Street.",
        "source_span": {
          "start": 0,
          "end": 57
        }
      },
      {
        "claim": "Construction starts in March and takes about six weeks.",
        "source_span": {
          "start": 58,
          "end": 113
        }
      }
    ],
    "words": 31
  },
  "meta": {
    "request_id": "3f1c9a52-7d4e-4b8a-9e21-6c0d5b7a8f13",
    "version": "1",
    "engine": "native",
    "module": "text",
    "units": 31
  }
}

What you are billed for

Unit
words
Counted as
Words of input text sent to summarize, translate or grammar, on the shared text.words meter. A word is a whitespace-separated token. Output words are not counted.
Rounding
Whole words, counted from the input before processing. A processing failure refunds the charge.
Trial on approval
50,000 words

Errors you can get

  • validation_error400

    The body is not valid, text is empty, target is missing on translate, or a field is unknown.

  • unauthorized401

    The x-api-key header is missing, revoked or wrong.

  • forbidden403

    The key or the account is not allowed to call this endpoint.

  • not_entitled403

    Your account has no active text tools plan or trial.

  • quota_exceeded403

    The text.words meter has fewer words left than the request needs.

  • payload_too_large413

    The text is over the per-request word or character limit.

  • rate_limited429

    The key sent more requests per minute than its limit.

  • internal_error500

    Something failed on our side. The charge is refunded.

  • provider_error502

    Processing failed. Retry later; the charge is refunded.

Where it stops. What it does not take.

  • Per request: summarize takes up to 20,000 words (150,000 characters); translate and grammar take up to 10,000 words (80,000 characters).
  • Translate accepts up to 200 glossary entries per request.
  • Plain text only. There is no file upload here; send extracted text, or run the document through Smart OCR first.
  • Formality applies only to target languages that distinguish it.

One meter, three tiers. Billed monthly, by invoice.

Prices are low because we run the stack ourselves. You pay our running cost plus a margin.

Text tools tiers, billed monthly

Starter

Price
$5/month
Included
1,000,000 words
Limits
No extra limits
Fits
One feature, such as summaries in a support inbox

Pro

Price
$19/month
Included
6,000,000 words
Limits
No extra limits
Fits
Translating a help center and the interface strings of a product

Scale

Price
$49/month
Included
30,000,000 words
Limits
No extra limits
Fits
Batch summaries or translation across a document archive

Over the quota: write to us and we can raise it, or it resets next period.

All six APIs are also sold together: $19, $49 or $129 a month for the Starter, Pro or Scale quotas of every category. See the bundle on the pricing page

Offline, between releases. How the model gets retrained.

  1. 01Collect reviewed outputs for each task
  2. 02Supervised fine-tune of the instruction model
  3. 03Preference tuning on outputs that reviewers rejected
  4. 04Register the new weights in the model registry
  5. 05Weekly benchmark per task against external test sets

Then back to step 1, with the new reviews

Before you apply. How to check the output, and what it costs.

Will translate keep our product names?

Pass up to 200 glossary entries, each a from and a to term, and they are translated exactly as given. Names and numbers also go through the entity guard before the response is built.

Can I see why grammar changed something?

Each edit returns offset, length, the original text, the replacement and a reason: spelling, grammar, punctuation, capitalization, spacing, repeated_word or article. Mode minimal fixes only spacing, capitalization and repeated words.

How do I check a summary against the source?

Every statement in coverage carries a source_span with start and end offsets. They count UTF-16 code units, the same as JavaScript string indices, so you can slice the input directly.

What counts as a word?

Whitespace-separated tokens of the text you send. Output is not counted: you pay for the words you send, however long the result is.

What happens when my words run out?

The API answers 403 quota_exceeded with the meter and the words left, and the request is not charged. The three endpoints share one meter. Write to us and we can raise the quota, or it resets next period.

Where does my text go?

In production, requests run only on our own model on our own servers, so your text is not sent to a third-party model API.

Apply to use the text tools

Send an application and we review it within 72 hours. Approved accounts get credentials and a small trial, and we send invoices by hand.

Apply for access