EN ▾

polskillm.comUncensored LLM API for developers

Get your key

Polish Language LLM: Prompting and Testing via API

Glowing speech bubbles with accent marks linked to a checklist panel, for testing Polish language output

A Polish language LLM needs the same care as any model plus a few Polish-specific checks: encoding, grammatical case, register and token length. This guide gives you working requests and a way to test the output.

Last updated

Summary

  • Send UTF-8, keep the system prompt explicit about language and register, and set a lower temperature for accuracy.
  • Check case endings, gender agreement and Pan/Pani forms; these are where fluent-sounding Polish breaks.
  • Use JSON mode and seed for repeatable tests; stream when users watch the text arrive.
  • Polish often uses more tokens per word than English, so measure usage on real text before you budget.

Send your first Polish request

A Polish language LLM behind an OpenAI-compatible API looks like any other chat endpoint. The base URL is https://api.polskillm.com/v1, the model ID is uncensored, and the key goes in the Authorization header. Get a key on the API key page.

curl https://api.polskillm.com/v1/chat/completions \
  -H "Authorization: Bearer $POLSKILLM_API_KEY" \
  -H "Content-Type: application/json; charset=utf-8" \
  -d '{
    "model": "uncensored",
    "messages": [
      {"role": "system", "content": "Odpowiadasz wyłącznie po polsku, poprawną polszczyzną."},
      {"role": "user", "content": "Napisz dwa zdania o jesieni w Krakowie."}
    ],
    "temperature": 0.5
  }'

Two habits save trouble from the start. Always send the body as UTF-8, because Polish diacritics (ą, ę, ł, ń, ó, ś, ź, ż) turn into garbage in a Latin-1 pipeline. And always say in the system prompt which language to answer in. Models follow the language of the last message most of the time, but not always.

Prompt patterns that help Polish output

Good Polish output depends less on clever tricks than on being specific. These patterns pay off consistently.

State language, audience and register

Write the rule once in the system message: "Pisz po polsku, zwracaj się do użytkownika per Pan/Pani, ton uprzejmy i rzeczowy." If you want a casual voice, say "na ty". Without this, a model may switch between forms inside one answer.

Give a short example

One example of the style you want beats a paragraph of description. Put it in the prompt as a labelled sample and tell the model to match tone, not content.

Keep names and terms fixed

Polish inflects names and nouns. If a product name must stay unchanged, say so: "Nazwy produktów zostawiaj bez odmiany." Give a glossary for domain terms you want written one way.

Ask for the format you need

Say "maksymalnie 80 słów", "trzy punkty" or "tabela z dwiema kolumnami". Length limits in words are only approximate, so check the result in code if the limit is strict.

Lower the temperature for facts

A temperature around 0.2 to 0.4 suits summaries and answers. Raise it toward 0.8 for fiction. The temperature, top_p, stop, seed and penalty parameters are passed through.

Test Polish quality with a script

Reading a few answers by eye is not enough. Build a small file of test cases, each with a prompt and a rule you can check in code, then run it after every prompt change.

import os, json, re
from openai import OpenAI

client = OpenAI(base_url="https://api.polskillm.com/v1", api_key=os.environ["POLSKILLM_API_KEY"])

SYSTEM = "Odpowiadasz po polsku. Zwracaj się do użytkownika per Pan/Pani."

CASES = [
    {"prompt": "Napisz krótkie powitanie klienta sklepu.",
     "must": r"\b(Pan|Pani|Państwo)\b"},
    {"prompt": "Podaj trzy nazwy miesięcy zimowych, po przecinku.",
     "must": r"grudzień|styczeń|luty"},
    {"prompt": "Zapisz liczbę 5 i słowo 'kot' w poprawnej formie: pięć ...",
     "must": r"pięć kotów"},
]

ok = 0
for c in CASES:
    r = client.chat.completions.create(
        model="uncensored",
        messages=[{"role": "system", "content": SYSTEM},
                  {"role": "user", "content": c["prompt"]}],
        temperature=0.2,
        seed=7,
    )
    text = r.choices[0].message.content
    passed = re.search(c["must"], text, re.IGNORECASE) is not None
    ok += passed
    print("PASS" if passed else "FAIL", "|", c["prompt"])
print(ok, "of", len(CASES))

Regular expressions can only catch the checkable errors, such as a missing form of address or a wrong plural. Keep a second tier of manual review by a native speaker for tone and style. Using the same seed and a low temperature makes results more repeatable between runs.

