Published on
How much does it cost to use an AI API paying in reais, by PIX?
At Zenifra, 1 million tokens costs from R$ 0.60 (input) and R$ 2.00 (output) on zenifra/qwen3.8-flash up to R$ 14.70 and R$ 73.49 on zenifra/kimi-k3, with prices published in reais and paid from credit added by PIX or boleto. A chatbot with 2,000 conversations a month, using the math in this article, comes to R$ 20.652 on the cheapest model in the catalog.
Short answer: what 1 million tokens costs in reais
Zenifra’s AI API is OpenAI-compatible and charges per million tokens in Brazilian reais: the cheapest text model, zenifra/qwen3.8-flash, costs R$ 0.60 per million input tokens and R$ 2.00 per million output tokens. Payment comes out of the organization’s credit, which you top up by PIX (from R$ 5) or boleto (from R$ 30), with no international card and no IOF.
The table below comes from Zenifra’s public catalog (GET https://api.zenifra.com/v1/ai/models, read on November 6, 2026). Values are in reais per 1 million tokens. Input is what you send to the model (system prompt, history, and question), output is what the model generates, and cached input is the price of input tokens reused from the cache, when the model reports that field. Some models change price by input size or time of day; those rules are in parentheses.
Prices with the per_million_tokens unit are charged in proportion to actual usage. If a request uses 3,000 input tokens and 500 output tokens on zenifra/qwen3.8-flash, the cost is 3,000 × 0.60 / 1,000,000 plus 500 × 2.00 / 1,000,000, that is R$ 0.0018 plus R$ 0.001, for a total of R$ 0.0028. That is the formula in Zenifra’s AI pricing documentation, and it is the one used in every calculation in this article.
| Model | Context (tokens) | Input (R$/1M) | Output (R$/1M) | Cached input (R$/1M) |
|---|---|---|---|---|
| zenifra/qwen3.8-flash | 1,000,000 | R$ 0.60 | R$ 2.00 | R$ 0.10 |
| zenifra/qwen3.6-flash | 991,808 | R$ 0.85 (above 256,000 input tokens: R$ 3.40) | R$ 5.10 (above 256,000: R$ 20.40) | R$ 0.09 (above 256,000: R$ 0.34) |
| zenifra/qwen3.6-plus | 991,808 | R$ 1.43 (above 256,000: R$ 5.68) | R$ 8.51 (above 256,000: R$ 34.01) | R$ 0.15 (above 256,000: R$ 0.58) |
| zenifra/qwen3.7-plus | 1,000,000 | R$ 1.50 (above 256,000: R$ 4.40) | R$ 5.70 (above 256,000: R$ 17.20) | R$ 0.40 (above 256,000: R$ 0.90) |
| zenifra/deepseek-v4-flash-0731 | 1,000,000 | R$ 2.20 (off-peak: R$ 1.10) | R$ 6.60 (off-peak: R$ 3.30) | R$ 0.29 (off-peak: R$ 0.14) |
| zenifra/kimi-k2.5 | 229,376 | R$ 3.00 | R$ 15.70 | R$ 0.60 |
| zenifra/kimi-k2.7-code | 229,376 | R$ 4.70 | R$ 19.40 | R$ 0.35 |
| zenifra/glm-5.2 | 1,048,576 | R$ 5.70 | R$ 20.00 | R$ 1.40 |
| zenifra/glm-5.1 | 202,745 | R$ 5.95 (above 32,000: R$ 7.94) | R$ 23.81 (above 32,000: R$ 27.77) | R$ 1.19 (above 32,000: R$ 1.59) |
| zenifra/deepseek-v4-pro | 1,000,000 | R$ 8.50 (off-peak: R$ 4.30) | R$ 17.00 (off-peak: R$ 8.50) | R$ 0.70 (off-peak: R$ 0.35) |
| zenifra/qwen3.7-max | 1,000,000 | R$ 8.50 | R$ 25.50 | R$ 1.70 |
| zenifra/qwen3.8-max | 1,000,000 | R$ 8.50 | R$ 25.60 | R$ 1.10 |
| zenifra/kimi-k3 | 1,048,576 | R$ 14.70 | R$ 73.49 | R$ 1.50 |
| zenifra/kev-4b (decision model) | 65,536 | R$ 0.2244 | not charged | not applicable |
Off-peak runs from 14:00 to 00:00 UTC, which is 11 a.m. to 9 p.m. Brasília time (UTC−3). Outside that window, standard prices apply. Models, limits, and prices can change; the documentation itself recommends checking the catalog or the Console before shipping an integration and not hardcoding prices.
What an OpenAI-compatible API is and why it matters
An OpenAI-compatible API accepts the same routes, request format, and response format that the official OpenAI SDK uses, such as POST /v1/chat/completions with a list of messages and a model field. In practice, code you already wrote with the openai package in Python or Node.js keeps working: only the base address, the key, and the model name change. At Zenifra those three are base_url https://ai.zenifra.com/v1, the key created in the Console, and a catalog ID in the form zenifra/<model>.
This matters for two reasons. The first is switching cost: you do not rewrite the integration, swap libraries, or build your own adapter to try another provider. Frameworks that let you set base_url and api_key, like most chat clients, agents, and RAG tools, connect to Zenifra the same way. The second is honest comparison: with the same code, you can run the same set of prompts against two models and compare quality and cost side by side, using the usage field returned with every response.
The catalog lists the supported operations for each model. Models that list their operations accept /v1/chat/completions; zenifra/qwen3.8-flash and zenifra/qwen3.8-max also accept /v1/responses. The catalog also lists capabilities such as streaming, tool calling (tools and tool_choice), structured output (response_format), and reasoning_effort on some models, plus image and video input on zenifra/kimi-k2.7-code. Before migrating, check that every parameter your code sends appears in the chosen model’s supported_parameters.
There is one exception in the catalog: zenifra/kev-4b is not a chat model. It answers closed questions about a text (choose among options, yes or no, a score on a scale) with probabilities, uses the /v1/systemone endpoint, and is charged only for input tokens, R$ 0.2244 per million. It is useful for ticket triage and routing, but it does not generate text.
How Azure OpenAI, AWS Bedrock, Vertex AI, and OpenAI bill customers in Brazil
The big providers follow different rules, and not all of them charge in dollars on a card. We read each one’s official billing pages on November 6, 2026. According to those pages, AWS and Google Cloud invoice customers in Brazil in reais, but prices are still set in dollars and converted on the invoice; Azure also prices in dollars and converts to the payment currency; OpenAI sells API credits only in dollars.
The practical difference comes down to two things. First, when the base price is in dollars, the amount in reais on your invoice changes every month with the exchange rate, even if your usage stays the same. Second, the payment method: an international card purchase carries 3.5% IOF; local invoicing in reais does not carry that IOF, but it can include local taxes itemized on the invoice, as AWS states on its own page.
For comparison, at Zenifra the price per million tokens is already published in reais in the catalog, AI usage is prepaid from the organization’s credit, and that credit is added by PIX or boleto. There is no currency conversion on the bill. Zenifra can change its prices, like any catalog, but they do not move with the dollar within the month.
| Provider | Price currency | Payment currency and method in Brazil (official page) | Exchange rate |
|---|---|---|---|
| OpenAI (API) | US$ | API credit purchases are limited to USD; the Pix option OpenAI lists applies to ChatGPT Go, Plus, and Pro subscriptions, not the API | Paid in dollars by card; 3.5% IOF on international cards |
| Azure (includes Azure OpenAI) | US$ worldwide | The Microsoft Customer Agreement FAQ lists the Brazilian real (R$) as Brazil’s payment currency; credit card or invoice; prepaid and virtual cards are not accepted | Cost calculated in USD and converted at the London closing spot rate captured at the end of the previous month |
| AWS (includes Amazon Bedrock) | US$ | Billed by Amazon AWS Serviços Brasil Ltda. in reais with an NFS-e; cards including Elo; PIX only for BRL invoices when the card payment fails; AWS Marketplace stays in USD through AWS, Inc. | Rate set on the day the invoice is generated; PIS/COFINS 9.25% and ISS 2.9% or 5% on the NFS-e |
| Google Cloud (includes Vertex AI) | US$ converted | Brazil billed in BRL; credit card, Elo credit, boleto as a backup method (up to 3 payments a day), and Pix for manual payments in reais | Rates from leading financial institutions, set at the beginning of each month |
| Zenifra (AI API) | R$ | Prepaid organization credit by PIX (from R$ 5) or boleto (from R$ 30) | No conversion |
If your company already has an account invoiced in Brazil with AWS or Google Cloud, using Bedrock or Vertex AI can be the simplest path for your finance team, and a local tax invoice is a real advantage of those providers. Zenifra makes more sense when you want a per-token price fixed in reais, PIX payments without a card, and one credit balance covering your application, database, and AI.
What a chatbot with 2,000 conversations a month costs
To make this concrete, we built a support scenario: 2,000 conversations a month, each with 6 exchanges between user and assistant. The system prompt has 1,200 tokens, each user message has 60 tokens, and each model reply has 250 tokens. Because the chat API is stateless, every new question resends the system prompt and the full history, so input grows with each exchange. These numbers are estimates to illustrate the math; your real volume shows up in the usage field of each response and in the Console usage panel.
Token math per conversation: on exchange k, input is 1,200 + 60 + 310 × (k − 1), because each earlier exchange adds 60 tokens of question and 250 of answer. Adding up the 6 exchanges gives 6 × 1,260 + 310 × (0 + 1 + 2 + 3 + 4 + 5) = 7,560 + 4,650 = 12,210 input tokens. Output is 6 × 250 = 1,500 tokens. Over the month, 2,000 conversations add up to 24,420,000 input tokens (24.42 million) and 3,000,000 output tokens (3 million).
On zenifra/qwen3.8-flash, the cost is 24.42 × R$ 0.60 = R$ 14.652 for input plus 3 × R$ 2.00 = R$ 6.00 for output, a total of R$ 20.652 for the month. On larger models the bill climbs fast, because output usually costs 3 to 5 times as much as input and the resent history weighs on input.
Two features lower this bill. The first is off-peak pricing: zenifra/deepseek-v4-flash-0731 drops by half between 11 a.m. and 9 p.m. Brasília time, and a customer support chatbot spends much of the business day inside that window. The second is cached input: when the request prefix (system prompt and history) is reused, tokens read from the cache are billed at the cache price, which on qwen3.8-flash is R$ 0.10 instead of R$ 0.60. The catalog lists cache_min_input_tokens of 1,024 on most models, so short prompts do not get cached. If half of the 24.42 million input tokens were read from cache, the qwen3.8-flash total would fall to R$ 14.547.
| Model | Input (24.42 million tokens) | Output (3 million tokens) | Monthly total |
|---|---|---|---|
| zenifra/qwen3.8-flash | R$ 14.652 | R$ 6.00 | R$ 20.652 |
| zenifra/deepseek-v4-flash-0731 (off-peak, 11 a.m. to 9 p.m.) | R$ 26.862 | R$ 9.90 | R$ 36.762 |
| zenifra/deepseek-v4-flash-0731 (standard price) | R$ 53.724 | R$ 19.80 | R$ 73.524 |
| zenifra/kimi-k2.7-code | R$ 114.774 | R$ 58.20 | R$ 172.974 |
| zenifra/glm-5.2 | R$ 139.194 | R$ 60.00 | R$ 199.194 |
Note that the most expensive model in the table costs almost ten times the cheapest one for the same support load. Before choosing by name, run 50 real conversations on two or three models and compare quality and cost. In Zenifra’s calculator, this chatbot scenario is prefilled with 24,420,000 input tokens and 3,000,000 output tokens.
Prepaid credit, per-key quotas, and RPM and TPM limits
AI usage at Zenifra is prepaid and draws on the organization’s shared credit. Without usable credit, new calls are blocked; a saved card does not unlock extra AI usage and pending charges do not expand capacity. That differs from the rest of the platform, where the card acts as a fallback when credit runs out. If you worry about a surprise AI bill, this rule is the main safeguard: your spending ceiling is the balance you added.
Within that balance, each key has its own limits. When you create a key under AI Models, you choose the Allowed Models, the Daily quota (BRL), and the Monthly quota (BRL), plus Key RPM (requests per minute) and Key TPM (tokens per minute), which can be lower than the organization limits but never higher. A key quota never increases the available credit. Each organization can have up to 100 active AI keys, and allowed models accept either the option for all of the organization’s models or 1 to 50 catalog IDs.
In practice, use one key per environment or integration: one for production with a monthly quota that matches the product’s revenue, one for testing with a low daily quota, and one per customer or team when that makes sense. When a key hits its quota or the organization runs out of credit, the API returns 429 with the insufficient_quota code, and retrying does not help. When the issue is speed, the 429 comes with rate_limit_exceeded and a retry-after header; the x-ratelimit-* headers report the key’s limits and remaining requests and tokens.
The Console steps, as documented: open AI Models, click Create API Key, and enter a name (4 to 24 characters, unaccented letters, numbers, and hyphens, such as producao-api-01); select the models; set a daily and monthly quota if you want; copy the key, which is shown only once. Quotas can be changed later under Edit quota. The same operations exist in the API at https://api.zenifra.com/v1, for example PATCH /ai/keys/:id/budget to change quotas.
- Adding credit: PIX from R$ 5 or boleto from R$ 30, according to the pricing page.
- Credit added by PIX or boleto is for use on the platform only; it is not refundable or convertible into cash.
- In the Console, the usage panel shows total spend, requests, tokens, and success rate over 1, 7, or 30 days, daily usage, usage by model, and each key’s spend and quota.
Switching the base_url: Python and Node.js examples
The examples below come from Zenifra’s documentation. In Python, install the SDK with pip install openai and keep the key in an environment variable (export ZENIFRA_AI_API_KEY="your-key"). The only difference from code that talks to OpenAI is the base_url and the model ID.
In Node.js and TypeScript, install with npm install openai. The parameter is called baseURL in the JavaScript SDK. The example uses zenifra/qwen3.8-flash; replace it with the ID of a catalog model that is enabled for your key.
If you do not use an SDK, any HTTP client works: it is a POST to https://ai.zenifra.com/v1/chat/completions with an Authorization: Bearer header and a JSON body containing model and messages. Errors follow the usual pattern: 401 invalid_api_key for a missing or invalid key, 403 insufficient_permissions when the key does not have the model enabled, 404 model_not_found for an ID outside the catalog, and 429 for rate limits or missing credit.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://ai.zenifra.com/v1",
api_key=os.environ["ZENIFRA_AI_API_KEY"],
)
response = client.chat.completions.create(
model="zenifra/qwen3.8-flash",
messages=[
{
"role": "user",
"content": "What is the average temperature in southern Brazil?",
}
],
)
print(response.choices[0].message.content)import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://ai.zenifra.com/v1',
apiKey: process.env.ZENIFRA_AI_API_KEY,
});
async function main() {
const response = await client.chat.completions.create({
model: 'zenifra/qwen3.8-flash',
messages: [
{
role: 'user',
content: 'Summarize what a PaaS is in three bullet points.',
},
],
});
console.log(response.choices[0]?.message?.content);
}
main().catch((error) => {
console.error(error);
process.exit(1);
});curl https://ai.zenifra.com/v1/chat/completions \
-H "Authorization: Bearer $ZENIFRA_AI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "zenifra/qwen3.8-flash",
"messages": [
{ "role": "user", "content": "Explain what a REST API is in one sentence." }
]
}'Streaming: when to use it and what changes on the bill
Streaming sends tokens as the model generates the answer instead of waiting for the full text. In chats, copilots, and assistants, the user starts reading almost right away and the wait feels shorter. For backend tasks, asynchronous reports, and automations with no interface, a non-streaming call is usually simpler to handle. The chat models in the catalog report streaming support, either as a capability or through the stream parameter; the exception is zenifra/kev-4b, which has no streaming.
Billing does not change: usage is still counted in input and output tokens, and the only difference is how the answer reaches the client. The credential is also the same as for a regular call. The extra care is for failures midway: handle dropped connections, end the partial answer with a clear message, allow a retry with backoff, and show a specific error when the key is invalid, the organization is out of credit, or the quota has been reached.
The Node.js example in the documentation sets stream: true and writes each chunk of text to the terminal. In a web application, the same loop forwards the chunks to the browser through Server-Sent Events or your framework’s streaming response. Limit concurrency to avoid cost spikes, and track tokens and models used in the Console.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://ai.zenifra.com/v1',
apiKey: process.env.ZENIFRA_AI_API_KEY,
});
const stream = await client.chat.completions.create({
model: 'zenifra/qwen3.8-flash',
stream: true,
messages: [
{
role: 'user',
content: 'Explain continuous deployment in five sentences.',
},
],
});
for await (const chunk of stream) {
const token = chunk.choices[0]?.delta?.content;
if (token) process.stdout.write(token);
}When another option is a better fit
If you need a model that is not in Zenifra’s catalog, such as OpenAI’s, Anthropic’s, or Google’s own models, the path is the vendor that sells that model. Zenifra’s catalog currently covers the Qwen, DeepSeek, Kimi, and GLM families, plus the Kev decision model. OpenAI compatibility makes testing easier, but it does not turn one model into another.
If your company already runs all of its infrastructure on AWS, Azure, or Google Cloud, with a contract, local invoicing, and a tax invoice issued by the provider, keeping AI under the same contract simplifies finance and governance. In those cases, the gain from paying per token in reais may not be worth adding another vendor. Keep in mind that, with those providers, the price is still in dollars and converted on the invoice, so predictability in reais is lower.
Does Zenifra’s AI API work with the OpenAI SDK?
Yes. The API is OpenAI-compatible and works with the official SDK in Python and Node.js by changing three things: base_url to https://ai.zenifra.com/v1, the key created in the Console, and the model ID in the form zenifra/<model>.
The SDK is not required: any HTTP client or framework that lets you set base_url and api_key can call the endpoint. Before migrating, check in the catalog that the model accepts the parameters your code sends, such as tools, response_format, or reasoning_effort.
Do I need a credit card to use the AI API?
No. AI usage draws on the organization’s credit, which is added by PIX or boleto, and the account can be created without a card. Sign-up asks for a Brazilian CPF or CNPJ, a mobile number, and an address in Brazil.
Even with a saved card, AI keeps using credit only: when the balance runs out, new calls are blocked instead of falling back to the card.
Does the price in reais change with the dollar?
There is no currency conversion in Zenifra’s billing: the price per million tokens is published in reais in the catalog and usage is deducted in reais from the credit. What you see in the catalog is what you are charged.
That does not mean prices never change: the documentation notes that models, limits, and prices can change and recommends checking the catalog or the Console before shipping an integration. The difference from providers that price in dollars is that your bill does not swing with the exchange rate within the month.
How much does 1 million tokens cost in reais?
It depends on the model: in Zenifra’s catalog on November 6, 2026, input ranges from R$ 0.60 (zenifra/qwen3.8-flash) to R$ 14.70 (zenifra/kimi-k3), and output ranges from R$ 2.00 to R$ 73.49 per million tokens.
To estimate, multiply input and output tokens by the model’s prices and divide by 1,000,000. In a typical conversation, output costs 3 to 5 times more per token than input, but input usually has far more tokens because it includes the system prompt and history.
Can I pay for an AI API with boleto?
Yes. At Zenifra you add credit by boleto from R$ 30 (or by PIX from R$ 5), and the AI API draws on that credit.
Among the large providers reviewed for this article, Google Cloud accepts boleto in Brazil as a backup payment method, with up to three payments a day, and OpenAI limits API credit purchases to US dollars. Because Zenifra’s AI is prepaid, the boleto has to clear before the credit becomes available.