{"openapi":"3.1.0","info":{"title":"ModelWatch API","description":"Continuous behavioral drift monitoring for LLM-powered applications","version":"0.1.0"},"paths":{"/api/auth/signup":{"post":{"tags":["auth"],"summary":"Signup","description":"Self-serve signup. Creates workspace + API key, emails the key.","operationId":"signup_api_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/rotate-key":{"post":{"tags":["auth"],"summary":"Rotate Api Key","description":"Rotate the workspace API key. Old key is invalidated immediately.","operationId":"rotate_api_key_api_auth_rotate_key_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/workspaces/me":{"get":{"tags":["workspaces"],"summary":"Get My Workspace","operationId":"get_my_workspace_api_workspaces_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceOut"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["workspaces"],"summary":"Update My Workspace","operationId":"update_my_workspace_api_workspaces_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/workspaces/me/api-keys":{"get":{"tags":["workspaces"],"summary":"List Api Keys","operationId":"list_api_keys_api_workspaces_me_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyOut"},"type":"array","title":"Response List Api Keys Api Workspaces Me Api Keys Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["workspaces"],"summary":"Add Api Key","operationId":"add_api_key_api_workspaces_me_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/workspaces/me/api-keys/{key_id}":{"delete":{"tags":["workspaces"],"summary":"Delete Api Key","operationId":"delete_api_key_api_workspaces_me_api_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/endpoints":{"get":{"tags":["endpoints"],"summary":"List Endpoints","operationId":"list_endpoints_api_endpoints_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EndpointOut"},"type":"array","title":"Response List Endpoints Api Endpoints Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["endpoints"],"summary":"Create Endpoint","operationId":"create_endpoint_api_endpoints_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/endpoints/{endpoint_id}":{"get":{"tags":["endpoints"],"summary":"Get Endpoint","operationId":"get_endpoint_api_endpoints__endpoint_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["endpoints"],"summary":"Update Endpoint","operationId":"update_endpoint_api_endpoints__endpoint_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["endpoints"],"summary":"Delete Endpoint","operationId":"delete_endpoint_api_endpoints__endpoint_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/specs":{"post":{"tags":["specs"],"summary":"Create Spec","operationId":"create_spec_api_specs_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"endpoint_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["specs"],"summary":"List Specs","operationId":"list_specs_api_specs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"endpoint_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Endpoint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpecOut"},"title":"Response List Specs Api Specs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/specs/{spec_id}":{"get":{"tags":["specs"],"summary":"Get Spec","operationId":"get_spec_api_specs__spec_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Spec Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["specs"],"summary":"Update Spec","operationId":"update_spec_api_specs__spec_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Spec Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["specs"],"summary":"Delete Spec","operationId":"delete_spec_api_specs__spec_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Spec Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/specs/{spec_id}/run":{"post":{"tags":["specs"],"summary":"Trigger Run","description":"Manually trigger a run for a spec.","operationId":"trigger_run_api_specs__spec_id__run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Spec Id"}}],"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"}}}}}}},"/api/specs/{spec_id}/runs":{"get":{"tags":["specs"],"summary":"List Runs","operationId":"list_runs_api_specs__spec_id__runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Spec Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RunOut"},"title":"Response List Runs Api Specs  Spec Id  Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/specs/{spec_id}/drift-events":{"get":{"tags":["specs"],"summary":"List Drift Events","operationId":"list_drift_events_api_specs__spec_id__drift_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Spec Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DriftEventOut"},"title":"Response List Drift Events Api Specs  Spec Id  Drift Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/specs/{spec_id}/reset-baseline":{"post":{"tags":["specs"],"summary":"Reset Baseline","description":"Clear baseline so the next run becomes the new baseline.","operationId":"reset_baseline_api_specs__spec_id__reset_baseline_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Spec Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dashboard/health":{"get":{"tags":["dashboard"],"summary":"Spec Health Overview","description":"Get health status for every spec in the workspace.","operationId":"spec_health_overview_api_dashboard_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SpecHealth"},"type":"array","title":"Response Spec Health Overview Api Dashboard Health Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/dashboard/drift-trends":{"get":{"tags":["dashboard"],"summary":"Drift Trends","description":"Get drift score over time for all specs (or a specific one).","operationId":"drift_trends_api_dashboard_drift_trends_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":7,"title":"Days"}},{"name":"spec_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Spec Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DriftTrend"},"title":"Response Drift Trends Api Dashboard Drift Trends Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dashboard/recent-events":{"get":{"tags":["dashboard"],"summary":"Recent Drift Events","description":"Get the most recent drift events across all specs.","operationId":"recent_drift_events_api_dashboard_recent_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DriftEventOut"},"title":"Response Recent Drift Events Api Dashboard Recent Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/checkout":{"post":{"tags":["billing"],"summary":"Create Checkout","operationId":"create_checkout_api_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/webhook":{"post":{"tags":["billing"],"summary":"Stripe Webhook","description":"Handle Stripe webhook events.","operationId":"stripe_webhook_api_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/badge/{workspace_id}.svg":{"get":{"tags":["badge"],"summary":"Get Badge","description":"Return a shields.io-style SVG badge showing monitoring status.","operationId":"get_badge_api_badge__workspace_id__svg_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ApiKeyCreate":{"properties":{"provider":{"$ref":"#/components/schemas/Provider"},"api_key":{"type":"string","minLength":1,"title":"Api Key"},"label":{"type":"string","title":"Label","default":"default"}},"type":"object","required":["provider","api_key"],"title":"ApiKeyCreate"},"ApiKeyOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"provider":{"$ref":"#/components/schemas/Provider"},"label":{"type":"string","title":"Label"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","provider","label","created_at"],"title":"ApiKeyOut"},"CheckoutRequest":{"properties":{"plan":{"$ref":"#/components/schemas/Plan"},"success_url":{"type":"string","title":"Success Url"},"cancel_url":{"type":"string","title":"Cancel Url"}},"type":"object","required":["plan","success_url","cancel_url"],"title":"CheckoutRequest"},"CheckoutResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"}},"type":"object","required":["checkout_url"],"title":"CheckoutResponse"},"DriftEventOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"spec_id":{"type":"string","format":"uuid","title":"Spec Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"severity":{"$ref":"#/components/schemas/DriftSeverity"},"drift_score":{"type":"number","title":"Drift Score"},"format_changed":{"type":"boolean","title":"Format Changed"},"length_drift_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Length Drift Pct"},"semantic_drift":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Semantic Drift"},"refusal_change":{"type":"boolean","title":"Refusal Change"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"email_sent":{"type":"boolean","title":"Email Sent"},"slack_sent":{"type":"boolean","title":"Slack Sent"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","spec_id","run_id","severity","drift_score","format_changed","length_drift_pct","semantic_drift","refusal_change","summary","email_sent","slack_sent","created_at"],"title":"DriftEventOut"},"DriftSeverity":{"type":"string","enum":["none","low","medium","high","critical"],"title":"DriftSeverity"},"DriftTrend":{"properties":{"date":{"type":"string","format":"date-time","title":"Date"},"drift_score":{"type":"number","title":"Drift Score"},"spec_id":{"type":"string","format":"uuid","title":"Spec Id"}},"type":"object","required":["date","drift_score","spec_id"],"title":"DriftTrend"},"EndpointCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"provider":{"$ref":"#/components/schemas/Provider"},"model":{"type":"string","maxLength":255,"minLength":1,"title":"Model"},"system_prompt":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}],"title":"System Prompt"},"temperature":{"type":"number","maximum":2.0,"minimum":0.0,"title":"Temperature","default":0.0},"max_tokens":{"type":"integer","maximum":32768.0,"minimum":1.0,"title":"Max Tokens","default":1024},"extra_params":{"type":"object","title":"Extra Params"}},"type":"object","required":["name","provider","model"],"title":"EndpointCreate"},"EndpointOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"provider":{"$ref":"#/components/schemas/Provider"},"model":{"type":"string","title":"Model"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"temperature":{"type":"number","title":"Temperature"},"max_tokens":{"type":"integer","title":"Max Tokens"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","workspace_id","name","provider","model","system_prompt","temperature","max_tokens","is_active","created_at"],"title":"EndpointOut"},"EndpointUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"system_prompt":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}],"title":"System Prompt"},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature"},"max_tokens":{"anyOf":[{"type":"integer","maximum":32768.0,"minimum":1.0},{"type":"null"}],"title":"Max Tokens"},"extra_params":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Extra Params"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EndpointUpdate"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Plan":{"type":"string","enum":["free","pro","team","enterprise"],"title":"Plan"},"Provider":{"type":"string","enum":["openai","anthropic"],"title":"Provider"},"RunOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"spec_id":{"type":"string","format":"uuid","title":"Spec Id"},"status":{"$ref":"#/components/schemas/RunStatus"},"output_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Text"},"latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Ms"},"token_usage":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Token Usage"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"format_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Format Match"},"length_diff_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Length Diff Pct"},"semantic_similarity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Semantic Similarity"},"refusal_detected":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Refusal Detected"},"drift_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Drift Score"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","spec_id","status","output_text","latency_ms","token_usage","error_message","format_match","length_diff_pct","semantic_similarity","refusal_detected","drift_score","started_at","completed_at","created_at"],"title":"RunOut"},"RunStatus":{"type":"string","enum":["pending","running","completed","failed"],"title":"RunStatus"},"SignupRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"workspace_name":{"type":"string","title":"Workspace Name","default":"My Workspace"}},"type":"object","required":["email"],"title":"SignupRequest"},"SignupResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"email":{"type":"string","title":"Email"},"message":{"type":"string","title":"Message"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},"type":"object","required":["workspace_id","email","message"],"title":"SignupResponse"},"SpecCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Description"},"input_text":{"type":"string","maxLength":20000,"minLength":1,"title":"Input Text"},"expected_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Format"},"expected_json_schema":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Expected Json Schema"},"expected_contains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Expected Contains"},"expected_not_contains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Expected Not Contains"},"min_length":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Min Length"},"max_length":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Max Length"},"semantic_threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Semantic Threshold","default":0.85},"schedule":{"$ref":"#/components/schemas/SpecSchedule","default":"daily"}},"type":"object","required":["name","input_text"],"title":"SpecCreate"},"SpecHealth":{"properties":{"spec_id":{"type":"string","format":"uuid","title":"Spec Id"},"spec_name":{"type":"string","title":"Spec Name"},"endpoint_name":{"type":"string","title":"Endpoint Name"},"status":{"type":"string","title":"Status"},"last_drift_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Drift Score"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"}},"type":"object","required":["spec_id","spec_name","endpoint_name","status","last_drift_score","last_run_at"],"title":"SpecHealth"},"SpecOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"endpoint_id":{"type":"string","format":"uuid","title":"Endpoint Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"input_text":{"type":"string","title":"Input Text"},"expected_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Format"},"expected_contains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Expected Contains"},"expected_not_contains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Expected Not Contains"},"min_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Length"},"max_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Length"},"semantic_threshold":{"type":"number","title":"Semantic Threshold"},"schedule":{"$ref":"#/components/schemas/SpecSchedule"},"is_active":{"type":"boolean","title":"Is Active"},"has_baseline":{"type":"boolean","title":"Has Baseline","default":false},"baseline_set_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Baseline Set At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","endpoint_id","name","description","input_text","expected_format","expected_contains","expected_not_contains","min_length","max_length","semantic_threshold","schedule","is_active","created_at"],"title":"SpecOut"},"SpecSchedule":{"type":"string","enum":["hourly","daily","weekly","on_trigger"],"title":"SpecSchedule"},"SpecUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Description"},"input_text":{"anyOf":[{"type":"string","maxLength":20000,"minLength":1},{"type":"null"}],"title":"Input Text"},"expected_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Format"},"expected_json_schema":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Expected Json Schema"},"expected_contains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Expected Contains"},"expected_not_contains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Expected Not Contains"},"min_length":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Min Length"},"max_length":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Max Length"},"semantic_threshold":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Semantic Threshold"},"schedule":{"anyOf":[{"$ref":"#/components/schemas/SpecSchedule"},{"type":"null"}]},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"SpecUpdate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WorkspaceOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"plan":{"$ref":"#/components/schemas/Plan"},"runs_this_month":{"type":"integer","title":"Runs This Month"},"alert_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alert Email"},"slack_webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slack Webhook Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","name","plan","runs_this_month","alert_email","slack_webhook_url","created_at"],"title":"WorkspaceOut"},"WorkspaceUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"alert_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alert Email"},"slack_webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slack Webhook Url"}},"type":"object","title":"WorkspaceUpdate"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}