Introducing S5, the next generation of Sabiá
Adjustable reasoning, a 1 million token context window, and tools for research, coding, and data analysis, available in chat and through the API.
We’re launching S5, the next generation of the Sabiá family and our model with the strongest agentic capabilities: it reasons before answering, with an effort you can adjust, plans multi-step tasks, and uses tools with more autonomy, whether inside a coding agent or in the chat. It is also the model that handles larger contexts best, with up to 1 million tokens: books, case files, and entire collections of documents in the same conversation.
S5 is available now in Maritaca chat and through the API, at R$0.50 per million input tokens and R$2.50 per million output tokens, the lowest price in the family.
The examples below come from conversations in Portuguese. We’ve translated the prompts and responses into English; the interactive demos show the original interfaces.
Reasoning through complex questions
Not every question calls for the same kind of answer: some can be settled right away, while others involve several calculations, conditions, and decisions that build on each other. For those, S5 works through a reasoning step before answering, with an effort you can adjust to the complexity of the task.
Estimating a severance payment under Brazilian employment law, for example, depends on length of service, vacation that was never taken, and the projection of the notice period, with rules that change from case to case. In the conversation below, S5 organizes that information, states the assumptions it made, and lays out the amounts item by item, so the person can follow and check the calculation.
I’ll make an estimate based on what you’ve told me. I’ll assume a start date of April 2, 2023, dismissal on November 2, 2026, payment in lieu of notice, and only the most recent vacation period unused.
| Item | Approximate amount |
|---|---|
| Outstanding wages (2 days) | R$280.00 |
| Payment in lieu of notice | R$5,460.00 |
| Prorated 13th-month salary | R$3,850.00 |
| Accrued vacation + one-third bonus | R$5,600.00 |
| Prorated vacation + one-third bonus | R$3,733.33 |
| Gross total | R$18,923.33 |
Excerpts from S5’s response. The full answer explains each calculation, the FGTS severance fund, and deductions.
Read long documents with a million tokens of context
Working with a long document often means returning to earlier passages, connecting information, and keeping the original question in view. S5’s context window lets you bring that material into the conversation and ask questions about it as a whole.
We sent the complete text of Machado de Assis’s Dom Casmurro and asked about one of its best-known passages: Capitu’s “undertow eyes.” S5 found the expression, identified who first used it, and retrieved a reference from another chapter that the narrator, Bentinho, had almost chosen instead. The answer includes passages from the book to follow along.
Chapter XXXII, “Olhos de ressaca” (“Undertow Eyes”). The narrator himself, Bentinho, is the first to use the expression:
“Undertow eyes? Yes, undertow. That is what gives me an idea of that new expression.”
He says he almost wrote “Thetis” instead, in Chapter XXXIII, “O penteado” (“The Hairdo”):
“Just now, speaking of her undertow eyes, I went so far as to write Thetis; I crossed out Thetis, let us cross out nymph.”
S5’s response using the complete book. The passages from the Portuguese Project Gutenberg edition have been translated for this post.
The same applies to entire collections of documents. We gathered 544 news articles on Brazil’s tax reform and other tax matters, published by the Senate news agency, the Ministry of Finance, the Federal Revenue Service, and Agência Brasil between January 2025 and November 2026, about 590 thousand tokens, and sent all of them in a single request asking for a presentation for a company’s board. S5 went through the material, picked out what mattered, and returned a 12-slide file: what has been decided, the transition calendar, the rates, the special regimes, what is still under discussion in Congress, and what the company needs to do in 2026 and 2027, with the source and date of the articles used on each slide. We checked the figures against the original texts. Browse the slides or download the file; the presentation is in Portuguese.
Request made through the API with the 544 text files in a single call (589,945 input tokens). S5 returned the code that generates the .pptx file; we ran it without changes and rendered the slides above.
Build games and simulations for the browser
S5 can also help build interactive experiences from a description: you define the idea, the rules, and the look, and the model writes the code that brings the project to life.
In the game below, the challenge is to protect a coffee farm in Minas Gerais from successive waves of pests, with three tower types, upgrades to buy, and a final boss; the scenery, animations, and sound effects are all part of the same file, which runs directly in the browser. Give it a try.
See the full prompt
The same capability lets you explore ideas visually, as in the solar system simulation below, where the controls let you navigate through space and follow the planets as they move.
A solar system to explore in 3D
Navigate between planets, watch their orbits, and control the passage of time; select a planet to read about it and follow it with the camera.
See the full prompt
Create an image, then keep the conversation going
In chat, you can request an image and refine it as your needs change. For a small bakery, we started with a photo of a carrot cake topped with brigadeiro chocolate frosting for a menu and then asked for the same image on a white background for a delivery app’s catalog.
Because the second request builds on the first image, you can try a composition and keep adjusting it through the conversation; drag the divider to compare the two versions.
In coding agents
S5 also works with coding agents that let you configure a compatible API. Using Aider, we asked for a program to read bank statements, categorize transactions, and produce a monthly summary, along with sample data and tests.
Model: openai/S5 with diff edit formatsrc/extrato/cli.pysrc/extrato/categorizacao.pysrc/extrato/resumo.pypython -m pytest -q55 passed in 0.16sextrato dados/extrato_exemplo.csvResumo mensal — junho/2025--------------------------salario R$ 5.200,00 50,6%moradia R$ 2.587,32 25,2%mercado R$ 904,09 8,8%saude R$ 802,60 7,8%transporte R$ 308,80 3,0%lazer R$ 297,70 2,9%outros R$ 170,00 1,7%--------------------------Total R$ 10.270,51 100,0%
The project includes a sample CSV with 30 transactions and 55 passing tests. The terminal shows excerpts from the session and the program running on that sample, with its original Portuguese output.
In OpenClaw, an open-source general-purpose agent that runs commands on its own, we gave it the same task. S5 created the eight files one by one, ran the tests, fixed what failed (a rule that confused “gás” with “gasolina”, plus the delimiter and date formats in the CSV reader), ran them again until all 43 passed, and still adjusted the output alignment before finishing, in three minutes. The agent’s messages have been translated; the program output is the original.
openclaw agent --local --agent main --message "Cria, dentro da pasta extrato/, um projeto Python chamado extrato: um CLI que lê um extrato bancário em CSV…"I'll build the project step by step. Starting with the packaging structure:extrato/pyproject.tomlextrato/extrato/categorizador.pyextrato/extrato/parser.pyextrato/extrato/resumo.pyextrato/extrato/__init__.pyextrato/extrato/cli.pyextrato/exemplos/exemplo_extrato.csvextrato/tests/test_extrato.pyNow I'll run the tests and the sample CLI:python -m pytest -q3 failed, 39 passed in 0.06sThree fixes: `\bg[áa]s\b` so it no longer matches "gasolina", add "safári" to leisure, and automatic delimiter detection in the parser (Brazilian CSVs with `;` and a decimal comma):~ extrato/extrato/categorizador.py~ extrato/extrato/parser.py~ extrato/tests/test_extrato.pypython -m pytest -q2 failed, 41 passed in 0.04sTwo problems: (1) `g[áa]s` matches the "Gas" in "Gasolina"; (2) the parser doesn't accept dates in `YYYY/MM/DD` format. Fixing both:~ extrato/extrato/categorizador.py~ extrato/extrato/parser.pypython -m pytest -q43 passed in 0.04spython -m extrato.cli exemplos/exemplo_extrato.csv RESUMO MENSAL — 2026-10 Categoria Total % Qtd salário 5,800.00 51.9% 1 moradia -2,552.50 22.8% 6 lazer -960.70 8.6% 8 mercado -706.80 6.3% 5 transporte -645.40 5.8% 7 saúde -507.10 4.5% 4 SALDO: 427.50Done! Project created in `extrato/` and everything is running.
Both terminals show excerpts from the sessions; the files, commands, and test results are the ones the agents produced.
Try S5
S5 is available now at chat.maritaca.ai. Start a conversation, upload a document, or bring an idea for a project. The Premium and Pro plans, at R$30 and R$60 per month on the annual plan, raise the limits for messages, deep research, and image generation.
For developers, the model is available through the API as S5, at R$0.50 per million input tokens and R$2.50 per million output tokens. Reasoning tokens are billed at the output rate. The S5-br-sp variant provides inference in Brazil.
See the API documentation to integrate S5 into your application and explore the available tools.










