Skip to content
This site is under construction. Check back over the course of Q4 2026 as I update it.

Tanka generator

Type a subject and a free AI model writes a tanka (短歌) about it: five lines of Japanese in a 5-7-5-7-7 mora pattern, with a hiragana reading and an English translation. The page then counts the mora itself and shows where the model missed.

The output won’t always be good. That’s partly the point, and the rest of this page explains why.

Written by free open models via OpenRouter. Model providers may use prompts for training, so please don't enter personal information.

In September 2026, I took part in the TechNative software development bootcamp. During week 6 of the course, the instructors asked us to get an API key and make a “real” call to an LLM.

I was aware that a lot of LLM providers host models for free on OpenRouter as part of their training, data collection, marketing, and testing. So I figured I could build an interesting tool that’s a bit more persistent by routing it through those models.

As for why I chose tanka, I studied Japanese and did a module in poetry while studying at Waseda in Tokyo. The teacher often didn’t understand the intent behind my poems (perhaps I’m too skeptical, odd, or just misunderstood). Chances are she would understand the tanka this tool generates even less.

The main reason for choosing free models was simply because I didn’t want to spend money. However, the constraints posed by free models make the output of this tool more interesting to observe.

As general-use LLMs and coding assistants get better, it’s become easy to forget what LLMs were like and how they work.

The free models I’ve used for this tool often fail to create a valid tanka (5-7-5-7-7). Nevertheless, they do successfully create some quite good poems with accurate translations. I thought it would be interesting to try and see why.

The tool on this page never talks to an LLM on OpenRouter directly. Instead, the prompt you provide is sent via a Cloudflare Worker, which has access to my OpenRouter API key. Due to my settings on OpenRouter, the Worker calls on a subset of free models on OpenRouter.

The router passes each request to whichever free model is available at that moment, so consecutive poems may come from different models. I’ve chosen to surface the model under the tool so you can check it if you’re interested.

The Worker asks for JSON in a fixed shape (five lines, each with Japanese text and a kana reading, plus a five-line translation) and rejects anything that doesn’t match before it reaches this page. Your text is passed to the model as the subject of the poem only, with instructions to ignore any requests it contains.

When the allocated model replies with a tank

Running on free models, a request can fail in several ways before a poem appears:

  • The free pool is rate-limited. Free capacity is shared by everyone on OpenRouter, so the first-choice model is often unavailable and the request falls back to another.
  • The model thinks until it runs out of tokens. Every free model can reason before answering, and reasoning counts towards the token limit. In testing, one spent almost two minutes and its whole 4,000-token budget thinking, and never wrote a line. Thinking is now switched off for the models that allow it.
  • The model is too slow. After two minutes, the request is stopped.
  • The output is the wrong shape. Invalid JSON, four lines instead of five, or a missing reading are all rejected before they reach the page.
  • The daily quota runs out. The whole site gets 50 free requests a day and 20 a minute, shared by every visitor.
  • You hit this site’s own limit. Each visitor gets 5 poems per 10 minutes, to make the shared quota last.
  • The poem misses the pattern. This isn’t an error, so the poem is still shown, with the mora badges marking the miss.