{"openapi":"3.1.0","info":{"title":"Content Factory","version":"0.1.0"},"paths":{"/":{"get":{"summary":"Serve Frontend","operationId":"serve_frontend__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/types":{"get":{"summary":"Content Types","description":"Return available content types for the frontend.","operationId":"content_types_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/structure-templates":{"get":{"summary":"Structure Templates","description":"Return built-in structure templates used by the finalizer stage.","operationId":"structure_templates_structure_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/backlog":{"get":{"summary":"List Backlog","description":"List backlog ideas, defaulting to staged items ready for capture.","operationId":"list_backlog_backlog_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"staged","title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/backlog/extract":{"post":{"summary":"Extract Backlog Item","description":"Stage the current idea into backlog so it can be picked up later.","operationId":"extract_backlog_item_backlog_extract_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/backlog/extract-ideas":{"post":{"summary":"Extract Backlog Ideas","description":"Extract multiple stageable ideas from older source material.","operationId":"extract_backlog_ideas_backlog_extract_ideas_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/backlog/{backlog_item_id}/start":{"post":{"summary":"Start From Backlog","description":"Turn one staged backlog idea into an active workflow run.","operationId":"start_from_backlog_backlog__backlog_item_id__start_post","parameters":[{"name":"backlog_item_id","in":"path","required":true,"schema":{"type":"string","title":"Backlog Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pipeline/expand":{"post":{"summary":"Expand Pipeline Brief","description":"Generate a structured expansion brief from raw source text.","operationId":"expand_pipeline_brief_pipeline_expand_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/workflow/runs/{run_id}":{"get":{"summary":"Get Workflow Run","description":"Return the current workflow run detail used by the guided UI.","operationId":"get_workflow_run_workflow_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflow/runs/{run_id}/orient":{"post":{"summary":"Accept Workflow Orientation","description":"Accept or correct the current workflow direction.","operationId":"accept_workflow_orientation_workflow_runs__run_id__orient_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflow/runs/{run_id}/expand":{"post":{"summary":"Expand Workflow Run","description":"Persist expansion answers and generate the current expansion brief.","operationId":"expand_workflow_run_workflow_runs__run_id__expand_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflow/runs/{run_id}/expand/answers":{"post":{"summary":"Save Workflow Expand Answers","description":"Autosave in-progress expansion answers so the guided flow can resume safely.","operationId":"save_workflow_expand_answers_workflow_runs__run_id__expand_answers_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflow/runs/{run_id}/strengthen":{"get":{"summary":"Get Workflow Strengthen","description":"Return the latest persisted Strengthen data for a workflow run.","operationId":"get_workflow_strengthen_workflow_runs__run_id__strengthen_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Strengthen Workflow Run","description":"Run the real claim-research strengthen pipeline against the active draft.","operationId":"strengthen_workflow_run_workflow_runs__run_id__strengthen_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflow/patch-proposals/{proposal_id}/accept":{"post":{"summary":"Accept Patch Proposal","description":"Apply one strengthen patch proposal to the active draft.","operationId":"accept_patch_proposal_workflow_patch_proposals__proposal_id__accept_post","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","title":"Proposal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflow/patch-proposals/{proposal_id}/reject":{"post":{"summary":"Reject Patch Proposal","description":"Reject one strengthen patch proposal without mutating the draft.","operationId":"reject_patch_proposal_workflow_patch_proposals__proposal_id__reject_post","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","title":"Proposal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pipeline/research":{"post":{"summary":"Research Pipeline Brief","description":"Generate a structured claim research brief from raw text and optional expansion brief.","operationId":"research_pipeline_brief_pipeline_research_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/record":{"post":{"summary":"Record Voice","description":"Accept audio, transcribe, and format as the specified content type.","operationId":"record_voice_record_post","parameters":[{"name":"content_type","in":"query","required":false,"schema":{"type":"string","default":"article","title":"Content Type"}},{"name":"voice_skill","in":"query","required":false,"schema":{"type":"string","default":"","title":"Voice Skill"}},{"name":"structure_template","in":"query","required":false,"schema":{"type":"string","default":"","title":"Structure Template"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_record_voice_record_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/classify":{"post":{"summary":"Classify Audio","description":"Accept audio, transcribe it, and return content type suggestions.","operationId":"classify_audio_classify_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_classify_audio_classify_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/classify-text":{"post":{"summary":"Classify Text Input","description":"Accept typed/pasted text and return content type suggestions.","operationId":"classify_text_input_classify_text_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/transcribe":{"post":{"summary":"Transcribe Audio Input","description":"Transcribe uploaded audio without classifying or drafting.","operationId":"transcribe_audio_input_transcribe_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_transcribe_audio_input_transcribe_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/format":{"post":{"summary":"Format Text Input","description":"Format pasted/typed text, or a previously classified transcription.","operationId":"format_text_input_format_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/revise":{"post":{"summary":"Revise Draft","description":"Record voice feedback on a draft, transcribe it, and revise.","operationId":"revise_draft_revise_post","parameters":[{"name":"draft_id","in":"query","required":true,"schema":{"type":"string","title":"Draft Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_revise_draft_revise_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/revise-text":{"post":{"summary":"Revise Draft Text","description":"Revise a draft based on typed feedback.","operationId":"revise_draft_text_revise_text_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/save":{"post":{"summary":"Save Draft","description":"Save the current draft to the content repo.","operationId":"save_draft_save_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ab-scores":{"post":{"summary":"Submit Ab Scores","description":"Save A/B test scores to a JSON file in the content directory.","operationId":"submit_ab_scores_ab_scores_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ab-tests":{"post":{"summary":"Create Ab Test","description":"Create a new A/B test.","operationId":"create_ab_test_ab_tests_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"get":{"summary":"List Ab Tests","description":"List stored A/B score artifacts together with database-backed tests.","operationId":"list_ab_tests_ab_tests_get","parameters":[{"name":"group_by","in":"query","required":false,"schema":{"type":"string","title":"Group By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ab-tests/generate-name":{"post":{"summary":"Generate Ab Test Name","description":"Generate name suggestions for an A/B test.","operationId":"generate_ab_test_name_ab_tests_generate_name_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/voice-skills":{"get":{"summary":"List Voice Skills","description":"Return available voice skills (file-based profiles + built-in registers).","operationId":"list_voice_skills_voice_skills_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ab-tests/generate":{"post":{"summary":"Generate Ab Test","description":"Generate an A/B test by running two voice skills against the same source text.\n\nRequest body: { \"source_text\", \"content_type\", \"skill_a\", \"skill_b\", \"name\" }","operationId":"generate_ab_test_ab_tests_generate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ab-tests/{test_id}":{"get":{"summary":"Get Ab Test","description":"Get A/B test details from a JSON artifact, or fall back to the database.","operationId":"get_ab_test_ab_tests__test_id__get","parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"string","title":"Test Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Patch Ab Test","description":"Update A/B test metadata.","operationId":"patch_ab_test_ab_tests__test_id__patch","parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"string","title":"Test Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Ab Test","description":"Soft-delete an A/B test (mark as archived).","operationId":"delete_ab_test_ab_tests__test_id__delete","parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"string","title":"Test Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ab-tests/{test_id}/autosave":{"post":{"summary":"Autosave Ab Test","description":"Save partial scoring progress for an A/B test.","operationId":"autosave_ab_test_ab_tests__test_id__autosave_post","parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"string","title":"Test Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ab-tests/{test_id}/review":{"post":{"summary":"Review Ab Test","description":"Persist a full blind review for a database-backed A/B test.","operationId":"review_ab_test_ab_tests__test_id__review_post","parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"string","title":"Test Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ab-tests/{test_id}/scores":{"get":{"summary":"Get Ab Test Scores","description":"Get all scores for an A/B test (human + AI).","operationId":"get_ab_test_scores_ab_tests__test_id__scores_get","parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"string","title":"Test Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ab-tests/{test_id}/ai-score":{"post":{"summary":"Ai Score Ab Test","description":"Run AI scoring on both candidates of an A/B test.","operationId":"ai_score_ab_test_ab_tests__test_id__ai_score_post","parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"string","title":"Test Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ab-tests/{test_id}/highlights":{"post":{"summary":"Add Highlight","description":"Save a text highlight for an A/B test candidate.","operationId":"add_highlight_ab_tests__test_id__highlights_post","parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"string","title":"Test Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Get Test Highlights","description":"Get all highlights for an A/B test.","operationId":"get_test_highlights_ab_tests__test_id__highlights_get","parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"string","title":"Test Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/drafts":{"get":{"summary":"Get Drafts","description":"List all saved drafts.","operationId":"get_drafts_drafts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/drafts/{path}":{"get":{"summary":"Get Single Draft","description":"Get a single draft by path.","operationId":"get_single_draft_drafts__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_classify_audio_classify_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_classify_audio_classify_post"},"Body_record_voice_record_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_record_voice_record_post"},"Body_revise_draft_revise_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_revise_draft_revise_post"},"Body_transcribe_audio_input_transcribe_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_transcribe_audio_input_transcribe_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}