Skip to main content
Fiddler records the tokens and estimated cost of the LLM call behind each successful LLM-as-a-Judge evaluation, rolls them up every hour, and reports the totals for each Evaluator Rule through GET /v3/cost/evaluators. This guide demos the feature end to end on your own deployment: you create a GenAI application with two LLM-as-a-Judge rules, send it one trace, and read back what each rule cost. You can create the application, evaluators, and rules in the Fiddler UI or with the REST API.
This capability is currently in private preview and is not yet available to all customers. Contact your Fiddler Customer Success Manager to request access.

Availability

Evaluator cost tracking requires Fiddler 26.22 or later, and it must be enabled for your deployment. The llm_models field, which names the judge models behind each item, requires Fiddler 26.25 or later.
Not enabled yet? GET /v3/cost/evaluators returns 503 while the API is off. If the API is on but cost collection is off, it returns a well-formed 200, but no new cost appears, however many evaluations run: a deployment that has never collected cost stays empty, and one where collection was turned off keeps showing only what it collected before. Contact your Fiddler Customer Success Manager to enable both.

What You’ll Learn

  • Check that evaluator cost tracking is enabled for your deployment
  • Choose a judge model that produces a dollar figure, and see why a Fiddler-hosted model doesn’t
  • Create LLM-as-a-Judge rules in the Fiddler UI or with the REST API, send a trace, and confirm that the judges ran
  • Read cost, tokens, and the judge models used per rule, application, and project, with filters and paging, and interpret the meta block
Time to complete: about 15 minutes of hands-on work, plus a wait of up to two hours for the hourly roll-up before cost appears.

Prerequisites

Before you begin, ensure you have:
  • Fiddler 26.22 or later, with evaluator cost tracking enabled (see Availability)
  • A Fiddler API key for an Org Admin, from Settings > Credentials, because the guide creates a project
  • For the UI steps, a Fiddler UI sign-in as an Org Admin, with GenAI Apps and Evaluator Library in the left navigation bar
  • A judge model in the LLM Gateway: a model from your own provider account with its credential, a Fiddler-hosted model, or both (step 4 helps you choose)
  • A terminal with curl, jq 1.6 or later, and openssl, even if you use the UI. The commands work in bash and zsh, on macOS, Linux, and Windows Subsystem for Linux.

Run the Demo

Steps 3 to 6, 8, 11, and 12 have a UI tab and a REST API tab. Choose one on any step, and the other steps switch to match. The remaining steps use the REST API either way, because the Fiddler UI doesn’t send traces or show evaluator cost. The commands use the v3 REST API, authenticated with your API key as a bearer token (Authorization: Bearer $FIDDLER_API_KEY). The one exception is the trace, which goes to the OpenTelemetry Protocol (OTLP) endpoint, /v1/traces. Run every command in the same terminal session: each step reads the IDs that earlier steps export.

1. Set Up Your Environment

Set your Fiddler URL, with no trailing slash and no /v3, and your API key from Settings > Credentials:
Never add -v to the curl commands in this guide: verbose output prints the Authorization header, and with it your API key. Later steps export the IDs they create, and the steps after them read those IDs. If you continue in a new terminal session, run the block above again, then enter your IDs below and paste the export lines that the panel builds. The values stay in this browser, and the panel never asks for your API key.

2. Check That Evaluator Cost Tracking Is Enabled

The first command prints your Fiddler version, which must be 26.22 or later. The second should print:
Any other result means something is missing: A 200 proves that the API is on, but not that cost collection is: if collection is off, no new items appear, though totals stored while it was on stay visible. Steps 8 and 9 show how to tell that apart from a roll-up that hasn’t run yet.

3. Create a GenAI Project and Application