Typical Polish errors and how to fix them

  • Wrong case after numerals. "pięć kot" instead of "pięć kotów". Add a correction example to the prompt, or ask the model to proofread its own answer in a second call.
  • Mixed register. Pan/Pani in one sentence, ty in the next. Fix it in the system prompt and add a check in code.
  • English words leaking in. Say "nie używaj angielskich wyrazów, jeśli istnieje polski odpowiednik".
  • Calques from English. Phrases that are grammatical but unnatural. A second pass with the instruction "przeredaguj, żeby brzmiało naturalnie" often helps.
  • Inflected names broken. Provide the name in nominative and ask the model to inflect it only when needed.

When you find a failure, add it to your test file. The test set then grows into a regression suite that protects every future prompt change.

Structured Polish output and streaming

If your app needs data rather than prose, use JSON mode. Describe the keys in the prompt and set response_format:

r = client.chat.completions.create(
    model="uncensored",
    response_format={"type": "json_object"},
    messages=[
        {"role": "system", "content": "Zwróć obiekt JSON z kluczami: tytul, opis, tagi (lista)."},
        {"role": "user", "content": "Opisz sklep z rowerami w Gdańsku."},
    ],
)
print(r.choices[0].message.content)

Values stay in Polish, keys stay in whatever you specified. Parse the output with json.loads and handle the failure case, because any model can occasionally return something you cannot parse.

For chat interfaces, set stream: true. Responses arrive over SSE, with usage at the end. Remember that a streamed request holds one of your concurrency slots until the stream ends: 8 concurrent for a full key, 2 for a trial key. If you hit HTTP 429, check whether the error code is rate_limited or concurrency and back off. The docs cover the details.

A checklist before you ship

Before you ship Polish output to real users, run through this list.

  1. Send and store every string as UTF-8, including logs and database columns.
  2. Fix language and register in the system prompt, and repeat the rule if you trim the history.
  3. Use a low temperature for factual or customer-facing text, and a higher one for fiction.
  4. Keep a test file of at least 20 cases with checks you can run in code, and extend it after every failure you see.
  5. Have a native speaker review a sample of 50 real outputs, because regular expressions miss tone problems.
  6. Log the usage block for every call, so you know the real token cost of Polish text.
  7. Retry HTTP 429 responses with a pause, and read the error code to see whether you hit the request rate or the concurrency limit.

Long Polish documents

If a document is too long for one request, split it at paragraph boundaries, never in the middle of a sentence. Cutting inside a sentence leaves a fragment whose case endings depend on words the model cannot see, and the summary of that fragment often comes out wrong. Summarize each chunk with the same system prompt, then send the chunk summaries in a final call to merge them. Keep the glossary of names and terms in every call so spelling stays the same from chunk to chunk.

For creative text such as fiction or roleplay for lawful adults, keep a short character sheet in the system prompt: name, how the character addresses others (Pan, Pani or ty) and the tone. Polish forms of address change verb endings, so a missing rule is the most common reason a character sounds inconsistent. Sexual content involving minors is never allowed.

Plan the cost of Polish text

Polish words are longer on average and carry more inflection, so a Polish text usually takes more tokens than an English text of the same meaning. The exact ratio depends on the tokenizer, so do not guess. Run a sample of real content, read the usage field in the response, and scale up.

Example: a product description pipeline sends 600 input tokens and receives 350 output tokens per item. For 10,000 items, that is 6M input and 3.5M output tokens. Input costs 6 x $0.15 = $0.90 and output costs 3.5 x $0.50 = $1.75, so the total is $2.65. The context window is 100,000 tokens for prompt and reply together, which is ample for long documents. See the pricing page for top-ups and bonuses.

For a comparison of candidate models for Polish, read our article on the best Polish LLM.

FAQs on Unrestricted Chatbots

What is the best uncensored AI model? The "uncensored" model on PolSkill M is an open-weight model tuned for unrestricted output. It does not use standard content filters, making it ideal for adult and creative content.

Is the PolSkill M API free? No, it is a pay-per-token service. You can start with $0.50 of trial credit for new accounts, valid for 7 days. After that, you pay based on usage.

How do I pay? Payments are made via crypto, specifically USDT on TRC20 or USDC on Base. You can top up with amounts between $20 and $500.

Does the API support streaming? Yes, streaming via SSE is supported. You can receive responses in real-time, improving the user experience for chat applications.

Common questions

Does the API handle Polish diacritics?

Yes, as long as you send and read UTF-8. Problems with ą, ę or ł almost always come from the client or terminal encoding.

Should I write prompts in Polish or English?

Either works. Instructions in Polish tend to anchor the register, but test both on your own examples and keep what scores better.

How can I make results repeatable?

Use a low temperature and set seed. Results are more stable, though not guaranteed to be identical in every case.

How much does a Polish test run cost?

Very little. 6,000 input and 8,000 output tokens cost about half a cent at $0.15 and $0.50 per 1M. The $0.50 trial credit covers many runs.

Get your API key now

Register, copy the token, and update your endpoint. Done.