Pular para o conteúdo principal

Pricing

All prices are per million tokens processed. Billing considers both input and output tokens.

Models​

S5S5 Nano
InputR$ 0.50R$ 0.10
OutputR$ 2.50R$ 0.60
Cached input ¹R$ 0.05R$ 0.01
Off-peak input ²R$ 0.35R$ 0.07
Off-peak output ²R$ 1.75R$ 0.42
Flex input ³R$ 0.25R$ 0.05
Flex output ³R$ 1.25R$ 0.30
Batch API inputR$ 0.25R$ 0.05
Batch API outputR$ 1.25R$ 0.30

Previous-generation models​

Sabiá 4 ThinkingSabiá 4Sabiazinho 4
InputR$ 5.00R$ 5.00R$ 1.00
OutputR$ 40.00R$ 20.00R$ 4.00
Cached input ¹R$ 1.25R$ 1.25R$ 0.25
Off-peak input ²R$ 3.50R$ 3.50R$ 0.70
Off-peak output ²R$ 28.00R$ 14.00R$ 2.80
Flex input ³R$ 2.50R$ 2.50R$ 0.50
Flex output ³R$ 20.00R$ 10.00R$ 2.00
Batch API inputR$ 2.50R$ 2.50R$ 0.50
Batch API outputR$ 20.00R$ 10.00R$ 2.00
¹ Reused input tokens are charged at a 75% discount (1/4 of the price); on S5 models (including S5 Nano), at a 90% discount (1/10 of the price). Learn more at Prompt Caching. ² Off-peak: 10 p.m.–6 a.m. BRT. ³ Flex requests offer a 50% discount, subject to capacity availability. Learn more at Flex Tier.
How discounts interact

The cache discount (75%) applies only to cached input tokens. Batch API, Flex, and off-peak discounts apply only to non-cached input tokens and output tokens — they do not multiply with the cache discount. Additionally, Batch API, Flex, and off-peak are mutually exclusive. See more details at Prompt Caching.

BR-SP models​

BR-SP models perform inference and processing entirely (100%) within Brazilian territory, priced 30% above the corresponding model. API model names: S5-br-sp, sabia-4-thinking-br-sp, sabia-4-br-sp, sabiazinho-4-br-sp.

S5 BR-SP
InputR$ 0.65
OutputR$ 3.25
Cached input ¹R$ 0.065
Off-peak input ²R$ 0.455
Off-peak output ²R$ 2.275
Flex input ³R$ 0.325
Flex output ³R$ 1.625
Batch API inputR$ 0.325
Batch API outputR$ 1.625

Previous-generation models​

Sabiá 4 Thinking BR-SPSabiá 4 BR-SPSabiazinho 4 BR-SP
InputR$ 6.50R$ 6.50R$ 1.30
OutputR$ 52.00R$ 26.00R$ 5.20
Cached input ¹R$ 1.63R$ 1.63R$ 0.33
Off-peak input ²R$ 4.55R$ 4.55R$ 0.91
Off-peak output ²R$ 36.40R$ 18.20R$ 3.64
Flex input ³R$ 3.25R$ 3.25R$ 0.65
Flex output ³R$ 26.00R$ 13.00R$ 2.60
Batch API inputR$ 3.25R$ 3.25R$ 0.65
Batch API outputR$ 26.00R$ 13.00R$ 2.60

S5 Free​

S5-free is free of charge for a limited time: tokens are not billed. Text only; Batch API, Flex and built-in tools are not included. See the limits in Rate Limits.

Available for a limited time

S5 Free is a temporary launch offer and may be discontinued at any time. For ongoing or production use, use S5.

Built-in tools​

Built-in tool executions (web search, code execution, Data Ocean, and image generation) are billed per use, in addition to the usual token costs. Charges are reported in usage.tool_execution_details and on your invoice.

ToolUnitPrice (BRL)
Web searchper searchR$ 0.0165
Page readper page readR$ 0.066
Data Oceanper GB scannedR$ 0.10
Code executionper minute (rounded up)R$ 0.016
Image generationper generated imageR$ 0.25
Image generation: reference imageper input image used in the generationR$ 0.10

A single web_search request can incur both web_search_calls and page_reads charges: the model searches, then reads one or more result pages. Code execution time is the total sandbox compute time across the request, rounded up to the next whole minute.

Because data_ocean automatically turns on web search and code execution (see Built-in tools), a request with data_ocean: true can incur charges for Data Ocean, web search (web_search_calls/page_reads), and code execution in the same response.

For image generation, only delivered images are billed: attempts blocked by moderation or that fail are free.

How do I know how many tokens I will be charged?​

To know in advance how much your requests will cost, use the count_tokens function to find out the number of tokens in a given prompt.

from maritalk import count_tokens

prompt = "How many sticks does it take to make a canoe?"

total_tokens = count_tokens(prompt, model="sabia-4")

print(f'The prompt "{prompt}" contains {total_tokens} tokens.')

You need to install the maritalk library (pip install maritalk) to run the code snippet above.