A GenAI project holds GenAI applications. The application receives the trace, and the rules bind to it. Project names must start with a letter, contain only letters, digits, and underscores, and be unique in your organization.
  1. In the left navigation bar, click GenAI Apps, then Add Application.
  2. On the Choose Your Project step, select Create New Project, enter cost_quickstart as the Project Name, and click Create Project.
  3. On the Create Your Application step, enter cost_quickstart_app as the Application Name, and click Create Application.
  4. On the Completed step, copy the App ID, and click Finish Setup.
For more about these steps, see Onboard Your GenAI Application. Set APPLICATION_ID to the App ID you copied, and look up the application’s project, whose ID the later commands use too:

4. Choose a Judge Model

Cost tracking covers the LLM calls that evaluators make through the LLM Gateway: custom LLM-as-a-Judge evaluators, and the built-in RAG Faithfulness, Answer Relevance 2.0, Context Relevance, Coherence, and Conciseness evaluators. Evaluators that don’t call the LLM Gateway, such as PII detection and embeddings, record no tokens or cost and never appear in the response. A call that fails, because the provider returns an error or the judge’s response can’t be parsed, records nothing either, so the totals can run below your provider’s bill. Which judge model you pick decides whether you get a dollar figure: This guide creates one judge of each kind, so that you can compare them side by side. If your organization has only one kind, skip the parts marked for the other judge in steps 4 to 6. Every other command works with either judge, and the later outputs then show only your judge’s rule. Only a priced judge produces a dollar figure. An administrator adds providers, models, and credentials in Settings > LLM Gateway; see LLM Gateway.
  1. Open the user menu in the left navigation bar, click Settings, and open the LLM Gateway tab.
  2. Priced judge. On your provider’s row, click the Test Connection icon, choose your Credential and a Model that LiteLLM prices, such as gemini-3.5-flash, and click Test Connection. The test sends one small request to your provider, which bills it, and changes nothing in Fiddler.
  3. Fiddler-hosted judge. Check that the fiddler row lists the model you plan to use, such as ministral3-8b, and a credential, such as Fiddler Credential: the UI asks for a credential for every judge, including a Fiddler-hosted one.
The Test Connection dialog with the credential my-vertex-credential and the model gemini-3.5-flash selected, showing Connection successful and the response time in milliseconds

Test Connection after a successful test of a priced judge's credential and model.

A successful test shows the provider’s message, such as Connection successful, and the response time. A failed one shows why the provider rejected the call. Fix the credential before you continue: a judge whose calls fail produces no scores and no cost.

5. Create the Evaluators

An evaluator is the judge’s definition, and it isn’t tied to a project. Both evaluators use the built-in Conciseness evaluator (conciseness in the API), an LLM-as-a-Judge evaluator with a single input, response.
  1. In the left navigation bar, click Evaluator Library, then Add Evaluator.
  2. Choose Conciseness, and click Next.
  3. On the Configure step, fill in the fields for your judge from the table below, and click Next.
  4. On the Review step, click Save.
Add one evaluator for each judge:Credential starts with the provider’s first credential, so for the priced judge, check that it’s yours.
The Add Evaluator dialog on the Configure step for Conciseness, with the evaluator name cost_quickstart_priced_evaluator, the provider vertex_ai, the credential my-vertex-credential, and the model gemini-3.5-flash

The Configure step of Add Evaluator, filled in for the priced judge.

Evaluator names must be unique across your Fiddler deployment, not just your organization, and archived evaluators keep theirs. If a name is taken, the UI shows Evaluator name must be unique under Evaluator Name, and the REST API command prints an error with code 409 and the message An evaluator with name "<name>" already exists: change the name and try again.

6. Create the Rules

A rule binds an evaluator to an application and maps the evaluator’s inputs to span attributes. Each rule here maps the evaluator’s response input to gen_ai.llm.output, the LLM’s response text.
  1. In the left navigation bar, click GenAI Apps, open cost_quickstart_app, and click the Evaluator Rules tab.
  2. Click Add Rule, select Use Existing Evaluator, choose your evaluator under Select Evaluator, and click Next.
  3. On the Apply Rules step, leave the conditions empty, and click Next.
  4. On the Map Evaluator step, set Response to gen_ai.llm.output, and click Next.
  5. On the Review step, enter the Rule Name, select No backfill, leave Sampling rate blank if the dialog shows it, so that the rule judges every span, and click Save.
