poem
The site's /poem-generator. A model writes, our own analysis checks metre, rhyme scheme and line count, and a repair pass fixes what it finds — in ru when `metre` and `feet` are set; in other languages or with the metre left open the poem is written in one pass. Fixed forms (sonnets, haiku, limerick, …) bring their own canon of lines, metre and rhyme. Priced exactly like the page — by the length of a verified poem, flat otherwise; POST …/estimate gives the figure. ASYNCHRONOUS: returns 202 with a run id — poll GET /v1/runs/{id} or register a webhook.
v1 beta server · 790 tokens
Price (server): a poem whose metre we verify (ru, `metre` and `feet` set, `strict` not false): 1160 tokens + 80 per line (the form's canon), at least 1480; otherwise 790 tokens per poem; paid plans: −5%, rounded up. The exact figure for your file: POST /v1/tools/poem/estimate.
Call it
POST https://tembrica.com/v1/tools/poem/runs
Authorization: Bearer $TIMBRICA_KEY
Idempotency-Key: <your retry-safe key>
Content-Type: application/json
Input
| Field | Type | Required | Notes |
|---|---|---|---|
lang | string | yes |
Language of the poem.
one of: ru, en, ko, ar, id, pt, de, es, fr, uk, tr |
theme | string | no |
What the poem is about.
max length: 400 |
occasion | string | no |
The occasion (birthday, wedding, anniversary …).
max length: 64 |
recipient_name | string | no |
Whom the poem addresses, by name.
max length: 60 |
recipient_role | string | no |
Who they are to the sender (mother, colleague …).
max length: 40 |
from_name | string | no |
Who the poem is from.
max length: 60 |
facts | string | no |
Facts to weave in.
max length: 600 |
must_words | array | no | Words the poem must contain. |
avoid_words | array | no | Words the poem must not contain. |
form | string | no |
The form. A fixed form overrides lines, metre, feet and rhyme with its canon.
one of: free, quatrain, octave, sonnet_sh, sonnet_pt, onegin, haiku, tanka, limerick, rubai, acrostic, chastushka, ballad, elegy, ode, epigram, verlibre, blank, prose_poem, triolet, rondel, pantoum default: free |
metre | string | no |
Metre. Omitted — left to the model (and the poem is not verified).
one of: iamb, trochee, dactyl, amphibrach, anapest |
feet | integer | no | Feet per line, with `metre`. |
rhyme | string | no |
Rhyme scheme; `none` — blank verse.
one of: ABAB, AABB, ABBA, ABCB, AAAA, none, AABBA, AABA, ABAAABAB default: ABAB |
lines | integer | no |
Number of lines (0 — up to the model). Sets the price of a verified poem.
default: 8 |
acrostic | string | no |
Letters the lines start with, one per line.
max length: 24 |
refrain | string | no |
A line to repeat.
max length: 120 |
tone | string | no |
Tone: one of the examples or your own words.
max length: 60 |
style | string | no |
Manner: one of the examples or your own words.
max length: 60 |
extra | string | no |
Any other instructions.
max length: 1200 |
strict | boolean | no |
Hold the metre strictly (check and repair). false — one pass, the flat price.
default: 1 |
Errors it can return
validation_failed
insufficient_tokens
concurrency_limited
upstream_unavailable
History
- v1 — 2026-11-20 — Initial release (server lane, async, the site's price per order).
This contract cannot change without a new version and a line above: a test compares the published schema, pricing and limits against a committed lockfile and fails the build otherwise. Subscribe to /v1/changelog to be told when something moves.