{"openapi":"3.1.0","info":{"title":"Evals API","version":"1.0.0"},"paths":{"/v1/evals/runs/{run_id}":{"get":{"operationId":"runs_getRun","summary":"Get run","description":"Run status + verdict + progress (poll while pending/running).","tags":["runs"],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/evals/runs/{run_id}/cancel":{"post":{"operationId":"runs_cancelRun","summary":"Cancel run","description":"Cancel a pending/running run; results persisted so far are kept.","tags":["runs"],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/evals/runs/{run_id}/results":{"get":{"operationId":"runs_listRunResults","summary":"List run results","description":"Per-case results in suite order (partial while the run is live).","tags":["runs"],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CaseResultOut"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/evals/suites/{suite_id}/runs":{"get":{"operationId":"runs_listRuns","summary":"List runs","description":"The suite's runs, newest first, keyset-paginated over (created_at, id).\n\nSame ``{results, next, previous}`` envelope as the other ``/v1`` lists.","tags":["runs"],"parameters":[{"name":"suite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunListPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"runs_triggerRun","summary":"Trigger run","description":"Trigger a run of the suite (single-call).\n\n201 with the created run; execution is asynchronous — poll\n``GET /v1/evals/runs/{id}`` until a terminal status, then branch on\n``passed``. An ``idempotency_key`` that already exists for the suite\nreturns the original run with 200 instead of creating a duplicate. 409\n``run_in_flight`` once the suite's concurrent-run cap is reached.","tags":["runs"],"parameters":[{"name":"suite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunTriggerV1In"}}}},"security":[{"bearerAuth":[]}]}},"/v1/evals/suites":{"get":{"operationId":"suites_listSuites","summary":"List suites","description":"List the org's live suites, keyset-paginated over (created_at, id).\n\nFollows the ``/v1`` platform-API list convention: opaque forward cursor,\n``{results, next, previous}`` envelope.","tags":["suites"],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuiteListPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]},"put":{"operationId":"suites_createOrUpdateSuite","summary":"Create or update suite","description":"Create-or-update a suite by name (idempotent, for CI pipelines).\n\n201 when the suite was created, 200 when an existing live suite with that\nname was updated. Only the fields present in the payload change.","tags":["suites"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuiteOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuiteUpsertV1In"}}}},"security":[{"bearerAuth":[]}]}},"/v1/evals/suites/{suite_id}":{"get":{"operationId":"suites_getSuite","summary":"Get suite","description":"One suite with its cases (grader definitions included).","tags":["suites"],"parameters":[{"name":"suite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuiteDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/evals/suites/{suite_id}/cases":{"put":{"operationId":"cases_syncCases","summary":"Sync cases","description":"Declaratively sync the suite's cases from a repo dataset.\n\nCases are matched by ``external_id``: matched ones are updated in place,\nnew ones created, and (with ``prune``, the default) synced cases missing\nfrom the payload deleted. Dashboard-authored cases are never touched.\nIn-flight runs are unaffected — runs snapshot their cases at trigger time.","tags":["cases"],"parameters":[{"name":"suite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseSyncSummaryV1Out"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseSyncRequestV1In"}}}},"security":[{"bearerAuth":[]}]}},"/v1/evals/suites/{suite_id}/schedule":{"get":{"operationId":"schedules_getSchedule","summary":"Get schedule","description":"The suite's schedule, or null when none is configured.","tags":["schedules"],"parameters":[{"name":"suite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ScheduleOut"},{"type":"null"}]}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]},"put":{"operationId":"schedules_createOrUpdateSchedule","summary":"Create or update schedule","description":"Create or replace the suite's schedule (one per suite).","tags":["schedules"],"parameters":[{"name":"suite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleUpsertIn"}}}},"security":[{"bearerAuth":[]}]},"delete":{"operationId":"schedules_deleteSchedule","summary":"Delete schedule","description":"Remove the suite's schedule.","tags":["schedules"],"parameters":[{"name":"suite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"bearerAuth":[]}]}}},"tags":[{"name":"runs"},{"name":"suites"},{"name":"cases"},{"name":"schedules"}],"servers":[{"url":"https://api-gateway.merge.dev","description":"https://api-gateway.merge.dev"}],"components":{"schemas":{"RunOut":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"suite_id":{"type":"string","format":"uuid"},"target_model":{"type":"string"},"status":{"type":"string"},"trigger_source":{"type":"string"},"execution_mode":{"type":"string","default":"gateway"},"metadata":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"migration_id":{"type":["string","null"],"format":"uuid"},"triggered_by":{"type":["string","null"]},"suite_config_snapshot":{"type":"object","additionalProperties":{"description":"Any type"}},"passed":{"type":["boolean","null"]},"pass_count":{"type":"integer"},"fail_count":{"type":"integer"},"error_count":{"type":"integer"},"total_cost_usd":{"type":["number","null"],"format":"double"},"judge_cost_usd":{"type":["number","null"],"format":"double"},"estimated_cost_usd":{"type":["number","null"],"format":"double"},"trace_id":{"type":["string","null"]},"error":{"type":["string","null"]},"trials":{"type":"integer","default":1},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"total_cases":{"type":"integer","default":0},"completed_cases":{"type":"integer","default":0},"pass_rate":{"type":["number","null"],"format":"double"},"ci_low":{"type":["number","null"],"format":"double"},"ci_high":{"type":["number","null"],"format":"double"}},"required":["id","suite_id","target_model","status","trigger_source","suite_config_snapshot","pass_count","fail_count","error_count","created_at","updated_at"],"title":"RunOut"},"ValidationErrorLocItems":{"oneOf":[{"type":"string"},{"type":"integer"}],"title":"ValidationErrorLocItems"},"ValidationErrorCtx":{"type":"object","properties":{},"title":"ValidationErrorCtx"},"ValidationError":{"type":"object","properties":{"loc":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorLocItems"}},"msg":{"type":"string"},"type":{"type":"string"},"input":{"description":"Any type"},"ctx":{"$ref":"#/components/schemas/ValidationErrorCtx"}},"required":["loc","msg","type"],"title":"ValidationError"},"HTTPValidationError":{"type":"object","properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}},"title":"HTTPValidationError"},"CaseResultOut":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"run_id":{"type":"string","format":"uuid"},"case_id":{"type":["string","null"],"format":"uuid"},"case_snapshot":{"type":"object","additionalProperties":{"description":"Any type"}},"status":{"type":"string"},"model_output":{"type":["string","null"]},"tool_calls":{"type":["array","null"],"items":{"description":"Any type"}},"request_id":{"type":["string","null"]},"latency_ms":{"type":["number","null"],"format":"double"},"cost_usd":{"type":["number","null"],"format":"double"},"grader_results":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"error":{"type":["string","null"]},"trial":{"type":"integer","default":0},"created_at":{"type":"string","format":"date-time"}},"required":["id","run_id","case_snapshot","status","grader_results","created_at"],"title":"CaseResultOut"},"RunListPage":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/RunOut"}},"next":{"type":["string","null"],"description":"Cursor for the next page, or null on the last page"},"previous":{"type":["string","null"],"description":"Always null; reserved"}},"required":["results","next","previous"],"description":"The suite's runs, newest first, keyset-paginated. `next` is an opaque cursor for the following page; pass it back as the `cursor` query parameter.","title":"RunListPage"},"RunTriggerV1InMode":{"type":"string","enum":["gateway","external"],"default":"gateway","title":"RunTriggerV1InMode"},"ExternalOutputIn":{"type":"object","properties":{"external_id":{"type":["string","null"],"minLength":1,"maxLength":120},"name":{"type":["string","null"],"minLength":1,"maxLength":120},"output_text":{"type":["string","null"],"maxLength":65536},"tool_calls":{"type":["array","null"],"items":{"type":"object","additionalProperties":{"description":"Any type"}}}},"description":"One caller-produced output for grading (external runs).","title":"ExternalOutputIn"},"RequestOverridesIn":{"type":"object","properties":{"system":{"type":["string","null"],"maxLength":10000},"params":{"type":["object","null"],"additionalProperties":{"description":"Any type"}}},"description":"Run-level request configuration applied to every case.\n\n``system`` is prepended as the first message of each case (the mechanism\nbehind \"eval prompt v14 against the same dataset\"); ``params`` win over\nper-case request_params and pass the same allowlist.","title":"RequestOverridesIn"},"RunTriggerV1In":{"type":"object","properties":{"target_model":{"type":"string","minLength":1,"maxLength":100},"trials":{"type":"integer","minimum":1,"maximum":5,"default":1},"mode":{"$ref":"#/components/schemas/RunTriggerV1InMode","default":"gateway"},"outputs":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ExternalOutputIn"}},"metadata":{"type":["object","null"],"additionalProperties":{"type":"string"}},"idempotency_key":{"type":["string","null"],"minLength":1,"maxLength":128},"request_overrides":{"oneOf":[{"$ref":"#/components/schemas/RequestOverridesIn"},{"type":"null"}]}},"required":["target_model"],"description":"Single-call run trigger (no two-phase estimate on this surface).\n\n``mode=\"gateway\"`` (default) executes each case through the data plane\nagainst ``target_model``. ``mode=\"external\"`` grades caller-submitted\n``outputs`` instead: ``target_model`` becomes a free-text label for the\nsystem under test, and no model calls are made except judge graders.","title":"RunTriggerV1In"},"SuiteLatestRunOut":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"},"passed":{"type":["boolean","null"]},"target_model":{"type":"string"},"pass_count":{"type":"integer"},"fail_count":{"type":"integer"},"error_count":{"type":"integer"},"completed_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}},"required":["id","status","target_model","pass_count","fail_count","error_count","created_at"],"description":"Compact newest-run summary for the suites list (health at a glance).","title":"SuiteLatestRunOut"},"SuiteOut":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"pass_criteria":{"type":"object","additionalProperties":{"description":"Any type"}},"judge_model":{"type":["string","null"]},"judge_rubric":{"type":["string","null"]},"judge_threshold":{"type":"number","format":"double"},"judge_temperature":{"type":"number","format":"double"},"created_by":{"type":["string","null"]},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"case_count":{"type":"integer","default":0},"latest_run":{"oneOf":[{"$ref":"#/components/schemas/SuiteLatestRunOut"},{"type":"null"}]}},"required":["id","name","pass_criteria","judge_threshold","judge_temperature","created_at","updated_at"],"title":"SuiteOut"},"SuiteListPage":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/SuiteOut"}},"next":{"type":["string","null"],"description":"Cursor for the next page, or null on the last page"},"previous":{"type":["string","null"],"description":"Always null; reserved"}},"required":["results","next","previous"],"description":"Live eval suites, keyset-paginated. `next` is an opaque cursor for the following page; pass it back as the `cursor` query parameter.","title":"SuiteListPage"},"SuiteUpsertV1InPassCriteria":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["all_required"],"description":"Discriminator value: all_required"}},"required":["mode"],"description":"Every enabled case must pass (default)."},{"type":"object","properties":{"mode":{"type":"string","enum":["min_pass_rate"],"description":"Discriminator value: min_pass_rate"},"min_pass_rate":{"type":"number","format":"double","maximum":1,"exclusiveMinimum":0}},"required":["mode","min_pass_rate"],"description":"pass_count / enabled_case_count >= min_pass_rate.\n\nErrors count as failures (conservative), and required cases must still\nall pass regardless of the rate."}],"discriminator":{"propertyName":"mode"},"title":"SuiteUpsertV1InPassCriteria"},"SuiteUpsertV1In":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":["string","null"],"maxLength":2000},"pass_criteria":{"oneOf":[{"$ref":"#/components/schemas/SuiteUpsertV1InPassCriteria"},{"type":"null"}]},"judge_model":{"type":["string","null"],"maxLength":100},"judge_rubric":{"type":["string","null"],"maxLength":10000},"judge_threshold":{"type":["number","null"],"format":"double","minimum":0,"maximum":1},"judge_temperature":{"type":["number","null"],"format":"double","minimum":0,"maximum":2}},"required":["name"],"description":"Create-or-update a suite by name (dataset-as-code entry point).\n\n``name`` is the identity: a live suite with that name is updated (only the\nfields provided), anything else creates one. Optional fields left out on\nan update keep their current values.","title":"SuiteUpsertV1In"},"CaseOut":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"suite_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"external_id":{"type":["string","null"]},"position":{"type":"integer"},"enabled":{"type":"boolean"},"required":{"type":"boolean"},"input_messages":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"request_params":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"graders":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"grader_policy":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","suite_id","name","position","enabled","required","input_messages","graders","grader_policy","created_at","updated_at"],"title":"CaseOut"},"SuiteDetailOut":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"pass_criteria":{"type":"object","additionalProperties":{"description":"Any type"}},"judge_model":{"type":["string","null"]},"judge_rubric":{"type":["string","null"]},"judge_threshold":{"type":"number","format":"double"},"judge_temperature":{"type":"number","format":"double"},"created_by":{"type":["string","null"]},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"case_count":{"type":"integer","default":0},"latest_run":{"oneOf":[{"$ref":"#/components/schemas/SuiteLatestRunOut"},{"type":"null"}]},"cases":{"type":"array","items":{"$ref":"#/components/schemas/CaseOut"}}},"required":["id","name","pass_criteria","judge_threshold","judge_temperature","created_at","updated_at"],"title":"SuiteDetailOut"},"CaseMessageRole":{"type":"string","enum":["system","user","assistant"],"title":"CaseMessageRole"},"CaseMessage":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/CaseMessageRole"},"content":{"type":"string","minLength":1}},"required":["role","content"],"description":"One turn of a case's input, /v1/responses shape (text-only in v1).","title":"CaseMessage"},"JsonFieldGraderOp":{"type":"string","enum":["eq","ne","gt","gte","lt","lte","contains","exists"],"title":"JsonFieldGraderOp"},"RegexGraderFlagsItems":{"type":"string","enum":["i","m","s"],"title":"RegexGraderFlagsItems"},"ToolCallArgAssertionOp":{"type":"string","enum":["eq","ne","gt","gte","lt","lte","contains","exists"],"title":"ToolCallArgAssertionOp"},"ToolCallArgAssertion":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":512},"op":{"$ref":"#/components/schemas/ToolCallArgAssertionOp"},"value":{"description":"Any type"}},"required":["path","op"],"description":"Assertion against one path in a tool call's arguments.","title":"ToolCallArgAssertion"},"CaseSyncInGradersItems":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["contains"]},"value":{"type":"string","minLength":1},"case_sensitive":{"type":"boolean","default":false}},"required":["type","value"],"description":"Output text contains the value."},{"type":"object","properties":{"type":{"type":"string","enum":["exact_match"]},"expected":{"type":"string"},"case_sensitive":{"type":"boolean","default":false},"strip":{"type":"boolean","default":true}},"required":["type","expected"],"description":"Output text equals the expected string."},{"type":"object","properties":{"type":{"type":"string","enum":["json_field"]},"path":{"type":"string","minLength":1,"maxLength":512},"op":{"$ref":"#/components/schemas/JsonFieldGraderOp"},"value":{"description":"Any type"}},"required":["type","path","op"],"description":"A dot/bracket path into the parsed output JSON satisfies an op.\n\nPath grammar: dot-separated keys with optional [N] list indices, e.g.\n\"result.items[0].sku\". Evaluated by the small path walker in\napp/services/experiment_graders.py (deliberately not full JSONPath)."},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"schema":{"type":"object","additionalProperties":{"description":"Any type"}}},"required":["type","schema"],"description":"Parsed output JSON validates against the customer's JSON Schema."},{"type":"object","properties":{"type":{"type":"string","enum":["llm_judge"]},"rubric":{"type":["string","null"],"maxLength":10000},"threshold":{"type":["number","null"],"format":"double","minimum":0,"maximum":1},"judge_model":{"type":["string","null"],"maxLength":100},"expected":{"type":["string","null"],"maxLength":10000}},"required":["type"],"description":"LLM-as-judge: score >= threshold passes.\n\nNulls inherit the suite's judge defaults (model, rubric, threshold),\nwhich themselves fall back to the shipped defaults in\napp/services/experiment_templates.py. ``expected`` is an optional\nreference answer included in the judge prompt (\"grade the output against\nthis expected answer\")."},{"type":"object","properties":{"type":{"type":"string","enum":["not_contains"]},"value":{"type":"string","minLength":1},"case_sensitive":{"type":"boolean","default":false}},"required":["type","value"],"description":"Output text does NOT contain the value."},{"type":"object","properties":{"type":{"type":"string","enum":["regex"]},"pattern":{"type":"string","minLength":1,"maxLength":512},"flags":{"type":"array","items":{"$ref":"#/components/schemas/RegexGraderFlagsItems"}}},"required":["type","pattern"],"description":"Output text matches the pattern (re.search semantics)."},{"type":"object","properties":{"type":{"type":"string","enum":["tool_call"]},"tool_name":{"type":"string","minLength":1,"maxLength":200},"must_be_called":{"type":"boolean","default":true},"arg_assertions":{"type":"array","items":{"$ref":"#/components/schemas/ToolCallArgAssertion"}}},"required":["type","tool_name"],"description":"The model called (or refrained from calling) a tool correctly."}],"discriminator":{"propertyName":"type"},"title":"CaseSyncInGradersItems"},"CaseSyncInGraderPolicy":{"type":"string","enum":["all","any"],"default":"all","title":"CaseSyncInGraderPolicy"},"CaseSyncIn":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"input_messages":{"type":"array","items":{"$ref":"#/components/schemas/CaseMessage"}},"request_params":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"graders":{"type":"array","items":{"$ref":"#/components/schemas/CaseSyncInGradersItems"}},"grader_policy":{"$ref":"#/components/schemas/CaseSyncInGraderPolicy","default":"all"},"enabled":{"type":"boolean","default":true},"required":{"type":"boolean","default":true},"position":{"type":["integer","null"],"minimum":0},"external_id":{"type":"string","minLength":1,"maxLength":120}},"required":["name","input_messages","graders","external_id"],"description":"One case in a declarative sync payload: a dashboard case shape plus the\nrequired sync key. ``position`` is ignored — sync appends new cases.","title":"CaseSyncIn"},"CaseSyncRequestV1In":{"type":"object","properties":{"cases":{"type":"array","items":{"$ref":"#/components/schemas/CaseSyncIn"}},"prune":{"type":"boolean","default":true}},"required":["cases"],"title":"CaseSyncRequestV1In"},"CaseSyncSummaryV1Out":{"type":"object","properties":{"created":{"type":"integer"},"updated":{"type":"integer"},"deleted":{"type":"integer"},"unchanged":{"type":"integer"}},"required":["created","updated","deleted","unchanged"],"title":"CaseSyncSummaryV1Out"},"ScheduleOut":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"suite_id":{"type":"string","format":"uuid"},"target_model":{"type":"string"},"trials":{"type":"integer"},"interval_hours":{"type":"integer"},"is_enabled":{"type":"boolean"},"next_run_at":{"type":"string","format":"date-time"},"last_run_id":{"type":["string","null"],"format":"uuid"},"created_by":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","suite_id","target_model","trials","interval_hours","is_enabled","next_run_at","created_at","updated_at"],"title":"ScheduleOut"},"ScheduleUpsertIn":{"type":"object","properties":{"target_model":{"type":"string","minLength":1,"maxLength":100},"trials":{"type":"integer","minimum":1,"maximum":5,"default":1},"interval_hours":{"type":"integer"},"is_enabled":{"type":"boolean","default":true}},"required":["target_model","interval_hours"],"title":"ScheduleUpsertIn"}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Your gateway API key (mg_ prefix), the same key used for /v1/responses"}}}}