Add one rule for each evaluator:For every option in the dialog, see Evaluator Rules.
With no filters, a rule matches every span in the application. A span without the mapped attribute is skipped rather than judged, so only LLM spans that carry gen_ai.llm.output cost anything.

7. Send a Trace

New rules take up to 60 seconds to reach the evaluation workers, so this step waits a minute before it sends anything. Traces go to the OTLP endpoint, POST /v1/traces, with your API key as a bearer token and the application ID in both the fiddler-application-id header and the application.id resource attribute. The request sends one LLM span as OTLP/HTTP JSON, stamped with the current time:
An empty partialSuccess means that Fiddler accepted every span. The span’s cost takes up to about two hours to appear; step 9 explains the timing. To send real traces from your own application, instrument it with OpenTelemetry or a Fiddler SDK: start from Agentic Observability, replay stored traces with Exporting OTel Traces to Fiddler, and see Span and Resource Attributes for the attributes Fiddler reads.

8. Check That the Judges Ran

The judges score a span within minutes of its arrival.
  1. In the left navigation bar, click GenAI Apps, open cost_quickstart_app, and click the Explorer tab.
  2. On the chat_completion span’s row, click the View Trace icon.
  3. Scroll the span’s details down to the Evaluators section. It lists each rule that judged the span, with an Output Name and a Value for each of the rule’s outputs.
Both rules appear there, cost_quickstart_priced and cost_quickstart_hosted, or only your judge’s rule. For more about the Explorer, see Explorer.
The Evaluators section of the chat_completion span in the Explorer, listing the rules cost_quickstart_hosted and cost_quickstart_priced, each with the outputs label (yes), reasoning, and value (1)

The span's Evaluators section in the Explorer, with each rule's outputs.

If cost collection is on, a rule that scored its spans has also recorded their cost, which reaches GET /v3/cost/evaluators once the hourly roll-up includes the span’s hour.

9. Wait for the Hourly Roll-Up

The Fiddler UI doesn’t show evaluator cost, so this step and the next use the REST API in both flavors. GET /v3/cost/evaluators reads hourly totals, not individual judge calls, so cost reaches it in three stages:
1

The Judge Runs

Within minutes of the span’s arrival, the judge scores it, and Fiddler records the call’s tokens and estimated cost against the span’s start time.
2

The Span's UTC Hour Closes

The roll-up never includes the hour in progress, so the current hour is always empty.
3

The Next Hourly Roll-Up Runs

Each run totals the two completed UTC hours before it. When it finishes, the span’s cost appears in the response.
The span from step 7 can take up to about two hours to appear: up to an hour for its UTC hour to close, then up to an hour for the next run. Until then, the endpoint returns a well-formed response with no items for your project. The data changes only once an hour, so polling every 10 minutes is enough. This loop stops as soon as the first items appear, or after three hours:
If a request fails, the loop prints the response, such as an error message, and stops. If it stops with Still no items after three hours. and step 8 showed that the judges ran, cost collection is probably off for your deployment; see Availability.

10. Read Cost and Tokens

Every query below filters to the demo project, because other applications in your organization may have evaluator cost too.

The Default Window

With no time bounds, the response covers the last 30 days, snapped to whole UTC hours:
  • Items sort by cost_usd_estimated, highest first, with null last.
  • The estimate multiplies each call’s input and output tokens by the model’s list prices in LiteLLM’s open-source pricing tables. Here, 411 input tokens at 1.50 USD per million plus 474 output tokens at 9.00 USD per million come to 0.0048825 USD.
  • The Fiddler-hosted judge used real tokens and reports cost_usd_estimated: null. null is not zero: handle it explicitly whenever you add up costs.
  • llm_models lists the judge models each rule’s calls used, as provider/model, sorted. A rule lists more than one when its evaluator’s model changes during the window. It’s null when no hour in the window has model data, as with hours rolled up before Fiddler 26.25.

