{ "benchmark_id": "benchmark_01k4x9m2p7q3r6a1", "benchmark_name": "My Benchmark", "status": "READY", "samples": [ { "sample_num": 1, "instruction": "How do I reset my password?", "response": "You can reset your password by clicking the 'Forgot Password' link on the login page." }, { "sample_num": 2, "instruction": "What are the system requirements?", "response": "The system requires a modern web browser with JavaScript enabled." } ], "n_samples": 2}
Notes:
File must be in valid JSON format with proper sample structure
Each sample must include sample_num, instruction, and response fields
The benchmark is immediately available for use in evaluations after upload
The document_id provided in the request is stored internally and will appear as a single-element documents array (e.g., ["document_01k4x9m2p7q3r5s8"]) when retrieving the benchmark via /benchmarks/list or /benchmarks/{id}/data endpoints
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Nugen API Reference Docs","colors":{"primary":"#005b96","light":"#6497b1","dark":"#005b96"},"logo":{"light":"https://mintcdn.com/courteasy/YYugGl8ZAoQlnBYp/logo/light.svg?fit=max\u0026auto=format\u0026n=YYugGl8ZAoQlnBYp\u0026q=85\u0026s=f5f462b08161252f94dca4827e8055a0","dark":"https://mintcdn.com/courteasy/YYugGl8ZAoQlnBYp/logo/dark.svg?fit=max\u0026auto=format\u0026n=YYugGl8ZAoQlnBYp\u0026q=85\u0026s=c1f31d3028b6ad46f4c22208d402733e"},"favicon":"https://mintcdn.com/courteasy/YYugGl8ZAoQlnBYp/favicon.png?fit=max\u0026auto=format\u0026n=YYugGl8ZAoQlnBYp\u0026q=85\u0026s=74a9985970701685cc9f798a5bed86fe","api":{"openapi":"https://api.nugen.in/openapi-public.json","mdx":{"auth":{"method":"bearer"},"server":"https://api.nugen.in/"}},"navbar":{"links":[{"href":"https://github.com/nugen-in/nugen-cookbook","label":"Cookbook"}],"primary":{"type":"button","label":"Get API Key","href":"https://nugen.in/signup"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/nugen-in"}},"contextual":{"options":["copy","vscode","claude","chatgpt","perplexity","cursor"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"API Status","icon":"bolt-lightning","href":"https://status.nugen.in"},{"anchor":"Nugen Intelligence","icon":"earth-asia","href":"https://nugen.in"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"courteasy","hasAudioNarration":false,"actualSubdomain":"courteasy","customDomains":["docs.nugen.in"],"gitSource":{"type":"github","owner":"nugen-in","repo":"nugen-docs-test","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ae488e3c69c99d3b7d10d90","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"API Reference","count":43},{"language":"default","tag":"Models","count":10},{"language":"default","tag":"Alignment Projects","count":7},{"language":"default","tag":"Benchmarks","count":7},{"language":"default","tag":"Evaluations","count":6},{"language":"default","tag":"Documents","count":5},{"language":"default","tag":"Inference","count":5},{"language":"default","tag":"BYOC","count":2},{"language":"default","tag":"Health","count":1}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/benchmarks/upload-benchmark","slug":"/api-reference/benchmarks/upload-benchmark","pageMetadata":{"title":"Upload Benchmark","description":"Upload a pre-prepared benchmark file of instruction and response samples.\n\n\nThis endpoint allows you to upload a JSON file containing benchmark samples, associating it with a specific document for evaluation purposes.\n\n\n**Request Body (multipart/form-data):**\n\n- `file`: JSON file containing benchmark samples (required)\n- `benchmark_name`: Display name for the benchmark (required)\n- `document_id`: Document ID that this benchmark is based on (required)\n- `description` (optional): Description of the benchmark\n\n\n**File Format:**\n\nThe uploaded JSON file should contain an array of sample objects. Each sample should have:\n\n```json\n[\n {\n \"sample_num\": 1,\n \"instruction\": \"What is...\",\n \"response\": \"The response is...\"\n }\n]\n```\n\n\n**Returns:**\n\n- `benchmark_id`: Unique identifier for the uploaded benchmark\n- `benchmark_name`: Name of the benchmark\n- `status`: Upload status (`PROCESSING`, `READY`, `FAILED`)\n- `samples`: List of benchmark sample objects, each containing:\n - `sample_num`: Sample number\n - `instruction`: Instruction text\n - `response`: Expected response text\n- `n_samples`: Total number of samples in the benchmark\n\n\n**Raises:**\n\n- `400`: If file format is invalid, JSON structure is incorrect, or document_id is not found\n- `413`: If file size exceeds limit\n\n\n**Example Request:**\n\n```\nPOST /api/v3/benchmarks/upload\nHeaders: {\"Authorization\": \"Bearer \u003capi_key>\"}\nContent-Type: multipart/form-data\n\nForm Data:\n file: benchmark_questions.json\n name: \"Contract Clause Review\"\n document_id: \"document_01k4x9m2p7q3r5s8\"\n description: \"Benchmark for contract clause extraction\"\n```\n\n\n**Example Response:**\n\n```json\n{\n \"benchmark_id\": \"benchmark_01k4x9m2p7q3r6a1\",\n \"benchmark_name\": \"My Benchmark\",\n \"status\": \"READY\",\n \"samples\": [\n {\n \"sample_num\": 1,\n \"instruction\": \"How do I reset my password?\",\n \"response\": \"You can reset your password by clicking the 'Forgot Password' link on the login page.\"\n },\n {\n \"sample_num\": 2,\n \"instruction\": \"What are the system requirements?\",\n \"response\": \"The system requires a modern web browser with JavaScript enabled.\"\n }\n ],\n \"n_samples\": 2\n}\n```\n\n\n**Notes:**\n\n- File must be in valid JSON format with proper sample structure\n- Each sample must include `sample_num`, `instruction`, and `response` fields\n- The benchmark is immediately available for use in evaluations after upload\n- The `document_id` provided in the request is stored internally and will appear as a single-element `documents` array (e.g., `[\"document_01k4x9m2p7q3r5s8\"]`) when retrieving the benchmark via `/benchmarks/list` or `/benchmarks/{id}/data` endpoints","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json post /api/v3/benchmarks/upload","href":"/api-reference/benchmarks/upload-benchmark","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n li: \"li\",\n p: \"p\",\n pre: \"pre\",\n span: \"span\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n }, {CodeBlock} = _components;\n if (!CodeBlock) _missingMdxReference(\"CodeBlock\", true);\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Upload a pre-prepared benchmark file of instruction and response samples.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"This endpoint allows you to upload a JSON file containing benchmark samples, associating it with a specific document for evaluation purposes.\"\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Request Body (multipart/form-data):\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"file\"\n }), \": JSON file containing benchmark samples (required)\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"benchmark_name\"\n }), \": Display name for the benchmark (required)\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"document_id\"\n }), \": Document ID that this benchmark is based on (required)\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"description\"\n }), \" (optional): Description of the benchmark\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"File Format:\"\n })\n }), \"\\n\", _jsx(_components.p, {\n children: \"The uploaded JSON file should contain an array of sample objects. Each sample should have:\"\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"7\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"7\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"[\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"sample_num\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"instruction\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"What is...\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"response\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"The response is...\\\"\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"]\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Returns:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"benchmark_id\"\n }), \": Unique identifier for the uploaded benchmark\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"benchmark_name\"\n }), \": Name of the benchmark\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"status\"\n }), \": Upload status (\", _jsx(_components.code, {\n children: \"PROCESSING\"\n }), \", \", _jsx(_components.code, {\n children: \"READY\"\n }), \", \", _jsx(_components.code, {\n children: \"FAILED\"\n }), \")\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"samples\"\n }), \": List of benchmark sample objects, each containing:\", \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"sample_num\"\n }), \": Sample number\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"instruction\"\n }), \": Instruction text\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"response\"\n }), \": Expected response text\"]\n }), \"\\n\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"n_samples\"\n }), \": Total number of samples in the benchmark\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Raises:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"400\"\n }), \": If file format is invalid, JSON structure is incorrect, or document_id is not found\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"413\"\n }), \": If file size exceeds limit\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Example Request:\"\n })\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"10\",\n language: \"text\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"text\",\n children: _jsxs(_components.code, {\n language: \"text\",\n numberOfLines: \"10\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n children: \"POST /api/v3/benchmarks/upload\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n children: \"Headers: {\\\"Authorization\\\": \\\"Bearer \u003capi_key>\\\"}\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n children: \"Content-Type: multipart/form-data\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {})\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n children: \"Form Data:\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n children: \" file: benchmark_questions.json\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n children: \" name: \\\"Contract Clause Review\\\"\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n children: \" document_id: \\\"document_01k4x9m2p7q3r5s8\\\"\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n children: \" description: \\\"Benchmark for contract clause extraction\\\"\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {})\n })]\n })\n })\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Example Response:\"\n })\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"18\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"18\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"benchmark_id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"benchmark_01k4x9m2p7q3r6a1\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"benchmark_name\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"My Benchmark\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"status\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"READY\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"samples\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"sample_num\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"instruction\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"How do I reset my password?\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"response\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"You can reset your password by clicking the 'Forgot Password' link on the login page.\\\"\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"sample_num\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"2\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"instruction\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"What are the system requirements?\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"response\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"The system requires a modern web browser with JavaScript enabled.\\\"\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" ],\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"n_samples\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"2\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Notes:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsx(_components.li, {\n children: \"File must be in valid JSON format with proper sample structure\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Each sample must include \", _jsx(_components.code, {\n children: \"sample_num\"\n }), \", \", _jsx(_components.code, {\n children: \"instruction\"\n }), \", and \", _jsx(_components.code, {\n children: \"response\"\n }), \" fields\"]\n }), \"\\n\", _jsx(_components.li, {\n children: \"The benchmark is immediately available for use in evaluations after upload\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"The \", _jsx(_components.code, {\n children: \"document_id\"\n }), \" provided in the request is stored internally and will appear as a single-element \", _jsx(_components.code, {\n children: \"documents\"\n }), \" array (e.g., \", _jsx(_components.code, {\n children: \"[\\\"document_01k4x9m2p7q3r5s8\\\"]\"\n }), \") when retrieving the benchmark via \", _jsx(_components.code, {\n children: \"/benchmarks/list\"\n }), \" or \", _jsx(_components.code, {\n children: \"/benchmarks/{id}/data\"\n }), \" endpoints\"]\n }), \"\\n\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\nfunction _missingMdxReference(id, component) {\n throw new Error(\"Expected \" + (component ? \"component\" : \"object\") + \" `\" + id + \"` to be defined: you likely forgot to import, pass, or provide it.\");\n}\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Upload Benchmark","description":"Upload a pre-prepared benchmark file of instruction and response samples.\n\n\nThis endpoint allows you to upload a JSON file containing benchmark samples, associating it with a specific document for evaluation purposes.\n\n\n**Request Body (multipart/form-data):**\n\n- `file`: JSON file containing benchmark samples (required)\n- `benchmark_name`: Display name for the benchmark (required)\n- `document_id`: Document ID that this benchmark is based on (required)\n- `description` (optional): Description of the benchmark\n\n\n**File Format:**\n\nThe uploaded JSON file should contain an array of sample objects. Each sample should have:\n\n```json\n[\n {\n \"sample_num\": 1,\n \"instruction\": \"What is...\",\n \"response\": \"The response is...\"\n }\n]\n```\n\n\n**Returns:**\n\n- `benchmark_id`: Unique identifier for the uploaded benchmark\n- `benchmark_name`: Name of the benchmark\n- `status`: Upload status (`PROCESSING`, `READY`, `FAILED`)\n- `samples`: List of benchmark sample objects, each containing:\n - `sample_num`: Sample number\n - `instruction`: Instruction text\n - `response`: Expected response text\n- `n_samples`: Total number of samples in the benchmark\n\n\n**Raises:**\n\n- `400`: If file format is invalid, JSON structure is incorrect, or document_id is not found\n- `413`: If file size exceeds limit\n\n\n**Example Request:**\n\n```\nPOST /api/v3/benchmarks/upload\nHeaders: {\"Authorization\": \"Bearer \u003capi_key>\"}\nContent-Type: multipart/form-data\n\nForm Data:\n file: benchmark_questions.json\n name: \"Contract Clause Review\"\n document_id: \"document_01k4x9m2p7q3r5s8\"\n description: \"Benchmark for contract clause extraction\"\n```\n\n\n**Example Response:**\n\n```json\n{\n \"benchmark_id\": \"benchmark_01k4x9m2p7q3r6a1\",\n \"benchmark_name\": \"My Benchmark\",\n \"status\": \"READY\",\n \"samples\": [\n {\n \"sample_num\": 1,\n \"instruction\": \"How do I reset my password?\",\n \"response\": \"You can reset your password by clicking the 'Forgot Password' link on the login page.\"\n },\n {\n \"sample_num\": 2,\n \"instruction\": \"What are the system requirements?\",\n \"response\": \"The system requires a modern web browser with JavaScript enabled.\"\n }\n ],\n \"n_samples\": 2\n}\n```\n\n\n**Notes:**\n\n- File must be in valid JSON format with proper sample structure\n- Each sample must include `sample_num`, `instruction`, and `response` fields\n- The benchmark is immediately available for use in evaluations after upload\n- The `document_id` provided in the request is stored internally and will appear as a single-element `documents` array (e.g., `[\"document_01k4x9m2p7q3r5s8\"]`) when retrieving the benchmark via `/benchmarks/list` or `/benchmarks/{id}/data` endpoints","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json post /api/v3/benchmarks/upload","href":"/api-reference/benchmarks/upload-benchmark","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Benchmarks"],"summary":"Upload Benchmark","description":"Upload a pre-prepared benchmark file of instruction and response samples.\n\n\nThis endpoint allows you to upload a JSON file containing benchmark samples, associating it with a specific document for evaluation purposes.\n\n\n**Request Body (multipart/form-data):**\n\n- `file`: JSON file containing benchmark samples (required)\n- `benchmark_name`: Display name for the benchmark (required)\n- `document_id`: Document ID that this benchmark is based on (required)\n- `description` (optional): Description of the benchmark\n\n\n**File Format:**\n\nThe uploaded JSON file should contain an array of sample objects. Each sample should have:\n\n```json\n[\n {\n \"sample_num\": 1,\n \"instruction\": \"What is...\",\n \"response\": \"The response is...\"\n }\n]\n```\n\n\n**Returns:**\n\n- `benchmark_id`: Unique identifier for the uploaded benchmark\n- `benchmark_name`: Name of the benchmark\n- `status`: Upload status (`PROCESSING`, `READY`, `FAILED`)\n- `samples`: List of benchmark sample objects, each containing:\n - `sample_num`: Sample number\n - `instruction`: Instruction text\n - `response`: Expected response text\n- `n_samples`: Total number of samples in the benchmark\n\n\n**Raises:**\n\n- `400`: If file format is invalid, JSON structure is incorrect, or document_id is not found\n- `413`: If file size exceeds limit\n\n\n**Example Request:**\n\n```\nPOST /api/v3/benchmarks/upload\nHeaders: {\"Authorization\": \"Bearer \u003capi_key>\"}\nContent-Type: multipart/form-data\n\nForm Data:\n file: benchmark_questions.json\n name: \"Contract Clause Review\"\n document_id: \"document_01k4x9m2p7q3r5s8\"\n description: \"Benchmark for contract clause extraction\"\n```\n\n\n**Example Response:**\n\n```json\n{\n \"benchmark_id\": \"benchmark_01k4x9m2p7q3r6a1\",\n \"benchmark_name\": \"My Benchmark\",\n \"status\": \"READY\",\n \"samples\": [\n {\n \"sample_num\": 1,\n \"instruction\": \"How do I reset my password?\",\n \"response\": \"You can reset your password by clicking the 'Forgot Password' link on the login page.\"\n },\n {\n \"sample_num\": 2,\n \"instruction\": \"What are the system requirements?\",\n \"response\": \"The system requires a modern web browser with JavaScript enabled.\"\n }\n ],\n \"n_samples\": 2\n}\n```\n\n\n**Notes:**\n\n- File must be in valid JSON format with proper sample structure\n- Each sample must include `sample_num`, `instruction`, and `response` fields\n- The benchmark is immediately available for use in evaluations after upload\n- The `document_id` provided in the request is stored internally and will appear as a single-element `documents` array (e.g., `[\"document_01k4x9m2p7q3r5s8\"]`) when retrieving the benchmark via `/benchmarks/list` or `/benchmarks/{id}/data` endpoints","operationId":"benchmarks_upload","requestBody":"477e67e1-428c-4c91-8526-cea127a17d83","responses":{"200":"695cbf74-67fe-49db-90bc-a7d656f0b0a6","401":"0ab812f7-5d00-49c2-b6c1-8c9fd5455f9d","403":"b8f8f778-c3dd-4b15-941d-438e798c5b05","422":"85da1244-80b1-4747-b1ec-8b7f68cb9691"},"security":["0e0b4109-7d92-4b62-9844-bbfb0c56226f"],"x-order":24,"method":"post","type":"path","servers":["446c7e81-4e2f-48c8-990b-adca5cc36d70"],"path":"/api/v3/benchmarks/upload","baseUrlOptions":["https://api.nugen.in"],"title":"Upload Benchmark","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"type":"string","format":"binary","title":"File","description":"JSON file containing benchmark questions","examples":["benchmark_questions.json"],"isRequired":true,"uniqueKey":"file","typeLabel":"file"},"document_id":{"type":"string","title":"Document Id","description":"Document ID that this benchmark is based on","examples":["document_01k4x9m2p7q3r5s8"],"isRequired":true,"uniqueKey":"document_id","typeLabel":"string"},"name":{"oneOf":[{"type":"string","title":"Name","description":"Benchmark name. Defaults to the benchmark id if omitted.","example":"Contract Clause Review","uniqueKey":"name.oneOf.0","typeLabel":"string"},{"type":"null","title":"Name","description":"Benchmark name. Defaults to the benchmark id if omitted.","example":"Contract Clause Review","uniqueKey":"name.oneOf.1","typeLabel":"null"}],"uniqueKey":"name","typeLabel":"string | null"},"description":{"oneOf":[{"type":"string","title":"Description","description":"Benchmark description","example":"Benchmark for contract clause extraction","uniqueKey":"description.oneOf.0","typeLabel":"string"},{"type":"null","title":"Description","description":"Benchmark description","example":"Benchmark for contract clause extraction","uniqueKey":"description.oneOf.1","typeLabel":"null"}],"uniqueKey":"description","typeLabel":"string | null"}},"type":"object","required":["file","document_id"],"title":"Body_benchmarks_upload","description":"Multipart form to upload a benchmark file.","uniqueKey":"","typeLabel":"Body_benchmarks_upload · object"},"examples":{"Example":{"title":"Example","value":{"file":"benchmark_questions.json","document_id":"document_01k4x9m2p7q3r5s8","name":"Contract Clause Review","description":"Benchmark for contract clause extraction"}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"695cbf74-67fe-49db-90bc-a7d656f0b0a6":{"description":"Returns the details of the uploaded benchmark including its unique identifier, name, status, and the list of samples with expected responses","content":{"application/json":{"schema":{"properties":{"benchmark_id":{"type":"string","title":"Benchmark Id","description":"Unique identifier for the benchmark","examples":["benchmark_01k4x9m2p7q3r6a1"],"isRequired":true,"uniqueKey":"benchmark_id","typeLabel":"string"},"benchmark_name":{"type":"string","title":"Benchmark Name","description":"Name of the benchmark","examples":["My Benchmark"],"isRequired":true,"uniqueKey":"benchmark_name","typeLabel":"string"},"status":{"type":"string","enum":["QUEUED","PROCESSING","READY","FAILED","STOPPED"],"title":"ResourceStatus","description":"Status of the benchmark","examples":["PROCESSING"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"n_samples":{"type":"integer","title":"N Samples","description":"Number of samples in the benchmark","examples":[10],"isRequired":true,"uniqueKey":"n_samples","typeLabel":"integer"},"samples":{"items":{"properties":{"sample_num":{"type":"integer","title":"Sample Num","description":"Sample number","isRequired":true,"uniqueKey":"samples.items.[INDEX].sample_num","typeLabel":"integer"},"instruction":{"type":"string","title":"Instruction","description":"Instruction text","isRequired":true,"uniqueKey":"samples.items.[INDEX].instruction","typeLabel":"string"},"response":{"type":"string","title":"Response","description":"Expected response text","isRequired":true,"uniqueKey":"samples.items.[INDEX].response","typeLabel":"string"},"image_url":{"oneOf":[{"type":"string","title":"Image Url","description":"Image URL for vision samples","uniqueKey":"samples.items.[INDEX].image_url.oneOf.0","typeLabel":"string"},{"type":"null","title":"Image Url","description":"Image URL for vision samples","uniqueKey":"samples.items.[INDEX].image_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"samples.items.[INDEX].image_url","typeLabel":"string | null"}},"type":"object","required":["sample_num","instruction","response"],"title":"BenchmarkSample","description":"One sample of a benchmark.","uniqueKey":"samples.items.[INDEX]","typeLabel":"BenchmarkSample · object"},"type":"array","title":"Samples","description":"List of uploaded benchmark samples","uniqueKey":"samples","typeLabel":"BenchmarkSample · object[]"}},"type":"object","required":["benchmark_id","benchmark_name","status","n_samples"],"title":"BenchmarkUploadResponse","description":"Acknowledgement of an uploaded benchmark.","uniqueKey":"","typeLabel":"BenchmarkUploadResponse · object"},"examples":{"Example":{"title":"Example","value":{"benchmark_id":"benchmark_01k4x9m2p7q3r6a1","benchmark_name":"My Benchmark","status":"PROCESSING","n_samples":10,"samples":[{"sample_num":123,"instruction":"\u003cstring>","response":"\u003cstring>","image_url":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"0ab812f7-5d00-49c2-b6c1-8c9fd5455f9d":{"description":"Invalid API key","content":{"application/json":{"schema":{"description":"Body of an error response.","properties":{"detail":{"oneOf":[{"type":"string","title":"Detail","description":"Human readable explanation of the error, or an object with a message and the id of the resource concerned","example":"Model not found","isRequired":true,"uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"object","title":"ErrorDetail","description":"Structured error detail: a message, with the id of the resource it concerns as an extra key.","required":["message"],"example":"Model not found","properties":{"message":{"description":"Human readable explanation of the error","title":"Message","type":"string","isRequired":true,"uniqueKey":"detail.oneOf.1.message","typeLabel":"string"}},"additionalProperties":true,"isRequired":true,"uniqueKey":"detail.oneOf.1","typeLabel":"ErrorDetail · object"}],"isRequired":true,"uniqueKey":"detail","typeLabel":"string | ErrorDetail · object"}},"required":["detail"],"title":"ErrorResponse","type":"object","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"detail":"Model not found"}}},"exampleType":"generated"}},"exampleType":"generated"},"b8f8f778-c3dd-4b15-941d-438e798c5b05":{"description":"Authorization header missing or not a Bearer token","content":{"application/json":{"schema":{"description":"Body of an error response.","properties":{"detail":{"oneOf":[{"type":"string","title":"Detail","description":"Human readable explanation of the error, or an object with a message and the id of the resource concerned","example":"Model not found","isRequired":true,"uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"object","title":"ErrorDetail","description":"Structured error detail: a message, with the id of the resource it concerns as an extra key.","required":["message"],"example":"Model not found","properties":{"message":{"description":"Human readable explanation of the error","title":"Message","type":"string","isRequired":true,"uniqueKey":"detail.oneOf.1.message","typeLabel":"string"}},"additionalProperties":true,"isRequired":true,"uniqueKey":"detail.oneOf.1","typeLabel":"ErrorDetail · object"}],"isRequired":true,"uniqueKey":"detail","typeLabel":"string | ErrorDetail · object"}},"required":["detail"],"title":"ErrorResponse","type":"object","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"detail":"Model not found"}}},"exampleType":"generated"}},"exampleType":"generated"},"85da1244-80b1-4747-b1ec-8b7f68cb9691":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"oneOf":[{"type":"string","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"integer","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.1","typeLabel":"integer"}],"uniqueKey":"detail.items.[INDEX].loc.items.[INDEX]","typeLabel":"string | integer"},"type":"array","title":"Location","isRequired":true,"uniqueKey":"detail.items.[INDEX].loc","typeLabel":"(string | integer)[]"},"msg":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"detail.items.[INDEX].msg","typeLabel":"string"},"type":{"type":"string","title":"Error Type","isRequired":true,"uniqueKey":"detail.items.[INDEX].type","typeLabel":"string"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError","description":"One request validation problem.","uniqueKey":"detail.items.[INDEX]","typeLabel":"ValidationError · object"},"type":"array","title":"Detail","uniqueKey":"detail","typeLabel":"ValidationError · object[]"}},"type":"object","title":"HTTPValidationError","description":"Body of a request validation error.","uniqueKey":"","typeLabel":"HTTPValidationError · object"},"examples":{"Example":{"title":"Example","value":{"detail":[{"loc":["\u003cstring>"],"msg":"\u003cstring>","type":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"0e0b4109-7d92-4b62-9844-bbfb0c56226f":{"ApiKeyAuth":{"type":"http","description":"Your Nugen API key, sent as a Bearer token","scheme":"bearer","bearerFormat":"API key","scopes":[],"schemeName":"ApiKeyAuth"}}},"servers":{"446c7e81-4e2f-48c8-990b-adca5cc36d70":{"url":"https://api.nugen.in","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","description":"Your Nugen API key, sent as a Bearer token","scheme":"bearer","bearerFormat":"API key","scopes":[],"schemeName":"ApiKeyAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Your Nugen API key, sent as a Bearer token","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"ApiKeyAuth","name":"Authorization"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"https://api.nugen.in/openapi-public.json"},"subdomain":"courteasy","siteName":"Nugen API Reference Docs","title":"Upload Benchmark - Nugen API Reference Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-30T12:09:16.206Z","originalFileLocation":"api-reference/benchmarks/upload-benchmark.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Upload a pre-prepared benchmark file of instruction and response samples. This endpoint allows you to upload a JSON file containing benchmark samples, associating it with a specific document for evaluation purposes. Request Body (multipart/form-data): - file: JSON file containing benchmark samples (required) - benchmark_name: Display name for the benchmark (required) - document_id: Document ID that this benchmark is based on (required) - description (optional): Description of the benchmark File Format: The uploaded JSON file should contain an array of sample objects. Each sample should have: json [ { \u0026quot;sample_num\u0026quot;: 1, \u0026quot;instruction\u0026quot;: \u0026quot;What is...\u0026quot;, \u0026quot;response\u0026quot;: \u0026quot;The response is...\u0026quot; } ] Returns: - benchmark_id: Unique identifier for the uploaded benchmark - benchmark_name: Name of the benchmark - status: Upload status (PROCESSING, READY, FAILED) - samples: List of benchmark sample objects, each containing: - sample_num: Sample number - instruction: Instruction text - response: Expected response text - n_samples: Total number of samples in the benchmark Raises: - 400: If file format is invalid, JSON structure is incorrect, or document_id is not found - 413: If file size exceeds limit Example Request: POST /api/v3/benchmarks/upload Headers: {\u0026quot;Authorization\u0026quot;: \u0026quot;Bearer \u0026quot;} Content-Type: multipart/form-data Form Data: file: benchmark_questions.json name: \u0026quot;Contract Clause Review\u0026quot; document_id: \u0026quot;document_01k4x9m2p7q3r5s8\u0026quot; description: \u0026quot;Benchmark for contract clause extraction\u0026quot; Example Response: json { \u0026quot;benchmark_id\u0026quot;: \u0026quot;benchmark_01k4x9m2p7q3r6a1\u0026quot;, \u0026quot;benchmark_name\u0026quot;: \u0026quot;My Benchmark\u0026quot;, \u0026quot;status\u0026quot;: \u0026quot;READY\u0026quot;, \u0026quot;samples\u0026quot;: [ { \u0026quot;sample_num\u0026quot;: 1, \u0026quot;instruction\u0026quot;: \u0026quot;How do I reset my password?\u0026quot;, \u0026quot;response\u0026quot;: \u0026quot;You can reset your password by clicking the \u0026#x27;Forgot Password\u0026#x27; link on the login page.\u0026quot; }, { \u0026quot;sample_num\u0026quot;: 2, \u0026quot;instruction\u0026quot;: \u0026quot;What are the system requirements?\u0026quot;, \u0026quot;response\u0026quot;: \u0026quot;The system requires a modern web browser with JavaScript enabled.\u0026quot; } ], \u0026quot;n_samples\u0026quot;: 2 } Notes: - File must be in valid JSON format with proper sample structure - Each sample must include sample_num, instruction, and response fields - The benchmark is immediately available for use in evaluations after upload - The document_id provided in the request is stored internally and will appear as a single-element documents array (e.g., [\u0026quot;document_01k4x9m2p7q3r5s8\u0026quot;]) when retrieving the benchmark via /benchmarks/list or /benchmarks/{id}/data endpoints\">\u003cmeta data-mint-head name=\"application-name\" content=\"Nugen API Reference Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/courteasy/0D-fi3HjPY3grfJo/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/courteasy/0D-fi3HjPY3grfJo/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/courteasy/0D-fi3HjPY3grfJo/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/courteasy/0D-fi3HjPY3grfJo/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/courteasy/0D-fi3HjPY3grfJo/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/courteasy/0D-fi3HjPY3grfJo/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/courteasy/0D-fi3HjPY3grfJo/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/courteasy/0D-fi3HjPY3grfJo/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/courteasy/0D-fi3HjPY3grfJo/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Upload Benchmark - Nugen API Reference Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Upload a pre-prepared benchmark file of instruction and response samples. This endpoint allows you to upload a JSON file containing benchmark samples, associating it with a specific document for evaluation purposes. Request Body (multipart/form-data): - file: JSON file containing benchmark samples (required) - benchmark_name: Display name for the benchmark (required) - document_id: Document ID that this benchmark is based on (required) - description (optional): Description of the benchmark File Format: The uploaded JSON file should contain an array of sample objects. Each sample should have: json [ { \u0026quot;sample_num\u0026quot;: 1, \u0026quot;instruction\u0026quot;: \u0026quot;What is...\u0026quot;, \u0026quot;response\u0026quot;: \u0026quot;The response is...\u0026quot; } ] Returns: - benchmark_id: Unique identifier for the uploaded benchmark - benchmark_name: Name of the benchmark - status: Upload status (PROCESSING, READY, FAILED) - samples: List of benchmark sample objects, each containing: - sample_num: Sample number - instruction: Instruction text - response: Expected response text - n_samples: Total number of samples in the benchmark Raises: - 400: If file format is invalid, JSON structure is incorrect, or document_id is not found - 413: If file size exceeds limit Example Request: POST /api/v3/benchmarks/upload Headers: {\u0026quot;Authorization\u0026quot;: \u0026quot;Bearer \u0026quot;} Content-Type: multipart/form-data Form Data: file: benchmark_questions.json name: \u0026quot;Contract Clause Review\u0026quot; document_id: \u0026quot;document_01k4x9m2p7q3r5s8\u0026quot; description: \u0026quot;Benchmark for contract clause extraction\u0026quot; Example Response: json { \u0026quot;benchmark_id\u0026quot;: \u0026quot;benchmark_01k4x9m2p7q3r6a1\u0026quot;, \u0026quot;benchmark_name\u0026quot;: \u0026quot;My Benchmark\u0026quot;, \u0026quot;status\u0026quot;: \u0026quot;READY\u0026quot;, \u0026quot;samples\u0026quot;: [ { \u0026quot;sample_num\u0026quot;: 1, \u0026quot;instruction\u0026quot;: \u0026quot;How do I reset my password?\u0026quot;, \u0026quot;response\u0026quot;: \u0026quot;You can reset your password by clicking the \u0026#x27;Forgot Password\u0026#x27; link on the login page.\u0026quot; }, { \u0026quot;sample_num\u0026quot;: 2, \u0026quot;instruction\u0026quot;: \u0026quot;What are the system requirements?\u0026quot;, \u0026quot;response\u0026quot;: \u0026quot;The system requires a modern web browser with JavaScript enabled.\u0026quot; } ], \u0026quot;n_samples\u0026quot;: 2 } Notes: - File must be in valid JSON format with proper sample structure - Each sample must include sample_num, instruction, and response fields - The benchmark is immediately available for use in evaluations after upload - The document_id provided in the request is stored internally and will appear as a single-element documents array (e.g., [\u0026quot;document_01k4x9m2p7q3r5s8\u0026quot;]) when retrieving the benchmark via /benchmarks/list or /benchmarks/{id}/data endpoints\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Nugen API Reference Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.nugen.in/api-reference/benchmarks/upload-benchmark\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://courteasy.mintlify.site/_mintlify/api/og/v2?division=Benchmarks\u0026amp;title=Upload+Benchmark\u0026amp;description=Upload+a+pre-prepared+benchmark+file+of+instruction+and+response+samples.%0A%0A%0AThis+endpoint+allows+you+to+upload+a+JSON+file+containing+benchmark+samples%2C+associa\u0026amp;theme=4bbb9e0a87338e6afdf0d548\u0026amp;signature=54625993e23dd5a315c247836e96629f8516448e4ef9549c5db573c064fd6408\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Upload Benchmark - Nugen API Reference Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Upload a pre-prepared benchmark file of instruction and response samples. This endpoint allows you to upload a JSON file containing benchmark samples, associating it with a specific document for evaluation purposes. Request Body (multipart/form-data): - file: JSON file containing benchmark samples (required) - benchmark_name: Display name for the benchmark (required) - document_id: Document ID that this benchmark is based on (required) - description (optional): Description of the benchmark File Format: The uploaded JSON file should contain an array of sample objects. Each sample should have: json [ { \u0026quot;sample_num\u0026quot;: 1, \u0026quot;instruction\u0026quot;: \u0026quot;What is...\u0026quot;, \u0026quot;response\u0026quot;: \u0026quot;The response is...\u0026quot; } ] Returns: - benchmark_id: Unique identifier for the uploaded benchmark - benchmark_name: Name of the benchmark - status: Upload status (PROCESSING, READY, FAILED) - samples: List of benchmark sample objects, each containing: - sample_num: Sample number - instruction: Instruction text - response: Expected response text - n_samples: Total number of samples in the benchmark Raises: - 400: If file format is invalid, JSON structure is incorrect, or document_id is not found - 413: If file size exceeds limit Example Request: POST /api/v3/benchmarks/upload Headers: {\u0026quot;Authorization\u0026quot;: \u0026quot;Bearer \u0026quot;} Content-Type: multipart/form-data Form Data: file: benchmark_questions.json name: \u0026quot;Contract Clause Review\u0026quot; document_id: \u0026quot;document_01k4x9m2p7q3r5s8\u0026quot; description: \u0026quot;Benchmark for contract clause extraction\u0026quot; Example Response: json { \u0026quot;benchmark_id\u0026quot;: \u0026quot;benchmark_01k4x9m2p7q3r6a1\u0026quot;, \u0026quot;benchmark_name\u0026quot;: \u0026quot;My Benchmark\u0026quot;, \u0026quot;status\u0026quot;: \u0026quot;READY\u0026quot;, \u0026quot;samples\u0026quot;: [ { \u0026quot;sample_num\u0026quot;: 1, \u0026quot;instruction\u0026quot;: \u0026quot;How do I reset my password?\u0026quot;, \u0026quot;response\u0026quot;: \u0026quot;You can reset your password by clicking the \u0026#x27;Forgot Password\u0026#x27; link on the login page.\u0026quot; }, { \u0026quot;sample_num\u0026quot;: 2, \u0026quot;instruction\u0026quot;: \u0026quot;What are the system requirements?\u0026quot;, \u0026quot;response\u0026quot;: \u0026quot;The system requires a modern web browser with JavaScript enabled.\u0026quot; } ], \u0026quot;n_samples\u0026quot;: 2 } Notes: - File must be in valid JSON format with proper sample structure - Each sample must include sample_num, instruction, and response fields - The benchmark is immediately available for use in evaluations after upload - The document_id provided in the request is stored internally and will appear as a single-element documents array (e.g., [\u0026quot;document_01k4x9m2p7q3r5s8\u0026quot;]) when retrieving the benchmark via /benchmarks/list or /benchmarks/{id}/data endpoints\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://courteasy.mintlify.site/_mintlify/api/og/v2?division=Benchmarks\u0026amp;title=Upload+Benchmark\u0026amp;description=Upload+a+pre-prepared+benchmark+file+of+instruction+and+response+samples.%0A%0A%0AThis+endpoint+allows+you+to+upload+a+JSON+file+containing+benchmark+samples%2C+associa\u0026amp;theme=4bbb9e0a87338e6afdf0d548\u0026amp;signature=54625993e23dd5a315c247836e96629f8516448e4ef9549c5db573c064fd6408\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/courteasy/0D-fi3HjPY3grfJo/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Nugen API Reference Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#005b96\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.nugen.in/api-reference/benchmarks/upload-benchmark\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/benchmarks/upload-benchmark.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.nugen.in/#organization\",\"name\":\"Nugen API Reference Docs\",\"url\":\"https://docs.nugen.in\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/courteasy/YYugGl8ZAoQlnBYp/logo/light.svg?fit=max\u0026auto=format\u0026n=YYugGl8ZAoQlnBYp\u0026q=85\u0026s=f5f462b08161252f94dca4827e8055a0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.nugen.in#website\",\"name\":\"Nugen API Reference Docs\",\"url\":\"https://docs.nugen.in\",\"publisher\":{\"@id\":\"https://docs.nugen.in/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.nugen.in/api-reference/benchmarks/upload-benchmark#webpage\",\"url\":\"https://docs.nugen.in/api-reference/benchmarks/upload-benchmark\",\"name\":\"Upload Benchmark\",\"description\":\"Upload a pre-prepared benchmark file of instruction and response samples. This endpoint allows you to upload a JSON file containing benchmark samples, associating it with a specific document for evaluation purposes. Request Body (multipart/form-data): - file: JSON file containing benchmark samples (required) - benchmark_name: Display name for the benchmark (required) - document_id: Document ID that this benchmark is based on (required) - description (optional): Description of the benchmark File Format: The uploaded JSON file should contain an array of sample objects. Each sample should have: json [ { \\\"sample_num\\\": 1, \\\"instruction\\\": \\\"What is...\\\", \\\"response\\\": \\\"The response is...\\\" } ] Returns: - benchmark_id: Unique identifier for the uploaded benchmark - benchmark_name: Name of the benchmark - status: Upload status (PROCESSING, READY, FAILED) - samples: List of benchmark sample objects, each containing: - sample_num: Sample number - instruction: Instruction text - response: Expected response text - n_samples: Total number of samples in the benchmark Raises: - 400: If file format is invalid, JSON structure is incorrect, or document_id is not found - 413: If file size exceeds limit Example Request: POST /api/v3/benchmarks/upload Headers: {\\\"Authorization\\\": \\\"Bearer \\\"} Content-Type: multipart/form-data Form Data: file: benchmark_questions.json name: \\\"Contract Clause Review\\\" document_id: \\\"document_01k4x9m2p7q3r5s8\\\" description: \\\"Benchmark for contract clause extraction\\\" Example Response: json { \\\"benchmark_id\\\": \\\"benchmark_01k4x9m2p7q3r6a1\\\", \\\"benchmark_name\\\": \\\"My Benchmark\\\", \\\"status\\\": \\\"READY\\\", \\\"samples\\\": [ { \\\"sample_num\\\": 1, \\\"instruction\\\": \\\"How do I reset my password?\\\", \\\"response\\\": \\\"You can reset your password by clicking the 'Forgot Password' link on the login page.\\\" }, { \\\"sample_num\\\": 2, \\\"instruction\\\": \\\"What are the system requirements?\\\", \\\"response\\\": \\\"The system requires a modern web browser with JavaScript enabled.\\\" } ], \\\"n_samples\\\": 2 } Notes: - File must be in valid JSON format with proper sample structure - Each sample must include sample_num, instruction, and response fields - The benchmark is immediately available for use in evaluations after upload - The document_id provided in the request is stored internally and will appear as a single-element documents array (e.g., [\\\"document_01k4x9m2p7q3r5s8\\\"]) when retrieving the benchmark via /benchmarks/list or /benchmarks/{id}/data endpoints\",\"dateModified\":\"2026-10-30T12:09:16.206Z\",\"isPartOf\":{\"@id\":\"https://docs.nugen.in#website\"},\"breadcrumb\":{\"@id\":\"https://docs.nugen.in/api-reference/benchmarks/upload-benchmark#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.nugen.in/api-reference/benchmarks/upload-benchmark#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Benchmarks\",\"item\":\"https://docs.nugen.in/api-reference/benchmarks/create-benchmark\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Upload Benchmark\",\"item\":\"https://docs.nugen.in/api-reference/benchmarks/upload-benchmark\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.nugen.in/api-reference/benchmarks/upload-benchmark#apireference\",\"headline\":\"Upload Benchmark\",\"name\":\"Upload Benchmark\",\"description\":\"Upload a pre-prepared benchmark file of instruction and response samples. This endpoint allows you to upload a JSON file containing benchmark samples, associating it with a specific document for evaluation purposes. Request Body (multipart/form-data): - file: JSON file containing benchmark samples (required) - benchmark_name: Display name for the benchmark (required) - document_id: Document ID that this benchmark is based on (required) - description (optional): Description of the benchmark File Format: The uploaded JSON file should contain an array of sample objects. Each sample should have: json [ { \\\"sample_num\\\": 1, \\\"instruction\\\": \\\"What is...\\\", \\\"response\\\": \\\"The response is...\\\" } ] Returns: - benchmark_id: Unique identifier for the uploaded benchmark - benchmark_name: Name of the benchmark - status: Upload status (PROCESSING, READY, FAILED) - samples: List of benchmark sample objects, each containing: - sample_num: Sample number - instruction: Instruction text - response: Expected response text - n_samples: Total number of samples in the benchmark Raises: - 400: If file format is invalid, JSON structure is incorrect, or document_id is not found - 413: If file size exceeds limit Example Request: POST /api/v3/benchmarks/upload Headers: {\\\"Authorization\\\": \\\"Bearer \\\"} Content-Type: multipart/form-data Form Data: file: benchmark_questions.json name: \\\"Contract Clause Review\\\" document_id: \\\"document_01k4x9m2p7q3r5s8\\\" description: \\\"Benchmark for contract clause extraction\\\" Example Response: json { \\\"benchmark_id\\\": \\\"benchmark_01k4x9m2p7q3r6a1\\\", \\\"benchmark_name\\\": \\\"My Benchmark\\\", \\\"status\\\": \\\"READY\\\", \\\"samples\\\": [ { \\\"sample_num\\\": 1, \\\"instruction\\\": \\\"How do I reset my password?\\\", \\\"response\\\": \\\"You can reset your password by clicking the 'Forgot Password' link on the login page.\\\" }, { \\\"sample_num\\\": 2, \\\"instruction\\\": \\\"What are the system requirements?\\\", \\\"response\\\": \\\"The system requires a modern web browser with JavaScript enabled.\\\" } ], \\\"n_samples\\\": 2 } Notes: - File must be in valid JSON format with proper sample structure - Each sample must include sample_num, instruction, and response fields - The benchmark is immediately available for use in evaluations after upload - The document_id provided in the request is stored internally and will appear as a single-element documents array (e.g., [\\\"document_01k4x9m2p7q3r5s8\\\"]) when retrieving the benchmark via /benchmarks/list or /benchmarks/{id}/data endpoints\",\"url\":\"https://docs.nugen.in/api-reference/benchmarks/upload-benchmark\",\"mainEntityOfPage\":{\"@id\":\"https://docs.nugen.in/api-reference/benchmarks/upload-benchmark#webpage\"},\"dateModified\":\"2026-10-30T12:09:16.206Z\",\"publisher\":{\"@id\":\"https://docs.nugen.in/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.nugen.in#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Nugen API Reference Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Nugen API Reference Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/benchmarks/upload-benchmark.md","siteName":"Nugen API Reference Docs","nav":{"global":{"anchors":[{"anchor":"API Status","icon":"bolt-lightning","href":"https://status.nugen.in"},{"anchor":"Nugen Intelligence","icon":"earth-asia","href":"https://nugen.in"}]},"tabs":[{"tab":"API Reference","groups":[{"group":"Alignment Projects","pages":[{"title":"Create Alignment","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json post /api/v3/alignment-projects/create","href":"/api-reference/alignment-projects/create-alignment"},{"title":"List Alignment Projects","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/alignment-projects/list","href":"/api-reference/alignment-projects/list-alignment-projects"},{"title":"Get Alignment Project","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/alignment-projects/{alignment_id}","href":"/api-reference/alignment-projects/get-alignment-project"},{"title":"Delete Alignment","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json delete /api/v3/alignment-projects/{alignment_id}","href":"/api-reference/alignment-projects/delete-alignment"},{"title":"Get Alignment Status","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/alignment-projects/{alignment_id}/status","href":"/api-reference/alignment-projects/get-alignment-status"},{"title":"Stop Alignment","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json post /api/v3/alignment-projects/{alignment_id}/stop","href":"/api-reference/alignment-projects/stop-alignment"},{"title":"Start Auto-Align","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json post /api/v3/alignment-projects/{alignment_id}/auto-align","href":"/api-reference/alignment-projects/start-auto-align"}]},{"group":"Models","pages":[{"title":"List Base Models","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/models/base","href":"/api-reference/models/list-base-models"},{"title":"List Aligned Models","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/models/aligned","href":"/api-reference/models/list-aligned-models"},{"title":"Get Model","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/models/{model_id}","href":"/api-reference/models/get-model"},{"title":"Deploy Aligned Model","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json post /api/v3/models/{model_id}/deployment","href":"/api-reference/models/deploy-aligned-model"},{"title":"Undeploy Model","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json delete /api/v3/models/{model_id}/deployment","href":"/api-reference/models/undeploy-model"},{"title":"Get Deployment Status","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/models/{model_id}/deployment/status","href":"/api-reference/models/get-deployment-status"},{"title":"Refresh Deployed Model","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json post /api/v3/models/{model_id}/deployment/refresh","href":"/api-reference/models/refresh-deployed-model"},{"title":"Export to Hugging Face","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json post /api/v3/models/{model_id}/export-hf","href":"/api-reference/models/export-to-hugging-face"},{"title":"Import from Hugging Face","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json post /api/v3/models/base/import","href":"/api-reference/models/import-from-hugging-face"},{"title":"Get the status of a Hugging Face export","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/models/{model_id}/export-hf/status","href":"/api-reference/models/get-the-status-of-a-hugging-face-export"}]},{"group":"Documents","pages":[{"title":"Upload Documents","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json post /api/v3/documents/create","href":"/api-reference/documents/upload-documents"},{"title":"List Documents","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/documents/list","href":"/api-reference/documents/list-documents"},{"title":"Get Document Status","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/documents/{document_id}/status","href":"/api-reference/documents/get-document-status"},{"title":"Get Document","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/documents/{document_id}","href":"/api-reference/documents/get-document"},{"title":"Delete Document","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json delete /api/v3/documents/{document_id}","href":"/api-reference/documents/delete-document"}]},{"group":"Benchmarks","pages":[{"title":"Create Benchmark","description":"Create a new benchmark generation run from documents.\n\n\nThis endpoint starts a benchmark generation run over the documents you name. The generated samplions can be used for model evaluation and testing.\n\n\n**Request Body:**\n\n- `document_ids`: List of document IDs to generate benchmarks from (required)\n- `n_samples`: Number of benchmark samples to generate (required)\n- `benchmark_name` (optional): Display name. Defaults to the benchmark id if omitted\n\n\n**Returns:**\n\n- `benchmark_id`: Unique identifier for tracking generation progress\n- `status`: Initial status (always `QUEUED`)\n\n\n**Raises:**\n\n- `400`: If no documents provided\n- `400`: If document validation fails (missing documents or unauthorized access)\n\n\n**Example Request:**\n\n```json\nPOST /api/v3/benchmarks/create\nHeaders: {\"Authorization\": \"Bearer \u003capi_key>\"}\n\n{\n \"document_ids\": [\"document_01k4x9m2p7q3r5s8\", \"document_01k4x9m2p7q3r5sc\", \"document_01k4x9m2p7q3r5sd\"],\n \"n_samples\": 10\n}\n```\n\n\n**Example Response:**\n\n```json\n{\n \"benchmark_id\": \"benchmark_01k4x9m2p7q3r6a1\",\n \"status\": \"QUEUED\"\n}\n```\n\n\n**Notes:**\n\n- All document IDs are validated before creation to ensure they exist and belong to the user\n- Use the returned benchmark_id with `/benchmarks/{id}/status` endpoint to track generation progress\n- Once completed, the benchmark will be available for use in model evaluations","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json post /api/v3/benchmarks/create","href":"/api-reference/benchmarks/create-benchmark"},{"title":"Upload Benchmark","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json post /api/v3/benchmarks/upload","href":"/api-reference/benchmarks/upload-benchmark"},{"title":"List Benchmarks","description":"Retrieve all benchmarks for the user.\n\n\nThis endpoint returns a paginated list of all benchmarks created or uploaded by the user, including both generated and manually uploaded benchmarks.\n\n\n**Query Parameters:**\n\n- `status` (optional): Filter by benchmark status\n- `limit` (optional): Number of benchmarks to return (1-100, default: 10)\n- `offset` (optional): Number of benchmarks to skip for pagination (default: 0)\n\n\n**Returns:**\n\n- `benchmarks`: List of benchmark objects, each containing:\n - `benchmark_id`: Unique benchmark identifier\n - `benchmark_name`: Display name of the benchmark\n - `status`: Benchmark status (`PROCESSING`, `READY`, `UPLOADED`)\n - `created_at`: Timestamp when benchmark was created\n\n\n**Example Request:**\n\n```json\nGET /api/v3/benchmarks/list\nHeaders: {\"Authorization\": \"Bearer \u003capi_key>\"}\n```\n\n\n**Example Response:**\n\n```json\n{\n \"benchmarks\": [\n {\n \"benchmark_id\": \"benchmark_01k4x9m2p7q3r6a1\",\n \"benchmark_name\": \"Benchmark_document_01k4x9m2p7q3r5se\",\n \"status\": \"READY\",\n \"created_at\": \"2024-01-15T10:30:00Z\"\n },\n {\n \"benchmark_id\": \"benchmark_01k4x9m2p7q3r6a2\",\n \"benchmark_name\": \"Benchmark_document_01k4x9m2p7q3r5sg\",\n \"status\": \"uploaded\",\n \"created_at\": \"2024-01-16T14:20:00Z\"\n }\n ]\n}\n```","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/benchmarks/list","href":"/api-reference/benchmarks/list-benchmarks"},{"title":"Get Benchmark","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/benchmarks/{benchmark_id}","href":"/api-reference/benchmarks/get-benchmark"},{"title":"Delete Benchmark","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json delete /api/v3/benchmarks/{benchmark_id}","href":"/api-reference/benchmarks/delete-benchmark"},{"title":"Get Benchmark Status","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/benchmarks/{benchmark_id}/status","href":"/api-reference/benchmarks/get-benchmark-status"},{"title":"Get Generated Benchmark","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/benchmarks/{benchmark_id}/data","href":"/api-reference/benchmarks/get-generated-benchmark"}]},{"group":"Evaluations","pages":[{"title":"Create Evaluation","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json post /api/v3/evaluations/create","href":"/api-reference/evaluations/create-evaluation"},{"title":"List User Evaluations","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/evaluations/list","href":"/api-reference/evaluations/list-user-evaluations"},{"title":"Get Evaluation","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/evaluations/{evaluation_id}","href":"/api-reference/evaluations/get-evaluation"},{"title":"Delete Evaluation","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json delete /api/v3/evaluations/{evaluation_id}","href":"/api-reference/evaluations/delete-evaluation"},{"title":"Get Evaluation Status","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/evaluations/{evaluation_id}/status","href":"/api-reference/evaluations/get-evaluation-status"},{"title":"Get Evaluation Results","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/evaluations/{evaluation_id}/results","href":"/api-reference/evaluations/get-evaluation-results"}]},{"group":"Inference","pages":[{"title":"Generate Embeddings","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json post /api/v3/inference/embeddings","href":"/api-reference/inference/generate-embeddings"},{"title":"Generate Chat Completions","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json post /api/v3/inference/chat/completions","href":"/api-reference/inference/generate-chat-completions"},{"title":"OpenAI-compatible Responses","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json post /api/v3/inference/responses","href":"/api-reference/inference/openai-compatible-responses"},{"title":"Rerank Documents","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json post /api/v3/inference/reranker","href":"/api-reference/inference/rerank-documents"},{"title":"Inference Settings","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/inference/capture","href":"/api-reference/inference/inference-settings"}]},{"group":"BYOC","pages":[{"title":"Deploy in your own cloud or cluster","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json post /api/v3/byoc/clusters","href":"/api-reference/byoc/deploy-in-your-own-cloud-or-cluster"},{"title":"Get Cluster Health","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /api/v3/byoc/clusters/{cluster_id}/status","href":"/api-reference/byoc/get-cluster-health"}]},{"group":"Health","pages":[{"title":"API Health","deprecated":null,"version":null,"openapi":"https://api.nugen.in/openapi-public.json get /health","href":"/api-reference/health/api-health"}]}]}]},"basePath":"","title":"Upload Benchmark - Nugen API Reference Docs","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CybtLBIt.js","utils-BMLj2fvV.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-B6In562Y.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dr8Mfhp9.js","snippetPresets-2rmQvMVl.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-WMqJYdZj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CJ-MlPHu.js","shallow-dY3TMRCk.js","getApiPlaygroundDisplay-v-1B2bKm.js","CodeSnippet-BDhiTB7U.js","CodeSnippets-D9hnzQcS.js","Page-C4GwDT3_.js","getPastedJson-Th2V45jI.js","icon-BQXch1W9.js","MethodPill-BCqUneP3.js","DuplicateIcon-Q_-bhurZ.js","createIcon-DUjLHRqp.js","DynamicMarkdown-B-f2cqXQ.js","SectionHeading-Da5NsV4v.js","axios-vUo_bRtp.js","Markdown-D13FWkIM.js","clsx-D3Isdib3.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-C-XZBk9h.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink--qIqmmVG.js"]}