Concepts
Credit & billing
How the gateway measures usage per endpoint, deducts it from the credit and when it rejects a request for lack of credit.
Your organisation pays for the use of the models managed by Noirdoc and of Noirdoc Shield from a credit balance. Admins top up the credit in advance. The gateway deducts the cost of every billed request from it.
Some organisations are billed by invoice instead. The section on credit does not apply to them; their usage is invoiced afterwards. The portal shows which billing type applies under Billing.
Billed requests
The gateway bills model costs when all three conditions apply:
- A provider managed by Noirdoc answered the request. You pay model costs for requests through your own providers (BYOK) directly to your provider; the gateway does not bill them.
- The response has a status code below 400. Rejected and failed requests incur no model costs.
- The request names a model from the catalogue.
The unit depends on the endpoint:
| Endpoint | Billed by |
|---|---|
/v1/chat/completions, /v1/responses, /v1/messages | Tokens: input and output, cache tokens at their own price if the model has one |
/v1/embeddings | Input tokens |
/v1/rerank | Input tokens or per request, depending on the model |
/v1/audio/speech | Characters of the input text |
/v1/audio/transcriptions | Audio duration as reported by the provider; the price applies per minute and is charged pro rata |
/v1/images/generations | Per image or per megapixel, depending on the model |
POST /v1/shield/inspect | Inspected input tokens (€0.40 per 1M tokens), see Noirdoc Shield |
The prices per model and provider are returned by the public endpoint GET /v1/prices. See Models & pricing.
Noirdoc Shield
Whenever Noirdoc Shield inspects the text of a request, the gateway charges a flat rate of €0.40 per 1M inspected input tokens across all five protection filters, on top of any model costs. The fee applies whenever Shield inspects text:
- on
/v1/chat/completions,/v1/responses,/v1/messages,/v1/embeddingsand/v1/rerank - including when Shield blocks a request before forwarding with status code 403 (
shield_violation) (only the Shield inspection fee applies; no model costs are incurred) - on the standalone inspection endpoint
POST /v1/shield/inspect
Preflight token counts via POST /v1/messages/count_tokens and POST /v1/responses/input_tokens skip Shield at €0.
On requests routed through your own provider key (BYOK), model tokens remain unbilled by Noirdoc. When Noirdoc Shield is active on a BYOK request, however, the Shield inspection fee (€0.40 per 1M input tokens) is deducted from your organisation’s credit (or billed by invoice) and counts towards API key budgets and request tag budgets. Without active Shield, BYOK calls remain €0 at Noirdoc.
Legacy masking for pre-existing organisations remains €0 until its sunset on 30.11.2026.
Top-up
Admins of your organisation top up credit under Billing → Top up. Payment runs through the payment service provider Mollie, by card or SEPA bank transfer. You choose an amount in whole euros; the form states the minimum and maximum amount. The amount you choose is credited. If VAT applies, you pay it on top; the portal shows both amounts before payment. When paying by card, you can also set up automatic top-up.
The credit is available as soon as Mollie confirms the payment. For a bank transfer this usually takes 1–2 banking days after the payment arrives.
If you create your first organisation in the portal, it receives a starter credit. It applies once per account: further organisations you create receive no starter credit. An invitation to another organisation does not use it up.
While a new organisation is still using only its starter credit and no top-up has been confirmed yet, requests to providers managed by Noirdoc can call only the starter-eligible models; the portal marks all other models After top-up. If a key requests a managed model that is not yet unlocked, the gateway rejects the request free of charge before forwarding with status code 403 (starter_model_not_allowed), without counting against the rate limit. Your own provider keys (BYOK) are not affected.
During this phase, the gateway also limits requests to providers managed by Noirdoc to 5 requests per minute and 25 requests per day (UTC) across the organisation. It rejects further requests before forwarding with status code 429 (starter_rate_limit_exceeded) and the Retry-After header. The rejection costs nothing, and requests rejected by the minute limit do not count towards the 25 requests per day. Requests through your own providers (BYOK) are not limited. As soon as the first top-up is confirmed, the gateway unlocks the full model catalogue and lifts both rate limits immediately.
Automatic top-up
Admins of your organisation can have the credit topped up automatically. If the balance falls below a threshold, Noirdoc charges a fixed amount to a saved card. This works only with a card; automatic top-up is not available with a bank transfer.
Setting it up
You set up automatic top-up during a top-up by card. Under Billing → Top up, choose the payment method Card payment and tick Top up automatically when credit runs low. Then set three values:
| Field | Meaning |
|---|---|
| Top up below | Threshold. If the balance falls below it, a charge starts. |
| Amount per top-up | Credit added by each charge. The form states the minimum amount. It must be at least as high as the threshold (Top up below). |
| At most per month | Monthly limit, required. It limits the automatically topped-up credit per calendar month in German time (Europe/Berlin) and must be at least as high as the amount per top-up. |
Manual top-ups do not count towards it; the monthly limit only caps what is charged without your involvement. Also tick I authorise Nextaim GmbH to charge this card on the terms above; without it, automatic top-up cannot be set up. Once the payment is confirmed, Mollie saves the card, and automatic top-up is active as soon as Mollie has confirmed the card. If VAT applies, it is charged on top of the amount, as with every top-up.
Charges
If the balance is below the threshold, the charge usually starts within a minute. Your requests keep running normally in the meantime. The credit is added as soon as Mollie confirms the payment. Per organisation, at most one automatic charge runs at a time.
All admins receive an email for every automatic charge; you find the receipt under Billing. These automatic top-up emails cannot be switched off. In the ledger, automatic top-ups are marked Automatic.
Once the monthly limit is reached, Noirdoc stops charging automatically until the end of the month, and the admins receive an email. You can then top up manually or raise the monthly limit with Change limit.
New organisations have a daily limit for card payments, and automatic charges count towards it. If a charge would exceed it, automatic top-up waits until there is room again; it is not paused in the process. If the top-up made during setup already exceeds the daily limit, the portal rejects the setup. Choose a smaller amount in that case.
Declined payment and pause
If the bank declines a charge, Noirdoc pauses automatic top-up, informs all admins by email and does not try again. Once the credit is used up, the gateway rejects new requests with insufficient_credit. As soon as the card can be charged again, resume automatic top-up with Reactivate.
Reactivate is available only after a declined payment. If automatic top-up is paused for another reason, for example because the card has expired or is no longer valid, top up once by card with Save a new card; the box is already ticked. The new card replaces the saved one. Before a saved card expires, the admins receive an email.
A charged-back payment and blocked top-ups also pause automatic top-up; Noirdoc then charges nothing automatically; contact hello@noirdoc.de. An invalid billing profile pauses it as well: save the billing profile under Billing again and then top up once by card. Reactivate does not help in these cases.
Changing and switching off
On the Billing page, the Automatic top-up section shows the rule and the saved card. There, admins change the threshold, amount and monthly limit with Edit; you confirm the authorisation again for this. Switch off ends future charges. A payment already in progress is still credited. Remove card switches automatic top-up off, has Mollie revoke the permission to charge the card and removes the card.
To switch automatic top-up back on after Switch off or Remove card, top up once by card and tick Top up automatically when credit runs low again. After Remove card, you enter the card again in the process.
Members see the settings but cannot change them.
Deduction
The gateway deducts the cost after the response, based on the actual usage and the prices at the time of the request. Because the deduction is only fixed after the response, the balance can fall below zero. The next top-up settles the outstanding amount; the portal shows it before payment.
All members see the balance, ledger and receipts under Billing.
Requests without sufficient credit
Before processing, the gateway checks whether the credit covers the request. This check applies to requests to managed providers, to POST /v1/shield/inspect, and – when Noirdoc Shield is active – to requests through your own providers (BYOK) as well. Requests through your own providers without active Shield are not checked.
For requests to chat and embedding models, the gateway estimates the highest possible cost:
- Input: the length of the input fields, converted at four characters per token (plus €0.40 per 1M input tokens when Noirdoc Shield is active).
- Output (chat only): the value from
max_tokens,max_completion_tokensormax_output_tokens. If it is missing, the gateway assumes 4,096 tokens.
For images it estimates the cost from the number and size of the images. For audio it only checks whether any credit is left. If the credit is used up or lower than the estimate, the gateway rejects the request with status code 402 before it reaches a provider. The rejection costs nothing.
{
"error": {
"type": "insufficient_quota",
"code": "insufficient_credit",
"message": "This request could cost up to 1.84 EUR, more …",
"param": null
}
}If the message gives an estimate, a smaller max_tokens or a shorter input is often enough. Without an estimate, the credit is used up; then only a top-up helps.
| Status | Code | Meaning |
|---|---|---|
| 402 | insufficient_credit | The organisation's credit is used up or lower than the estimated maximum cost of the request (including Noirdoc Shield, also on BYOK routes when Shield is active). |
| 402 | key_budget_exhausted | This key's budget is used up for the current period or does not cover the estimated cost of the request. |
| 403 | starter_model_not_allowed | The organisation is still using only its starter credit, and the model or its managed provider is not included in starter credit. |
| 403 | model_not_billable | The model has no complete price on record, so it cannot be used with credit. |
| 429 | starter_rate_limit_exceeded | The organisation is still using only its starter credit and has reached the limit of 5 requests per minute or 25 requests per day (UTC) for managed providers. The response contains Retry-After with the wait in seconds. |