Usage & Billing
Understand request units, credits, images, chunking, and daily limits for FireGuard.
FireGuard bills guardrail work in request units. One request unit consumes one credit from your organization balance, and each guardrail phase is measured separately.
A typical protected turn can have two phases:
input_guardrailsafter the user message and before your model runs.output_guardrailsafter the model response and before you return it.
What Affects Units
| Factor | How it affects units |
|---|---|
| Long text | Text is split into 5000-character windows with 5% overlap. |
| Images on input | Images add policy-scoring units based on base64 length. |
| Policies plus security | Text units are counted once per phase, not once per guardrail type. |
| Daily cap | Organizations also have a daily request-unit limit. |
If at least one guardrail runs, FireGuard bills at least one unit for that phase. normal and fast execution modes use the same unit formula.
Long Content
Long text is evaluated in overlapping windows of up to 5000 characters. Each window is scored separately and results are merged:
| Guardrail | Merge behavior |
|---|---|
| Policies | Keep the highest confidence per policy across windows. |
| Security | Treat the phase as unsafe if any window is unsafe. |
For input_guardrails, policies score the last user message while security scores the full conversation history plus OCR and image metadata when images are present. If both run, billing uses the larger text window count.
For output_guardrails, policies and security both score the same output string.
Images On Input
Only input_guardrails accepts top-level images[].
Each image item requires:
| Field | Description |
|---|---|
base64 | Raw base64 bytes without a data:image/...;base64, prefix. |
mimeType | MIME type such as image/png or image/jpeg. |
name | Optional label or file name. |
Limits:
- Up to 6 images per request.
- Each
base64string can be about 7 MB. - Send images in
images[], not insidemessages_history[].content.
Policies use images for multimodal scoring with the latest user message. Security does not receive raw base64; it uses OCR and metadata text combined with conversation history.
Image Units
Image units apply only on the policies path:
units per image = ceil(base64.length / 5000), minimum 1Example: an image with about 10,000 base64 characters adds 2 image units. When both policies and security run, text units are still counted once and image units are added on top.
Credits And Limits
Credits and daily limits are independent checks:
| Condition | HTTP status |
|---|---|
| Not enough credits | 412 Precondition Failed |
| Daily request-unit limit exceeded | 429 Too Many Requests |
The daily limit resets on a UTC calendar day. The default organization cap is 1,000,000 request units per day unless Fireraven configures a different limit for your organization.
Buy credits and view balance in Organization Settings under Plan and Usage. Your first default organization starts with 500 free credits.