Skip to main content
Version: 0.2 (next)

Usage and limits

Infrared calls two AI providers. Claude (Anthropic) runs every agent step and writes the scripts of summary videos. Gemini (Google) narrates summary videos and makes their images and presenter clips. Both have limits, and some of Google's are small and reset daily. Infrared keeps track for you, so you see a limit coming before an agent or a video runs into it.

The AI usage chip​

At the top right of every page, a chip shows what the org's AI use cost today, Claude and Gemini together, as AI $4.12 today, with a status dot:

DotMeans
GreenWithin every limit.
AmberA Gemini model has used 80% of its daily limit, an Anthropic per-minute limit has less than 20% left, or Anthropic is rate limiting the key.
RedA Gemini daily limit is reached, or the Anthropic key is out of credit or rejected.

Click it to see why the dot is amber or red, today's Claude spend and tokens, today's Gemini spend and summary videos, a meter for each Gemini daily limit, and the Anthropic per-minute limit with the least left, once Infrared has seen one. It also says how long until Google's limits reset, and links to the Usage page. The chip refreshes every minute.

The Usage page​

Usage in the rail shows the org's AI use for the last 7 days or 30 days. If any limit is near or reached, a note at the top says which, in plain words.

The Usage page: today's spend, budgets, Gemini limits and spend by day The Usage page: today's spend, budgets, Gemini limits and spend by day

SectionWhat it shows
Today and Last 7 daysSpend today for Claude and Gemini together; Claude's spend, tokens, and tokens read from cache; Gemini's spend and the number of summary videos; and the window's total. "Today" follows the org's time zone.
BudgetsEvery cap the org set, as a meter with what is spent and what is left: the monthly cap on summary videos, and each weekly budget a group of AgentWorkflows shares (spec.budget), against what its runs cost in the last seven days.
Gemini daily limitsEach Gemini model's requests since Google's last reset, against its daily limit.
Spend by dayClaude and Gemini stacked per day. Hover a day for its numbers, or open Show as a table.
Claude by model and Claude by AgentRoleExecutions (each time a step ran), tokens and cost. Summary video scripts have their own row.
Anthropic rate limitsThe requests and tokens per minute Anthropic last reported for the key, what was left, and when the key was last checked.
SettingsLinks to the model provider key and Check now, summary videos and their monthly cap, models and costs per AgentRole, the weekly budgets per AgentWorkflow group, and model tiers.

When a cap is reached, the work it covers stops before it spends more. A run whose AgentWorkflow group has spent its weekly budget fails before any step runs, and says why. Summary videos stop at their monthly cap.

Next to a button that would spend a Gemini video request, such as making a summary video with a fresh presenter, Infrared can show how many video requests are left today.

An install can add a line of its own under the page's title, for example to say who pays for agent runs. Its operators set it in the install's configuration.

Every org, for platform admins​

Platform admins see every org's usage, and set the Gemini daily limits, on Settings, in the AI usage · every org and Gemini daily limits panels. The Usage page links there. Google's quota is per Google project, not per org, so the Gemini request counts include every org on the install.

Measured or estimated​

FigureWhere it comes from
Claude spend and tokensMeasured: each agent step's usage as the Claude Agent SDK reports it, and each summary video script's.
Gemini spendMeasured per summary video (clips, image and narration), priced from Google's list prices.
Gemini requests per modelCounted by Infrared's summary video Jobs, since midnight Pacific.
Gemini daily limitsConfigured, not reported, because Google doesn't expose remaining quota. The defaults are those of an AI Studio paid Tier 1 project: 20 requests a day for the presenter clip's model (gemini-omni-1.1-flash) and 100 for narration (gemini-2.5-flash-preview-tts). Set your project's real limits from AI Studio, under Usage → Rate limits.
A limit reachedGoogle refused a request with a per-day 429 since the last reset (or since the Gemini key changed), or the count reached the configured limit. A per-minute 429 doesn't count: Infrared waits the short time Google asks for, retries, and counts it separately.
Anthropic rate limitsAnthropic's anthropic-ratelimit-* response headers, recorded by Check now under Settings → Model provider and by each summary video's script call. Agent steps don't record them.

Requests Infrared doesn't make, such as anything else using the same Google project or Anthropic key, don't appear in the counts.

The API​

curl "https://<host>/api/v1/orgs/<org>/usage?days=7" -H "Authorization: Bearer $INFRARED_TOKEN"
curl "https://<host>/api/v1/usage?days=7" -H "Authorization: Bearer $INFRARED_TOKEN" # platform admins: every org
curl -X PUT https://<host>/api/v1/ai-limits -H "Authorization: Bearer $INFRARED_TOKEN" \
-H 'Content-Type: application/json' -d '{"gemini": {"gemini-omni-1.1-flash": 20}}' # platform admins

The daily limits live in the ConfigMap infrared-ai-limits in Infrared's namespace. The label of the Gemini key in use comes from the annotation infrared.darkshift.io/key-label on its Secret; the key itself is never shown.