
# LLM tasks

Run a structured language task — answer, classify, extract, summarize, translate, rewrite, proofread, and more — from a single API call. You pick a task and a tier; the router picks the model and meters the spend. Pricing is **cost-plus**: you pay the actual provider cost plus a 6% markup, itemized on every receipt — no token-math homework, no marked-up-by-3x reseller surprise.

```bash
curl -X POST https://api.relaystation.ai/v1/llm/summarize \
  -H 'Authorization: Bearer rs_live_<key>' \
  -H 'Idempotency-Key: summ-report-20260611' \
  -H 'Content-Type: application/json' \
  -d '{ "input": "<text to summarize>", "tier": "value" }'
```

Or on the lodestone path — no account, a signed x402 payment instead of an API key:

```bash
curl -X POST https://api.relaystation.ai/v1/llm/summarize \
  -H 'X-Payment: <base64 EIP-3009 authorization>' \
  -H 'Idempotency-Key: summ-report-20260611' \
  -H 'Content-Type: application/json' \
  -d '{ "input": "<text to summarize>", "tier": "value" }'
```

## The tasks

The registry is live — tasks are admin-managed rows, so this list grows without a deploy. Query the live catalog any time: `GET /v1/llm/tasks` is free, read-only, no auth, and lists each task's params, output cap, and tier ceilings. (On the website this table refreshes from the live catalog; the eleven below are the launch set.)

| Task | What it does | Route |
|---|---|---|
| Answer a question | Answer from provided context | `POST /v1/llm/answer` |
| Classify text | Assign one label from a set | `POST /v1/llm/classify` |
| Extract structured data | Pull requested fields out as JSON | `POST /v1/llm/extract` |
| Repair JSON | Fix malformed JSON | `POST /v1/llm/json_repair` |
| Extract keywords | Pull key terms as a list | `POST /v1/llm/keywords` |
| Proofread text | Fix spelling, grammar, punctuation | `POST /v1/llm/proofread` |
| Rewrite text | Rewrite in a given style | `POST /v1/llm/rewrite` |
| Sentiment analysis | Positive / negative / neutral | `POST /v1/llm/sentiment` |
| Summarize text | Condense text to its key points | `POST /v1/llm/summarize` |
| Generate a title | Write a single concise title | `POST /v1/llm/title` |
| Translate text | Translate to a target language | `POST /v1/llm/translate` |

## Tiers and ceilings

Each task offers three tiers — **budget**, **value**, **best** — trading cost for capability. You authorize a published per-increment ceiling (the most the call can cost); you pay the real metered amount, which is almost always less. Ceilings apply per 20 KB of input (input is capped at 100 KB):

| Tier | Ceiling (per 20 KB increment) |
|---|---|
| budget | $0.010 |
| value | $0.050 |
| best | $0.250 |

## Receipt anatomy — what cost-plus means

The charge is `ceil(provider usage cost × 1.06)`. The response's `usage` object itemizes the provider's reported cost and the 6% markup separately, so the math is auditable line by line. On the x402 path the published ceiling is what you sign; the settled amount is the actual cost-plus figure, never more than the ceiling. If the call fails before producing output, the hold is released — you pay for delivered tokens, nothing else. The field-by-field receipt anatomy (and how ceiling-vs-charged works across payment modes) is on the canonical [Receipts and cost-plus](/docs/receipts) page.

## No-deploy expandability

The task list is a **registry**, not hardcoded routes. A new task added to the registry appears in `GET /v1/llm/tasks`, gets its own `POST /v1/llm/<task>` route, and surfaces as an `llm_<task>` MCP tool — with **zero redeploy**. This page renders the eleven tasks live today; the front-page catalog refreshes the list client-side, so a registry addition shows up without a site rebuild.

## MCP tools

Every task is callable over MCP at `https://api.relaystation.ai/mcp` as `llm_<task>` — `llm_answer`, `llm_classify`, `llm_extract`, `llm_json_repair`, `llm_keywords`, `llm_proofread`, `llm_rewrite`, `llm_sentiment`, `llm_summarize`, `llm_title`, `llm_translate`. Same auth, same cost-plus pricing as the HTTP routes.

## Next

[Quickstart](/docs/quickstart) · [Authentication](/docs/authentication) · [x402 wire format](/docs/x402) · [API reference](/api-reference)
