LLM-as-a-Judge & Evaluation API
Run high-throughput open-weight LLM-as-a-Judge models (deepseek-v4.1-flash-1017, kimi-k3.1-pro, deepseek-v4-pro, glm-5.3, nemotron-3-super) on Inference.net for DeepEval, Promptfoo, CI regression gates, and synthetic dataset grading. Pair strict JSON Schema structured outputs and automatic rubric prefix caching with 500 RPM Free (1,000 RPM Paid) defaults, Async/Group/Batch APIs, and default Zero Data Retention on eligible Inference.net-hosted routes.
- Drop-in OpenAI-compatible judge endpoint for DeepEval, Promptfoo, Braintrust, Inspect, and custom CI eval gates
- Strict JSON Schema structured outputs (`response_format`) for typed pass/fail scores, rubric grades, and rationales
- Automatic prefix caching on repeated system rubrics and few-shot examples across DeepSeek V4.1 Flash 1017, DeepSeek V4 Pro, and Kimi K3.1 Pro
- Scale from 500 RPM Free (1,000 RPM Paid) interactive CI runs to `/v1/slow` Async, 50-request Group webhooks, or 1M-request JSONL Batch sweeps
Built for production reliability
| Capability | Specification | How it helps |
|---|---|---|
| Recommended judge tiers | `deepseek-v4.1-flash-1017`, `nemotron-3-super`, `kimi-k3.1-pro`, `deepseek-v4-pro` | Pair fast low-cost judges for CI regression gates with pro-tier reasoning judges for nuanced rubric audits on one API key. |
| Eval framework compatibility | /v1/chat/completions · /v1/responses · /v1/messages | Drop-in base URL and API key integration for DeepEval, Promptfoo, Braintrust, Inspect, and custom pytest/Vitest harnesses. |
| Structured grading outputs | Strict JSON Schema `response_format` + controllable thinking | Enforce typed pass/fail booleans, numeric scores, and structured rationales via Zod or Pydantic JSON Schema. Pair temperature: 0 with reasoning_effort: "none" on DeepSeek V4.1 Flash routes to disable default thinking and keep your requested temperature. |
| Rubric prompt caching | Automatic prefix caching (up to 91%+ input savings) | Repeated system rubrics and few-shot examples qualify for cached-read discounts on supported open-weight routes. |
| CI concurrency & batch scale | 500 RPM Free · 1,000 RPM Paid · up to 1M JSONL Batch | Run parallel PR checks with high default RPM or offload million-row synthetic grading to webhook-backed Async, Group, and Batch APIs. |
| Privacy & US residency | Default ZDR (eligible hosted routes) · SOC 2 Type II · us.api.inference.net | Default ZDR protects production traces and golden datasets on eligible Inference.net-hosted routes (sync, /v1/slow Async, and Group calls); externally routed models follow upstream provider retention terms. Pin Inference.net-hosted US routes to us.api.inference.net. |
Run a typed LLM-as-a-Judge evaluation with rubric caching
Set reasoning_effort: "none" (or reasoning: { enabled: false }) when pairing deepseek-v4.1-flash-1017 with temperature: 0, because DeepSeek V4.1 Flash samples at 1.0 while thinking is enabled. Keep RUBRIC_SYSTEM_PROMPT static at the front of every test case so automatic prefix caching hits cached-read rates (do not pass prompt_cache_key on DeepSeek routes). Swap baseURL to https://api.inference.net/v1/slow for offline eval sweeps.
import OpenAI from "openai";
import { zodResponseFormat } from "openai/helpers/zod";
import { z } from "zod";
const client = new OpenAI({
baseURL: "https://us.api.inference.net/v1",
apiKey: process.env.INFERENCE_API_KEY,
});
const JudgeVerdict = z.object({
passed: z.boolean().describe("True when the candidate satisfies every rubric check."),
score: z.number().min(1).max(5).describe("Integer rubric score from 1 to 5."),
rationale: z.string().describe("Concise evidence citing the rubric criteria."),
});
// Keep the rubric prefix byte-identical across test cases for automatic prefix caching
const RUBRIC_SYSTEM_PROMPT = `You are an automated LLM evaluation judge.
Score the candidate answer strictly against the reference answer for factual accuracy,
completeness, and absence of hallucinated claims.`;
const completion = await client.chat.completions.parse({
model: "deepseek-v4.1-flash-1017",
reasoning_effort: "none",
temperature: 0,
messages: [
{ role: "system", content: RUBRIC_SYSTEM_PROMPT },
{
role: "user",
content: JSON.stringify({
question: "What is the default retention setting for new Inference.net teams?",
reference: "Zero Data Retention (ZDR) is enabled by default for new teams.",
candidate: "New accounts on Inference.net start with Zero Data Retention on by default.",
}),
},
],
response_format: zodResponseFormat(JudgeVerdict, "judge_verdict"),
});
console.log(completion.choices[0]?.message.parsed);Guides and references
Compare live pricing, context windows, structured output support, and US residency across all judge models.
Explore Prompt Cache CalculatorModel monthly judge savings from cached rubric reads across 50%, 75%, and 90% cache hit rates.
Explore Live LLM BenchmarksVerify rolling 15-minute production TTFT and output tokens/sec before locking in CI eval timeouts.
Explore Inference.net vs OpenAI APICompare open-weight judge economics, 500/1,000 RPM defaults, and default ZDR against OpenAI's API.
Read comparison Inference.net vs OpenRouterCompare direct GPU hosting, sticky prefix caching, and default ZDR against marketplace routing.
Read comparison DeepSeek V4.1 Flash 1017 model pageLive pricing ($0.08/1M input, $0.007/1M cached), 1M context, and US-hosted specs for high-volume grading.
View model Kimi K3.1 Pro model pageFlagship open-weight reasoning judge for complex repository diffs and nuanced rubric scoring.
View model Structured outputs docsJSON Schema response_format reference for strict, parseable evaluation outputs.
Open docs Batch API docsSubmit up to 1,000,000 JSONL grading requests offline without impacting live production rate limits.
Open docsFrequently asked questions.
Quick answers to help you get started
Use deepseek-v4.1-flash-1017 ($0.08/1M input, $0.635/1M output, $0.007/1M cached reads) or nemotron-3-super ($0.102/1M input, $0.48/1M output) for high-volume CI assertions, pairwise classification, and synthetic dataset filtering. Step up to kimi-k3.1-pro, deepseek-v4-pro, or glm-5.3 when grading nuanced multi-step reasoning, repository diffs, or complex rubric criteria. Compare live per-token rates in /models/ and rolling 15-minute latency in /benchmarks/.
Point DeepEval, Promptfoo, or any OpenAI-compatible evaluation harness to https://api.inference.net/v1 (or https://us.api.inference.net/v1 for US-hosted judge routes such as deepseek-v4.1-flash-1017 and kimi-k3.1-pro) with your INFERENCE_API_KEY. Pass a Pydantic or Zod JSON Schema via response_format so every judge call returns machine-parseable scores, boolean pass flags, and rationales. When using temperature: 0 on thinking-by-default routes like deepseek-v4.1-flash-1017, disable thinking with reasoning_effort: "none" (or reasoning: { enabled: false }) so your requested temperature applies; while thinking is enabled, DeepSeek V4.1 Flash routes and GLM-5.3 sample at temperature 1.0.
Evaluation harnesses repeat the same grading rubric, JSON instructions, and few-shot reference examples across hundreds or thousands of test cases. Place the static rubric and examples at the top of the prompt prefix so automatic prefix caching applies on supported routes like deepseek-v4.1-flash-1017 ($0.007/1M cached reads, a 91% input discount) and kimi-k3.1-pro. Estimate your exact monthly eval savings in /tools/prompt-cache-calculator/.
Yes, on eligible Inference.net-hosted routes. New Inference.net teams have Zero Data Retention enabled by default under SOC 2 Type II controls, so production traces and golden datasets sent to Inference.net-hosted judge models (such as deepseek-v4.1-flash-1017 and kimi-k3.1-pro) are not retained or used for training on synchronous /v1, /v1/slow Async, and Group API (up to 50 requests per webhook job) calls. Externally routed catalog models (such as deepseek-v4-pro and nemotron-3-super) are excluded from our ZDR policy and follow their upstream provider's data-handling and retention terms, and Batch API (/v1/batches, up to 1,000,000 JSONL requests) requires turning ZDR off in team settings to store batch output files. For US data residency with ZDR, route Inference.net-hosted US judges like deepseek-v4.1-flash-1017 and kimi-k3.1-pro to https://us.api.inference.net/v1.
Ship on Inference.net today
Start self-serve with an API key, explore live model pricing, or talk with our team about dedicated capacity and custom SLAs.