> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usefeyn.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Call https://api.feyn.ai only; the hosts behind it are not public.
> Authenticate with a workspace API key in the Authorization header: `Authorization: Bearer fn_...`. Keep keys server-side.
> For chat completions, use the official OpenAI SDK with base_url https://api.feyn.ai/v1 and a model ID from GET /v1/models.
> On 429, wait for the Retry-After header before retrying. Failed requests are not charged.

# Judges

> A judge asks a model a question about every completed trace and stores the answer next to your scores.

A judge is set up on the project, on the dashboard's **Scores** page. It asks one question about each completed trace, using OpenAI's [Decisions API](https://developers.openai.com/api/docs/guides/decisions) with `gpt-6-luna`. New judges are off until you turn them on.

## Question types

| Type | Use it for | Stored answer |
| - | - | - |
| Yes / no | A condition that holds or doesn't, such as "Did the agent book the time the user asked for?" | The probability that it holds, from 0 to 1, and pass or fail at your threshold (0.5 unless you set one) |
| Pick one | One label from a fixed list, such as `billing`, `technical` or `other` | The chosen label and the model's confidence |
| Score | A rating against ordered levels, lowest first, such as unhelpful, partly, fully | A score from 0 to 1 (the lowest level is 0 and the highest is 1), the most likely level and the confidence |

Each question has instructions you write, or that the dashboard drafts from a plain-language description. Choices and levels can each have a description. Answers are typed: a judge can't return a written reason or free-form JSON.

If the model declines to answer, the judgment is stored as **refused** and no score is recorded for that trace.

## When a judge runs

A trace is judged once it is complete: it has a `status`, and either an `output` or an assistant message as its last turn. The judge sees the trace's `messages`, `output`, `reasoning` and `metadata`, so put facts the judge needs, such as a user's plan or a ticket id, on `metadata`.

Sending a trace again with the same content doesn't judge it again. Changing the content, or the judge's question, judges it again on the next write.

All of a project's judges answer in a single request per trace, so you pay for a trace's tokens once, however many judges the project has.

Judgments are kept apart from the scores your app writes with `POST /v1/scores`: a judge never overwrites a value your app sent under the same name.

## Price

$0.15 per 1M input tokens, from your [credits](https://docs.usefeyn.com/account/credits.md). Output tokens aren't charged. A 2,000-token trace costs $0.0003 to judge, so 1,000 such traces cost \$0.30.

Drafting a judge and trying it on recent traces are free. When the balance reaches \$0, judging stops until credits are added.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.