{"openapi":"3.1.0","info":{"title":"Duty of Care API","description":"Guidance-grounded pre-review for screenwriters depicting suicide, self-harm, or addiction. Deterministic triggers select candidates, Google Agent Search retrieves source-linked clauses, a Google ADK agent explains them, and the writer decides. Every endpoint works without a key; a key only raises limits.","version":"0.3.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}},"/health/integrations":{"get":{"summary":"Health Integrations","operationId":"health_integrations_health_integrations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Integrations Health Integrations Get"}}}}}}},"/v1/stack":{"get":{"summary":"Stack","operationId":"stack_v1_stack_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Stack V1 Stack Get"}}}}}}},"/v1/keys":{"post":{"summary":"Create Api Key","description":"Mint an API key with no account. Anonymous use keeps working without one.","operationId":"create_api_key_v1_keys_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Api Key V1 Keys Post"}}}}}}},"/v1/keys/self":{"get":{"summary":"Describe Api Key","operationId":"describe_api_key_v1_keys_self_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Describe Api Key V1 Keys Self Get"}}}}}}},"/v1/presets":{"get":{"summary":"Presets","operationId":"presets_v1_presets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Presets V1 Presets Get"}}}}}}},"/v1/presets/{preset_id}":{"get":{"summary":"Preset","operationId":"preset_v1_presets__preset_id__get","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","title":"Preset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Preset V1 Presets  Preset Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/presets/{preset_id}/download":{"get":{"summary":"Preset Download","operationId":"preset_download_v1_presets__preset_id__download_get","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","title":"Preset Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"fountain","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/samples":{"get":{"summary":"Samples","operationId":"samples_v1_samples_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Samples V1 Samples Get"}}}}}}},"/v1/resources":{"get":{"summary":"Resources","operationId":"resources_v1_resources_get","parameters":[{"name":"region","in":"query","required":false,"schema":{"type":"string","default":"US","title":"Region"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resources V1 Resources Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/guidance":{"get":{"summary":"Guidance","operationId":"guidance_v1_guidance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Guidance V1 Guidance Get"}}}}}}},"/v1/evidence":{"get":{"summary":"Evidence Base","description":"The research behind the guidance: verified citations, findings, and trigger-class mapping.","operationId":"evidence_base_v1_evidence_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Evidence Base V1 Evidence Get"}}}}}}},"/v1/eval/latest":{"get":{"summary":"Eval Latest","description":"The deterministic-layer benchmark, computed live from the shipped cases.","operationId":"eval_latest_v1_eval_latest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Eval Latest V1 Eval Latest Get"}}}}}}},"/v1/review":{"post":{"summary":"Review","description":"Review a screenplay. Returns notes with cited clauses; never a score.","operationId":"review_v1_review_post","parameters":[{"name":"format","in":"query","required":false,"schema":{"enum":["json","markdown"],"type":"string","default":"json","title":"Format"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/review/stream":{"post":{"summary":"Review Stream","description":"The same review as newline-delimited JSON progress events, ending with the full result.\n\nEach line is one JSON object: parsed, retrieving, retrieved, explaining,\nexplained, complete, then result (with data and meta) or error (with the\nerror envelope). Nothing is computed differently from POST /v1/review.","operationId":"review_stream_v1_review_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me":{"get":{"summary":"Me","operationId":"me_v1_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Me V1 Me Get"}}}}}}},"/v1/decisions":{"get":{"summary":"List Decisions","operationId":"list_decisions_v1_decisions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Decisions V1 Decisions Get"}}}}}},"post":{"summary":"Save Decision","operationId":"save_decision_v1_decisions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Save Decision V1 Decisions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decisions/{decision_id}":{"delete":{"summary":"Delete Decision","operationId":"delete_decision_v1_decisions__decision_id__delete","parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","title":"Decision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Decision V1 Decisions  Decision Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/exports":{"post":{"summary":"Create Export","description":"Store a review result only because the writer asked for it.","operationId":"create_export_v1_exports_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Export V1 Exports Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/exports/{export_id}":{"get":{"summary":"Get Export","operationId":"get_export_v1_exports__export_id__get","parameters":[{"name":"export_id","in":"path","required":true,"schema":{"type":"string","title":"Export Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/report":{"post":{"summary":"Report","description":"Render a Markdown report from a review payload. No model call, nothing stored.","operationId":"report_v1_report_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"DecisionBody":{"properties":{"flag_id":{"type":"string","maxLength":64,"title":"Flag Id"},"scene_id":{"type":"string","maxLength":32,"title":"Scene Id"},"heading":{"type":"string","maxLength":200,"title":"Heading"},"decision":{"type":"string","enum":["accepted","dismissed","expert_review"],"title":"Decision"},"reason":{"type":"string","maxLength":2000,"title":"Reason","default":""},"clause_ids":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Clause Ids"},"scene_text":{"type":"string","maxLength":250000,"title":"Scene Text","default":""}},"type":"object","required":["flag_id","scene_id","heading","decision"],"title":"DecisionBody"},"ExportBody":{"properties":{"title":{"type":"string","maxLength":200,"title":"Title","default":"submitted screenplay"},"review":{"additionalProperties":true,"type":"object","title":"Review"},"meta":{"additionalProperties":true,"type":"object","title":"Meta"}},"type":"object","required":["review"],"title":"ExportBody"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ReportBody":{"properties":{"title":{"type":"string","maxLength":200,"title":"Title","default":"submitted screenplay"},"review":{"additionalProperties":true,"type":"object","title":"Review"},"meta":{"additionalProperties":true,"type":"object","title":"Meta"}},"type":"object","required":["review"],"title":"ReportBody"},"ReviewBody":{"properties":{"screenplay":{"type":"string","maxLength":250000,"title":"Screenplay","default":""},"region":{"type":"string","maxLength":8,"title":"Region","default":"US"},"preset_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Preset Id"}},"type":"object","title":"ReviewBody"},"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"}}}}