An Explicit Window

This query covers the last 24 hours and prints one line per rule:
Both bounds need a Z or a UTC offset; a timestamp without one returns 400. -G with --data-urlencode makes curl encode the colons in the timestamps. The start snaps down and the end snaps up to whole UTC hours, so the window queried, printed on the first line, is never narrower than the one you asked for. A window can span at most 366 days.

Group by Application or Project

group_by sets what each item totals: both (the default) gives one item per application and rule, application_id one per application, and project_id one per project.
application_id adds up an application’s rules, so the rule fields are null; project_id adds up a project’s applications, so the application fields are null too. llm_models combines the models of every rule in the group, here both judges. Compare the totals: the tokens cover both rules, but the cost covers only the priced one. A group that mixes priced and unpriced calls reports less cost than its tokens suggest, and nothing in the response flags it.

Filter by Application

project_id narrows the response to one project, and application_id to one application:
An ID that doesn’t exist returns 400, while an ID in your organization that you can’t read returns an empty 200.

Page Through the Results

limit sets the page size, from 1 to 500 (default 100, unless your deployment sets a different page size), and offset skips that many items:
Ties in cost are broken by application name, rule name, and IDs, so pages never shift between requests for an unchanged window.

Read the Meta Block

Every response carries a meta block, even when items is empty. This query asks for the current UTC hour:
  • time_range is the window actually queried, after snapping. The current hour is always empty, because the roll-up hasn’t covered it yet.
  • earliest_available_data is the start of the earliest hour with cost data for the applications in scope for this request, which your access and filters decide. It doesn’t depend on the window, so here it shows that data exists even though the current hour is empty. It is null until anything in scope has been rolled up. Two users can see different values, so don’t treat it as a constant for your organization.
  • disclaimer is a fixed string. Show it wherever you show the numbers.

11. (Optional) Delete a Rule and Keep Its Cost

Deleting a rule removes its scores but not its cost: cost is a record of spend, and deleting a rule doesn’t undo it.
  1. In the application’s Evaluator Rules tab, scroll to the right end of the cost_quickstart_priced rule’s row, or of cost_quickstart_hosted if that’s your only rule, open its ⋮ menu, and click Delete.
  2. Type delete, and click Delete Evaluator Rule.
Then read the cost again:
The deleted rule’s ID and name are now null, and its tokens, cost, and models are unchanged. Its scores are gone, though: run step 8 again, and the deleted rule is no longer listed.

12. Clean Up

Evaluators can’t be deleted, only archived, and archiving an evaluator also deletes every rule that uses it, in every application. Deleting an application is asynchronous: a background job removes the application’s traces, scores, and rules, and the project can be deleted only once that job finishes.
  1. Archive each evaluator: in the left navigation bar, click Evaluator Library, open the evaluator, click Archive, and click Confirm. When its status changes to Archived, close the dialog.
  2. Delete the application: click GenAI Apps, open the ⋮ menu at the right end of the cost_quickstart_app row, and click Delete. Type delete, and click Delete Application. You can follow the deletion job under Jobs in the left navigation bar.
The UI can’t delete a GenAI project, so delete it with the API once the application’s deletion job finishes. Until then, the request returns 409 with the message Project cannot be deleted as it contains an application being deleted.; wait a minute and run it again.
A deleted application’s cost no longer appears in GET /v3/cost/evaluators. If you entered IDs in the panel in step 1, click its Clear button: the objects they point to no longer exist.

Troubleshooting

Quick Reference

GET /v3/cost/evaluators parameters: start_time and end_time (ISO 8601 with a Z or offset; default the last 30 days; snapped to whole UTC hours), group_by (both, application_id, or project_id), project_id, application_id, limit (1–500, default 100 unless your deployment sets a different page size), and offset.

Next Steps