{"openapi":"3.1.0","info":{"title":"DebateOps","description":"\n## DebateOps API\n\nAI-powered Debate Dossier generation system for institutional spokespeople.\n\n### Features\n\n- **Research-First Intake**: Start with a speaker name and optionally add reference URLs\n- **Automated Claim Extraction**: Identifies and classifies claims from researched source material\n- **Fact-Checking with Citations**: Verifies claims against web sources (No Citation = No Fact)\n- **Response Generation**: Creates 15s, 45s, and 90s counter-responses\n- **Training Materials**: Generates hostile questions, suggested answers, and landmines\n\n### Authentication\n\nSigned-in users send their session token:\n\n```\nAuthorization: Bearer <session token>\n```\n\nService integrations send an API key instead:\n\n```\nX-API-Key: sk-your-api-key-here\n```\n\nA signed-in user only ever sees their own dossiers. Health checks, provider webhooks and\nshared-dossier links need no credentials.\n\n### Rate Limits\n\n- **Per minute**: 60 requests\n- **Per hour**: 1000 requests\n\nRate limit headers are included in all responses.\n\n### Webhooks\n\nConfigure `WEBHOOK_URL` to receive notifications when dossiers are completed:\n\n```json\n{\n  \"event\": \"dossier.completed\",\n  \"timestamp\": \"2024-01-15T10:30:00Z\",\n  \"data\": {\n    \"dossier_id\": \"uuid\",\n    \"speaker_name\": \"John Doe\",\n    \"status\": \"completed\",\n    \"quality_score\": 85\n  }\n}\n```\n\nWebhook payloads are signed with HMAC-SHA256 if `WEBHOOK_SECRET` is configured.\n        ","version":"0.1.0"},"paths":{"/health":{"get":{"tags":["System"],"summary":"Health Check","description":"Health check endpoint (liveness probe).\n\nReturns basic service status. Use /health/ready for deep checks.\nDoes not require authentication.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Check Health Get"}}}}}}},"/health/ready":{"get":{"tags":["System"],"summary":"Readiness Check","description":"Deep readiness check endpoint.\n\nVerifies connectivity to all required services:\n- Database connectivity\n- LLM provider configuration (OpenAI and/or OpenRouter)\n- Tavily API key configuration\n\nReturns:\n    status: \"ready\" | \"degraded\" | \"unhealthy\"\n    checks: detailed check results\n    errors: any error details (if applicable)\n\nDoes not require authentication.","operationId":"readiness_check_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Readiness Check Health Ready Get"}}}}}}},"/":{"get":{"tags":["System"],"summary":"Root","description":"Root endpoint with API information.\n\nDoes not require authentication.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Root  Get"}}}}}}},"/api/v1/sources/":{"post":{"tags":["sources"],"summary":"Create Source","description":"Ingest a URL for processing.\n\nThis endpoint accepts a URL and optionally a speaker name, creates a source document\nrecord owned by the caller, and fetches and extracts the page content in the\nbackground. Poll ``GET /sources/{id}`` until ``status`` is ``completed`` or ``failed``.","operationId":"create_source_api_v1_sources__post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["sources"],"summary":"List Sources","description":"List the caller's source documents with optional filtering.","operationId":"list_sources_api_v1_sources__get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Page size; values above 100 are capped at 100","default":20,"title":"Limit"},"description":"Page size; values above 100 are capped at 100"},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SourceStatus"},{"type":"null"}],"title":"Status Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SourceResponse"},"title":"Response List Sources Api V1 Sources  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sources/{source_id}":{"get":{"tags":["sources"],"summary":"Get Source","description":"Get source document by ID with status.","operationId":"get_source_api_v1_sources__source_id__get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sources/{source_id}/claims":{"get":{"tags":["sources"],"summary":"Get Source With Claims","description":"Get source document with all extracted claims.","operationId":"get_source_with_claims_api_v1_sources__source_id__claims_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceWithClaims"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/claims/":{"get":{"tags":["claims"],"summary":"List Claims","description":"List the caller's extracted claims with optional filtering.","operationId":"list_claims_api_v1_claims__get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"source_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"}},{"name":"claim_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ClaimType"},{"type":"null"}],"title":"Claim Type"}},{"name":"veracity","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ClaimVeracity"},{"type":"null"}],"title":"Veracity"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":0,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClaimResponse"},"title":"Response List Claims Api V1 Claims  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/claims/{claim_id}":{"get":{"tags":["claims"],"summary":"Get Claim","description":"Get a specific claim by ID.","operationId":"get_claim_api_v1_claims__claim_id__get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Claim Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/claims/{claim_id}/evidence":{"get":{"tags":["claims"],"summary":"Get Claim With Evidence","description":"Get a claim with all attached evidence.","operationId":"get_claim_with_evidence_api_v1_claims__claim_id__evidence_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Claim Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimWithEvidence"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/claims/search/":{"get":{"tags":["claims"],"summary":"Search Claims","description":"Search the caller's claims by text content.\n\nFor semantic search using embeddings, use /claims/semantic-search/","operationId":"search_claims_api_v1_claims_search__get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":500,"title":"Query"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":0,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClaimResponse"},"title":"Response Search Claims Api V1 Claims Search  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/claims/semantic-search/":{"get":{"tags":["claims"],"summary":"Semantic Search Claims","description":"Search the caller's claims by semantic similarity (Postgres + pgvector).","operationId":"semantic_search_claims_api_v1_claims_semantic_search__get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":500,"title":"Query"}},{"name":"source_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":0,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClaimResponse"},"title":"Response Semantic Search Claims Api V1 Claims Semantic Search  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dossiers/":{"post":{"tags":["dossiers"],"summary":"Create Dossier","description":"Start dossier generation in speaker-first, research-first mode.","operationId":"create_dossier_api_v1_dossiers__post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DossierCreateWithWebhook"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DossierStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["dossiers"],"summary":"List Dossiers","description":"List all dossiers with optional filtering.","operationId":"list_dossiers_api_v1_dossiers__get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"speaker_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speaker Name"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DossierStatus"},{"type":"null"}],"title":"Status"}},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DossierStatus"},{"type":"null"}],"title":"Status Filter"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"title":"Limit"}},{"name":"sort_by","in":"query","required":false,"schema":{"enum":["created_at","updated_at","speaker_name"],"type":"string","default":"created_at","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"desc","title":"Sort Order"}},{"name":"include_revisions","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Revisions"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_DossierSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dossiers/research":{"post":{"tags":["dossiers"],"summary":"Create Dossier Research","description":"Backward-compatible alias for the speaker-first dossier create flow.","operationId":"create_dossier_research_api_v1_dossiers_research_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DossierCreateResearch"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DossierStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/api/v1/dossiers/sync":{"post":{"tags":["dossiers"],"summary":"Create Dossier Sync","description":"Generate a dossier synchronously (blocking).\n\nThis endpoint waits for the full pipeline to complete before returning.\nUse for simpler integrations that don't need webhook/polling patterns.\n\n**Warning**: This endpoint can take several minutes to complete.\nTimeout is configured via SYNC_TIMEOUT (default: 5 minutes).","operationId":"create_dossier_sync_api_v1_dossiers_sync_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DossierCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DossierResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/api/v1/dossiers/{dossier_id}/status":{"get":{"tags":["dossiers"],"summary":"Get Dossier Status","description":"Poll dossier generation status.\n\nUse this endpoint to check the progress of dossier generation.\nStatus values: pending, collecting, extracting, analyzing,\nfact_checking, generating, reviewing, completed, failed","operationId":"get_dossier_status_api_v1_dossiers__dossier_id__status_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"dossier_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dossier Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DossierStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dossiers/{dossier_id}/events":{"get":{"tags":["dossiers"],"summary":"Stream Dossier Events","description":"Server-sent events for live dossier pipeline progress.\n\nAuthenticates like every other endpoint: ``Authorization: Bearer <session token>`` (or\n``X-API-Key``). Credentials in the query string are ignored, so browsers must read the\nstream with ``fetch`` rather than ``EventSource``, which cannot send headers.","operationId":"stream_dossier_events_api_v1_dossiers__dossier_id__events_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"dossier_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dossier Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dossiers/{dossier_id}":{"get":{"tags":["dossiers"],"summary":"Get Dossier","description":"Get completed dossier with all details.\n\nReturns the full dossier including:\n- Executive summary\n- Key claims with fact-check results\n- Rhetorical framing analysis\n- Response variants (15/45/90 seconds)\n- Training materials (hostile questions, suggested answers, landmines)","operationId":"get_dossier_api_v1_dossiers__dossier_id__get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"dossier_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dossier Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DossierResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["dossiers"],"summary":"Delete Dossier","description":"Delete a dossier.\n\nBy default the whole dossier goes: every revision in its thread, whichever revision\nthe id names, with their responses, source snapshots, claims, evidence and share\nlinks. With `scope=revision` only the named revision is deleted; if it was the latest\none, the newest remaining revision becomes the latest.\n\nUsage already counted against the monthly quota stays counted.\n\nReturns 204 No Content on success, 404 if the dossier is not found.","operationId":"delete_dossier_api_v1_dossiers__dossier_id__delete","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"dossier_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dossier Id"}},{"name":"scope","in":"query","required":false,"schema":{"enum":["thread","revision"],"type":"string","description":"`thread` (default) deletes the dossier with all of its revisions; `revision` deletes only this revision","default":"thread","title":"Scope"},"description":"`thread` (default) deletes the dossier with all of its revisions; `revision` deletes only this revision"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dossiers/{dossier_id}/export":{"get":{"tags":["dossiers"],"summary":"Export Dossier","description":"Export a completed dossier as markdown or PDF.","operationId":"export_dossier_api_v1_dossiers__dossier_id__export_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"dossier_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dossier Id"}},{"name":"format","in":"query","required":false,"schema":{"enum":["markdown","pdf"],"type":"string","default":"pdf","title":"Format"}},{"name":"mode","in":"query","required":false,"schema":{"enum":["brief","full"],"type":"string","default":"brief","title":"Mode"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dossiers/{dossier_id}/share":{"post":{"tags":["dossiers"],"summary":"Share Dossier","description":"Create the public read-only link for a completed dossier.\n\nIdempotent: sharing an already shared dossier returns the existing link. Anyone who has\nthe token can read the dossier at ``GET /shared/{share_token}`` without signing in,\nuntil the link is revoked with ``DELETE`` on this path or the dossier is deleted.","operationId":"share_dossier_api_v1_dossiers__dossier_id__share_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"dossier_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dossier Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["dossiers"],"summary":"Unshare Dossier","description":"Revoke the public link. The old token stops working immediately and is never reused.","operationId":"unshare_dossier_api_v1_dossiers__dossier_id__share_delete","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"dossier_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dossier Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dossiers/{dossier_id}/focus/answer":{"post":{"tags":["dossiers"],"summary":"Answer Focus Question","description":"Answer a pending focus clarification prompt and continue focus resolution.","operationId":"answer_focus_question_api_v1_dossiers__dossier_id__focus_answer_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"dossier_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dossier Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FocusAnswerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DossierStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dossiers/{dossier_id}/focus/continue":{"post":{"tags":["dossiers"],"summary":"Continue With Current Focus","description":"Continue dossier generation without answering the pending clarification.","operationId":"continue_with_current_focus_api_v1_dossiers__dossier_id__focus_continue_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"dossier_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dossier Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DossierStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dossiers/{dossier_id}/revisions":{"get":{"tags":["dossiers"],"summary":"List Dossier Revisions","description":"Return the revision history for a dossier thread.","operationId":"list_dossier_revisions_api_v1_dossiers__dossier_id__revisions_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"dossier_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dossier Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DossierRevisionSummary"},"title":"Response List Dossier Revisions Api V1 Dossiers  Dossier Id  Revisions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dossiers/{dossier_id}/improvement-plan":{"get":{"tags":["dossiers"],"summary":"Get Dossier Improvement Plan","description":"Generate system suggestions for improving or retrying a dossier.","operationId":"get_dossier_improvement_plan_api_v1_dossiers__dossier_id__improvement_plan_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"dossier_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dossier Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImprovementPlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dossiers/{dossier_id}/improve":{"post":{"tags":["dossiers"],"summary":"Improve Dossier","description":"Create and launch an improved child revision for a dossier.","operationId":"improve_dossier_api_v1_dossiers__dossier_id__improve_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"dossier_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dossier Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImproveDossierRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DossierStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dossiers/{dossier_id}/retry":{"post":{"tags":["dossiers"],"summary":"Retry Dossier","description":"Compatibility alias that creates a child revision with a clean rebuild.\n\nA retry runs the whole pipeline again, so it is held to the same spend limits as any\nother run. Rebuilding a dossier that already completed also counts as an iteration;\nretrying one that failed does not, because that run delivered nothing, but a thread's\nfailed runs can only be retried MAX_FAILED_RETRIES_PER_THREAD times a month (409\n``retry_limit``).","operationId":"retry_dossier_api_v1_dossiers__dossier_id__retry_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"dossier_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dossier Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DossierStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dossiers/bulk":{"delete":{"tags":["dossiers"],"summary":"Bulk Delete Dossiers","description":"Delete several dossiers, each with all of its revisions.\n\nAn id may name any revision of a dossier: the whole dossier is deleted, with its\nresponses, source snapshot, claims, evidence and share link. Usage already counted\nagainst the monthly quota stays counted.\n\nIds the caller does not own (or that do not exist) are skipped silently.\n``deleted_count`` is the number of dossiers that were deleted and\n``deleted_revision_count`` the number of revisions they had.","operationId":"bulk_delete_dossiers_api_v1_dossiers_bulk_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/api/v1/shared/{share_token}":{"get":{"tags":["shared"],"summary":"Get Shared Dossier","description":"Read a shared dossier with the token from its public link. No sign-in required.\n\nReturns the same shape as ``GET /dossiers/{id}``, minus what only the owner should see:\nrun metrics, quality feedback, improvement notes, revision history and the share token\nitself are blank. Unknown and revoked tokens answer 404.","operationId":"get_shared_dossier_api_v1_shared__share_token__get","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","title":"Share Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DossierResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/me":{"get":{"tags":["users","users"],"summary":"Get Me","description":"Return current user profile and usage summary.","operationId":"get_me_api_v1_users_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/api/v1/billing/checkout":{"post":{"tags":["billing","billing"],"summary":"Checkout","description":"Create a Stripe Checkout session for upgrading to premium.\n\n409 if the caller already holds a subscription (a second checkout would start a second\none), 400 for an unknown price or a redirect URL that is not acceptable (not on this\nsite, when CORS_ORIGINS names the site), 503 while billing is not configured, 502 when\nStripe cannot be reached.","operationId":"checkout_api_v1_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/api/v1/billing/portal":{"post":{"tags":["billing","billing"],"summary":"Portal","description":"Create a Stripe Customer Portal session for billing management.","operationId":"portal_api_v1_billing_portal_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/api/v1/billing/status":{"get":{"tags":["billing","billing"],"summary":"Billing Status","description":"Return subscription status.","operationId":"billing_status_api_v1_billing_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/api/v1/webhooks/stripe":{"post":{"tags":["webhooks","webhooks"],"summary":"Stripe Webhook","description":"Receive Stripe webhook events.","operationId":"stripe_webhook_api_v1_webhooks_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/webhooks/clerk":{"post":{"tags":["webhooks","webhooks"],"summary":"Clerk Webhook","description":"Receive Clerk webhook events (user.created, user.deleted).","operationId":"clerk_webhook_api_v1_webhooks_clerk_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AgentActivity":{"properties":{"nodes_executed":{"items":{"type":"string"},"type":"array","title":"Nodes Executed"},"node_timings":{"additionalProperties":{"type":"number"},"type":"object","title":"Node Timings"},"current_node":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Node"},"error_count":{"type":"integer","title":"Error Count","default":0},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"trace_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Url"},"project":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project"},"total_tokens":{"type":"integer","title":"Total Tokens","default":0},"prompt_tokens":{"type":"integer","title":"Prompt Tokens","default":0},"completion_tokens":{"type":"integer","title":"Completion Tokens","default":0},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"estimated_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Cost Usd"},"pipeline_metrics":{"additionalProperties":{"type":"integer"},"type":"object","title":"Pipeline Metrics"}},"type":"object","title":"AgentActivity","description":"Execution metadata for agent pipeline visualization."},"BulkDeleteRequest":{"properties":{"dossier_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"title":"Dossier Ids","description":"Dossier IDs to delete; each one is deleted with all of its revisions"}},"type":"object","required":["dossier_ids"],"title":"BulkDeleteRequest","description":"Schema for bulk delete request."},"BulkDeleteResponse":{"properties":{"deleted_count":{"type":"integer","title":"Deleted Count","description":"Number of dossiers deleted (a dossier and its revisions count once)"},"deleted_revision_count":{"type":"integer","title":"Deleted Revision Count","description":"Number of revisions deleted across those dossiers","default":0}},"type":"object","required":["deleted_count"],"title":"BulkDeleteResponse","description":"Schema for bulk delete response."},"CheckoutRequest":{"properties":{"price_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Price Id"},"plan":{"anyOf":[{"type":"string","enum":["monthly","yearly"]},{"type":"null"}],"title":"Plan"},"success_url":{"type":"string","maxLength":2000,"title":"Success Url"},"cancel_url":{"type":"string","maxLength":2000,"title":"Cancel Url"}},"type":"object","required":["success_url","cancel_url"],"title":"CheckoutRequest"},"ClaimCitationSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"},"relevant_quote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relevant Quote","description":"Excerpt from the source"},"credibility_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credibility Score"},"published_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published Date","description":"YYYY-MM-DD, when known"}},"type":"object","required":["id","url"],"title":"ClaimCitationSummary","description":"Citation line item for claim cards (evidence-backed)."},"ClaimResponse":{"properties":{"text":{"type":"string","title":"Text","description":"The claim text"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context","description":"Surrounding context"},"claim_type":{"$ref":"#/components/schemas/ClaimType","description":"Type of claim","default":"factual"},"topics":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Topics","description":"Topics this claim relates to"},"id":{"type":"string","format":"uuid","title":"Id"},"source_id":{"type":"string","format":"uuid","title":"Source Id"},"quote_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote Location"},"veracity":{"$ref":"#/components/schemas/ClaimVeracity"},"veracity_explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Veracity Explanation"},"confidence_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Score"},"rhetorical_frame":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rhetorical Frame"},"emotional_appeal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emotional Appeal"},"logical_fallacies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Logical Fallacies"},"importance_score":{"type":"integer","title":"Importance Score","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["text","id","source_id","veracity","created_at","updated_at"],"title":"ClaimResponse","description":"Schema for claim response."},"ClaimSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"text":{"type":"string","title":"Text"},"veracity":{"$ref":"#/components/schemas/ClaimVeracity"},"claim_type":{"$ref":"#/components/schemas/ClaimType","default":"factual"},"importance_score":{"type":"integer","title":"Importance Score"},"evidence_count":{"type":"integer","title":"Evidence Count"},"veracity_explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Veracity Explanation"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"},"citations":{"items":{"$ref":"#/components/schemas/ClaimCitationSummary"},"type":"array","title":"Citations"}},"type":"object","required":["id","text","veracity","importance_score","evidence_count"],"title":"ClaimSummary","description":"Summary of a claim for dossier output."},"ClaimType":{"type":"string","enum":["factual","opinion","prediction","value","policy"],"title":"ClaimType","description":"Type of claim."},"ClaimVeracity":{"type":"string","enum":["unverified","true","mostly_true","mixed","mostly_false","false","unverifiable"],"title":"ClaimVeracity","description":"Veracity status of a claim after fact-checking."},"ClaimWithEvidence":{"properties":{"text":{"type":"string","title":"Text","description":"The claim text"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context","description":"Surrounding context"},"claim_type":{"$ref":"#/components/schemas/ClaimType","description":"Type of claim","default":"factual"},"topics":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Topics","description":"Topics this claim relates to"},"id":{"type":"string","format":"uuid","title":"Id"},"source_id":{"type":"string","format":"uuid","title":"Source Id"},"quote_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote Location"},"veracity":{"$ref":"#/components/schemas/ClaimVeracity"},"veracity_explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Veracity Explanation"},"confidence_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Score"},"rhetorical_frame":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rhetorical Frame"},"emotional_appeal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emotional Appeal"},"logical_fallacies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Logical Fallacies"},"importance_score":{"type":"integer","title":"Importance Score","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"evidence":{"items":{"$ref":"#/components/schemas/EvidenceResponse"},"type":"array","title":"Evidence"},"evidence_count":{"type":"integer","title":"Evidence Count","description":"Number of evidence items","default":0}},"type":"object","required":["text","id","source_id","veracity","created_at","updated_at"],"title":"ClaimWithEvidence","description":"Schema for claim with attached evidence."},"CritiqueSummary":{"properties":{"response_id":{"type":"string","title":"Response Id"},"duration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duration"},"issues":{"items":{"type":"string"},"type":"array","title":"Issues"},"uncited_facts":{"items":{"type":"string"},"type":"array","title":"Uncited Facts"},"suggested_improvements":{"items":{"type":"string"},"type":"array","title":"Suggested Improvements"}},"type":"object","required":["response_id"],"title":"CritiqueSummary","description":"Compact persisted summary of a response critique."},"DebateChallengeSummary":{"properties":{"id":{"type":"string","title":"Id"},"response_id":{"type":"string","title":"Response Id"},"challenge_type":{"type":"string","title":"Challenge Type"},"challenge_text":{"type":"string","title":"Challenge Text"},"suggested_defense":{"type":"string","title":"Suggested Defense"},"severity":{"type":"string","title":"Severity"}},"type":"object","required":["id","response_id","challenge_type","challenge_text","suggested_defense","severity"],"title":"DebateChallengeSummary","description":"A single adversarial stress-test challenge."},"DebateInsights":{"properties":{"robustness_score":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Robustness Score"},"challenges":{"items":{"$ref":"#/components/schemas/DebateChallengeSummary"},"type":"array","title":"Challenges"},"debate_rounds":{"type":"integer","minimum":0.0,"title":"Debate Rounds","default":0},"vulnerabilities":{"items":{"type":"string"},"type":"array","title":"Vulnerabilities"}},"type":"object","title":"DebateInsights","description":"Persisted adversarial debate output for UI stress-test views."},"DiscoveredSourceSummary":{"properties":{"url":{"type":"string","title":"Url"},"title":{"type":"string","title":"Title"},"source_type":{"type":"string","title":"Source Type"},"relevance_score":{"type":"number","title":"Relevance Score"},"published_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published Date"},"excerpt":{"type":"string","title":"Excerpt","default":""}},"type":"object","required":["url","title","source_type","relevance_score"],"title":"DiscoveredSourceSummary","description":"Source discovered by the research agent."},"DossierCreate":{"properties":{"speaker_name":{"type":"string","maxLength":160,"minLength":2,"title":"Speaker Name","description":"Name of the speaker to analyze"},"focus_text":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Focus Text","description":"Optional topic, angle, or exact question to focus the dossier on"},"focus_layers":{"anyOf":[{"$ref":"#/components/schemas/FocusLayersInput"},{"type":"null"}],"description":"Optional structured refinements for the dossier focus"},"reference_urls":{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array","maxItems":8,"title":"Reference Urls","description":"Optional source URLs supplied as guidance for research"}},"type":"object","required":["speaker_name"],"title":"DossierCreate","description":"Schema for creating a new dossier."},"DossierCreateResearch":{"properties":{"speaker_name":{"type":"string","maxLength":160,"minLength":2,"title":"Speaker Name","description":"Name of the speaker to research and analyze"},"focus_text":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Focus Text","description":"Optional topic, angle, or exact question to focus the dossier on"},"focus_layers":{"anyOf":[{"$ref":"#/components/schemas/FocusLayersInput"},{"type":"null"}],"description":"Optional structured focus refinements layered onto the initial focus"},"reference_urls":{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array","maxItems":8,"title":"Reference Urls","description":"Optional source URLs supplied as guidance for research"},"webhook_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Webhook Url","description":"Optional http(s) webhook URL to notify when complete"},"adversarial":{"type":"boolean","title":"Adversarial","description":"Run adversarial debate rounds to strengthen responses","default":true}},"type":"object","required":["speaker_name"],"title":"DossierCreateResearch","description":"Schema for creating a dossier using research-first mode."},"DossierCreateWithWebhook":{"properties":{"speaker_name":{"type":"string","maxLength":160,"minLength":2,"title":"Speaker Name","description":"Name of the speaker to analyze"},"focus_text":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Focus Text","description":"Optional topic, angle, or exact question to focus the dossier on"},"focus_layers":{"anyOf":[{"$ref":"#/components/schemas/FocusLayersInput"},{"type":"null"}],"description":"Optional structured focus refinements layered onto the initial focus"},"reference_urls":{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array","maxItems":8,"title":"Reference Urls","description":"Optional source URLs supplied as guidance for research"},"webhook_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Webhook Url","description":"Optional http(s) webhook URL to notify when complete"},"adversarial":{"type":"boolean","title":"Adversarial","description":"Run adversarial debate rounds to strengthen responses","default":true}},"type":"object","required":["speaker_name"],"title":"DossierCreateWithWebhook","description":"Schema for creating a dossier with optional per-request webhook."},"DossierResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"thread_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Thread Id"},"parent_dossier_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Dossier Id"},"revision_number":{"type":"integer","minimum":1.0,"title":"Revision Number","default":1},"is_latest_revision":{"type":"boolean","title":"Is Latest Revision","default":true},"revision_count":{"type":"integer","minimum":1.0,"title":"Revision Count","default":1},"improvement_available":{"type":"boolean","title":"Improvement Available","default":false},"score_delta_vs_parent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score Delta Vs Parent"},"speaker_name":{"type":"string","title":"Speaker Name"},"source":{"anyOf":[{"$ref":"#/components/schemas/SourceInfo"},{"type":"null"}]},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"source_urls":{"items":{"type":"string"},"type":"array","title":"Source Urls"},"reference_urls":{"items":{"type":"string"},"type":"array","title":"Reference Urls"},"discovered_sources":{"items":{"$ref":"#/components/schemas/DiscoveredSourceSummary"},"type":"array","title":"Discovered Sources"},"focus_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Focus Text"},"focus_layers":{"anyOf":[{"$ref":"#/components/schemas/FocusLayers"},{"type":"null"}]},"resolved_focus_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved Focus Text"},"focus_status":{"$ref":"#/components/schemas/FocusStatus","default":"none"},"focus_suggestions":{"items":{"$ref":"#/components/schemas/FocusSuggestion"},"type":"array","title":"Focus Suggestions"},"focus_research_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Focus Research Summary"},"pending_focus_question":{"anyOf":[{"$ref":"#/components/schemas/PendingFocusQuestion"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/DossierStatus"},"progress_percentage":{"type":"integer","title":"Progress Percentage","default":0},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"agent_activity":{"anyOf":[{"$ref":"#/components/schemas/AgentActivity"},{"type":"null"}]},"executive_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Executive Summary"},"key_claims":{"items":{"$ref":"#/components/schemas/ClaimSummary"},"type":"array","title":"Key Claims"},"frames_identified":{"items":{"type":"string"},"type":"array","title":"Frames Identified"},"rhetorical_strategies":{"items":{"type":"string"},"type":"array","title":"Rhetorical Strategies"},"fact_checks":{"items":{"$ref":"#/components/schemas/FactCheckResult"},"type":"array","title":"Fact Checks"},"response_variants":{"items":{"$ref":"#/components/schemas/ResponseVariantWithCitations"},"type":"array","title":"Response Variants"},"hostile_questions":{"items":{"type":"string"},"type":"array","title":"Hostile Questions"},"suggested_answers":{"items":{"type":"string"},"type":"array","title":"Suggested Answers"},"bridging_lines":{"items":{"type":"string"},"type":"array","title":"Bridging Lines"},"landmines":{"items":{"type":"string"},"type":"array","title":"Landmines","description":"What NOT to say - potential pitfalls"},"overall_quality_score":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Overall Quality Score"},"citation_coverage":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Citation Coverage","description":"Percentage of factual claims with citations"},"improvement_mode":{"anyOf":[{"type":"string","enum":["full_rebuild","messaging_refresh"]},{"type":"null"}],"title":"Improvement Mode"},"improvement_brief":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Improvement Brief"},"quality_feedback":{"anyOf":[{"$ref":"#/components/schemas/QualityFeedback"},{"type":"null"}]},"final_robustness_score":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Final Robustness Score"},"debate_insights":{"anyOf":[{"$ref":"#/components/schemas/DebateInsights"},{"type":"null"}]},"share_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Token","description":"Token of the public read-only link, if the dossier is shared"},"shared_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Shared At","description":"When the dossier was shared"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","speaker_name","status","created_at","updated_at"],"title":"DossierResponse","description":"Complete dossier response - the main output."},"DossierRevisionSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"revision_number":{"type":"integer","minimum":1.0,"title":"Revision Number"},"is_latest_revision":{"type":"boolean","title":"Is Latest Revision","default":false},"status":{"$ref":"#/components/schemas/DossierStatus"},"overall_quality_score":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Overall Quality Score"},"citation_coverage":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Citation Coverage"},"improvement_mode":{"anyOf":[{"type":"string","enum":["full_rebuild","messaging_refresh"]},{"type":"null"}],"title":"Improvement Mode"},"improvement_brief":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Improvement Brief"},"score_delta_vs_parent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score Delta Vs Parent"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","revision_number","status","created_at","updated_at"],"title":"DossierRevisionSummary","description":"Compact revision summary for a dossier thread."},"DossierStatus":{"type":"string","enum":["pending","awaiting_input","collecting","extracting","analyzing","fact_checking","generating","reviewing","completed","failed"],"title":"DossierStatus","description":"Status of dossier generation."},"DossierStatusResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"thread_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Thread Id"},"parent_dossier_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Dossier Id"},"revision_number":{"type":"integer","minimum":1.0,"title":"Revision Number","default":1},"is_latest_revision":{"type":"boolean","title":"Is Latest Revision","default":true},"revision_count":{"type":"integer","minimum":1.0,"title":"Revision Count","default":1},"improvement_available":{"type":"boolean","title":"Improvement Available","default":false},"score_delta_vs_parent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score Delta Vs Parent"},"speaker_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speaker Name"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"source_urls":{"items":{"type":"string"},"type":"array","title":"Source Urls"},"reference_urls":{"items":{"type":"string"},"type":"array","title":"Reference Urls"},"discovered_sources":{"items":{"$ref":"#/components/schemas/DiscoveredSourceSummary"},"type":"array","title":"Discovered Sources"},"focus_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Focus Text"},"focus_layers":{"anyOf":[{"$ref":"#/components/schemas/FocusLayers"},{"type":"null"}]},"resolved_focus_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved Focus Text"},"focus_status":{"$ref":"#/components/schemas/FocusStatus","default":"none"},"focus_suggestions":{"items":{"$ref":"#/components/schemas/FocusSuggestion"},"type":"array","title":"Focus Suggestions"},"focus_research_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Focus Research Summary"},"pending_focus_question":{"anyOf":[{"$ref":"#/components/schemas/PendingFocusQuestion"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/DossierStatus"},"progress_percentage":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Progress Percentage","default":0},"current_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Stage"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"agent_activity":{"anyOf":[{"$ref":"#/components/schemas/AgentActivity"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","status","created_at","updated_at"],"title":"DossierStatusResponse","description":"Schema for dossier status polling."},"DossierSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"thread_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Thread Id"},"parent_dossier_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Dossier Id"},"revision_number":{"type":"integer","minimum":1.0,"title":"Revision Number","default":1},"is_latest_revision":{"type":"boolean","title":"Is Latest Revision","default":true},"revision_count":{"type":"integer","minimum":1.0,"title":"Revision Count","default":1},"improvement_available":{"type":"boolean","title":"Improvement Available","default":false},"score_delta_vs_parent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score Delta Vs Parent"},"speaker_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speaker Name"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"source_urls":{"items":{"type":"string"},"type":"array","title":"Source Urls"},"reference_urls":{"items":{"type":"string"},"type":"array","title":"Reference Urls"},"discovered_sources":{"items":{"$ref":"#/components/schemas/DiscoveredSourceSummary"},"type":"array","title":"Discovered Sources"},"focus_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Focus Text"},"focus_layers":{"anyOf":[{"$ref":"#/components/schemas/FocusLayers"},{"type":"null"}]},"resolved_focus_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved Focus Text"},"focus_status":{"$ref":"#/components/schemas/FocusStatus","default":"none"},"focus_suggestions":{"items":{"$ref":"#/components/schemas/FocusSuggestion"},"type":"array","title":"Focus Suggestions"},"focus_research_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Focus Research Summary"},"pending_focus_question":{"anyOf":[{"$ref":"#/components/schemas/PendingFocusQuestion"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/DossierStatus"},"progress_percentage":{"type":"integer","title":"Progress Percentage","default":0},"overall_quality_score":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Overall Quality Score"},"citation_coverage":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Citation Coverage"},"improvement_mode":{"anyOf":[{"type":"string","enum":["full_rebuild","messaging_refresh"]},{"type":"null"}],"title":"Improvement Mode"},"improvement_brief":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Improvement Brief"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","status","created_at","updated_at"],"title":"DossierSummary","description":"Brief summary of a dossier."},"EvidenceResponse":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url","description":"URL of the evidence source"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Title of the source"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name","description":"Name of the publication/site"},"excerpt":{"type":"string","title":"Excerpt","description":"Relevant excerpt from the source"},"stance":{"$ref":"#/components/schemas/EvidenceStance","description":"How this evidence relates to the claim"},"evidence_type":{"$ref":"#/components/schemas/EvidenceType","description":"Type of evidence","default":"other"},"id":{"type":"string","format":"uuid","title":"Id"},"claim_id":{"type":"string","format":"uuid","title":"Claim Id"},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"},"published_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published Date"},"credibility_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credibility Score"},"relevance_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Relevance Score"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["url","excerpt","stance","id","claim_id","created_at","updated_at"],"title":"EvidenceResponse","description":"Schema for evidence response."},"EvidenceStance":{"type":"string","enum":["supports","contradicts","provides_context","neutral"],"title":"EvidenceStance","description":"How the evidence relates to the claim."},"EvidenceSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"},"stance":{"$ref":"#/components/schemas/EvidenceStance"},"published_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published Date"}},"type":"object","required":["id","url","title","source_name","stance"],"title":"EvidenceSummary","description":"Brief summary of evidence for citations."},"EvidenceType":{"type":"string","enum":["news_article","academic_paper","government_report","fact_check","official_statement","statistics","speaker_statement","other"],"title":"EvidenceType","description":"Type of evidence source."},"FactCheckResult":{"properties":{"claim":{"$ref":"#/components/schemas/ClaimWithEvidence"},"summary":{"type":"string","title":"Summary","description":"Brief explanation of the fact-check"},"key_contradictions":{"items":{"type":"string"},"type":"array","title":"Key Contradictions"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence"}},"type":"object","required":["claim","summary","confidence"],"title":"FactCheckResult","description":"Fact-check result for a single claim."},"FocusAnswerRequest":{"properties":{"answer_text":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Answer Text","description":"Clarification answer for the focus prompt"},"focus_layers":{"anyOf":[{"$ref":"#/components/schemas/FocusLayersInput"},{"type":"null"}],"description":"Optional structured focus refinements submitted with the clarification"}},"type":"object","title":"FocusAnswerRequest","description":"Answer a pending focus clarification question."},"FocusDirectnessAssessment":{"properties":{"status":{"type":"string","enum":["strong","moderate","weak"],"title":"Status"},"reason":{"type":"string","title":"Reason"},"needs_refinement":{"type":"boolean","title":"Needs Refinement","default":false}},"type":"object","required":["status","reason"],"title":"FocusDirectnessAssessment","description":"Assessment of how directly the dossier answers the requested focus."},"FocusLayers":{"properties":{"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"question":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question"},"angle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Angle"},"timeframe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timeframe"}},"type":"object","title":"FocusLayers","description":"Structured refinements layered onto the initial focus."},"FocusLayersInput":{"properties":{"topic":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Topic"},"question":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Question"},"angle":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Angle"},"timeframe":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Timeframe"}},"type":"object","title":"FocusLayersInput","description":"Focus layers as a request may send them: each one is length-limited.\n\n``FocusLayers`` itself stays unlimited because it also describes stored data in\nresponses, which must never fail to serialise."},"FocusStatus":{"type":"string","enum":["none","provided","resolved","awaiting_input","auto_continued"],"title":"FocusStatus","description":"Focus resolution state for a dossier."},"FocusSuggestion":{"properties":{"id":{"type":"string","title":"Id"},"layer":{"type":"string","enum":["topic","question","angle","timeframe"],"title":"Layer"},"value":{"type":"string","title":"Value"},"reasoning":{"type":"string","title":"Reasoning"}},"type":"object","required":["id","layer","value","reasoning"],"title":"FocusSuggestion","description":"Suggested direction for narrowing dossier focus."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImproveDossierRequest":{"properties":{"selected_suggestion_ids":{"items":{"type":"string"},"type":"array","title":"Selected Suggestion Ids"},"custom_instruction":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Custom Instruction"},"focus_text":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Focus Text","description":"Omit to keep the current focus; null or blank clears it"},"focus_layers":{"anyOf":[{"$ref":"#/components/schemas/FocusLayersInput"},{"type":"null"}],"description":"Omit to keep the current layers; null clears them all; an object replaces them all (a layer missing from it is cleared)"},"reference_urls":{"anyOf":[{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array","maxItems":8},{"type":"null"}],"title":"Reference Urls","description":"Omit to keep the current URLs; null or [] clears them"},"requested_mode":{"anyOf":[{"type":"string","enum":["full_rebuild","messaging_refresh"]},{"type":"null"}],"title":"Requested Mode"}},"type":"object","title":"ImproveDossierRequest","description":"Request payload for creating an improved dossier revision.\n\n``focus_text``, ``focus_layers`` and ``reference_urls`` are inherited from the dossier\nbeing improved when the request leaves them out. Sending one of them replaces the\ninherited value, and sending it as ``null`` clears it. (``\"\"`` clears ``focus_text``\nand ``[]`` clears ``reference_urls`` as well.)\n\n``focus_layers`` is replaced as a whole: when the object is sent, a layer that is\nmissing from it or ``null`` is cleared, not inherited."},"ImprovementPlanResponse":{"properties":{"dossier_id":{"type":"string","format":"uuid","title":"Dossier Id"},"diagnosis":{"type":"string","title":"Diagnosis"},"recommended_mode":{"type":"string","enum":["full_rebuild","messaging_refresh"],"title":"Recommended Mode"},"quality_feedback":{"$ref":"#/components/schemas/QualityFeedback"},"suggestions":{"items":{"$ref":"#/components/schemas/ImprovementSuggestion"},"type":"array","title":"Suggestions"}},"type":"object","required":["dossier_id","diagnosis","recommended_mode","quality_feedback"],"title":"ImprovementPlanResponse","description":"Planner payload for revising a completed or failed dossier."},"ImprovementSuggestion":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"category":{"type":"string","enum":["focus","sources","citations","messaging","training","retry"],"title":"Category"},"rationale":{"type":"string","title":"Rationale"},"recommended_mode":{"type":"string","enum":["full_rebuild","messaging_refresh"],"title":"Recommended Mode"},"suggested_focus_layers":{"anyOf":[{"$ref":"#/components/schemas/FocusLayers"},{"type":"null"}]},"suggested_reference_urls":{"items":{"type":"string"},"type":"array","title":"Suggested Reference Urls"}},"type":"object","required":["id","title","category","rationale","recommended_mode"],"title":"ImprovementSuggestion","description":"Suggested way to improve an existing dossier."},"PaginatedResponse_DossierSummary_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DossierSummary"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"page_size":{"type":"integer","minimum":1.0,"title":"Page Size"},"total_pages":{"type":"integer","minimum":1.0,"title":"Total Pages"}},"type":"object","required":["items","total","page","page_size","total_pages"],"title":"PaginatedResponse[DossierSummary]"},"PendingFocusQuestion":{"properties":{"id":{"type":"string","title":"Id"},"prompt":{"type":"string","title":"Prompt"},"asked_at":{"type":"string","format":"date-time","title":"Asked At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"attempt":{"type":"integer","minimum":1.0,"title":"Attempt"},"research_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Research Summary"},"suggestions":{"items":{"$ref":"#/components/schemas/FocusSuggestion"},"type":"array","title":"Suggestions"},"recommended_next_layer":{"anyOf":[{"type":"string","enum":["topic","question","angle","timeframe"]},{"type":"null"}],"title":"Recommended Next Layer"}},"type":"object","required":["id","prompt","asked_at","expires_at","attempt"],"title":"PendingFocusQuestion","description":"Pending clarification prompt for a dossier focus."},"PortalRequest":{"properties":{"return_url":{"type":"string","maxLength":2000,"title":"Return Url"}},"type":"object","required":["return_url"],"title":"PortalRequest"},"QualityFeedback":{"properties":{"diagnosis":{"type":"string","title":"Diagnosis"},"judge_issues":{"items":{"type":"string"},"type":"array","title":"Judge Issues"},"critique_summary":{"items":{"$ref":"#/components/schemas/CritiqueSummary"},"type":"array","title":"Critique Summary"},"citation_gaps":{"items":{"type":"string"},"type":"array","title":"Citation Gaps"},"source_assessment":{"$ref":"#/components/schemas/SourceAssessment"},"focus_directness_assessment":{"$ref":"#/components/schemas/FocusDirectnessAssessment"},"top_recommendations":{"items":{"type":"string"},"type":"array","title":"Top Recommendations"}},"type":"object","required":["diagnosis","focus_directness_assessment"],"title":"QualityFeedback","description":"Persisted dossier quality feedback used for improvement planning."},"ResponseDuration":{"type":"string","enum":["15s","45s","90s"],"title":"ResponseDuration","description":"Duration category for response variants."},"ResponseTone":{"type":"string","enum":["assertive","diplomatic","educational","empathetic"],"title":"ResponseTone","description":"Tone of the response."},"ResponseVariantWithCitations":{"properties":{"text":{"type":"string","title":"Text","description":"The response text"},"duration":{"$ref":"#/components/schemas/ResponseDuration","description":"Target duration (15s/45s/90s)"},"tone":{"$ref":"#/components/schemas/ResponseTone","description":"Tone of the response","default":"assertive"},"id":{"type":"string","format":"uuid","title":"Id"},"dossier_id":{"type":"string","format":"uuid","title":"Dossier Id"},"word_count":{"type":"integer","title":"Word Count"},"annotated_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Annotated Text","description":"`text` with inline `[CITE:<evidence id>]` markers showing which sentence rests on which source. Every marker id is the `id` of an entry in `citations`; removing the markers gives `text`. Null when there are no inline citations."},"citation_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Citation Ids"},"key_points":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Key Points"},"bridging_lines":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Bridging Lines"},"quality_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quality Score"},"revision_count":{"type":"integer","title":"Revision Count","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"citations":{"items":{"$ref":"#/components/schemas/EvidenceSummary"},"type":"array","title":"Citations"}},"type":"object","required":["text","duration","id","dossier_id","word_count","citation_ids","created_at","updated_at"],"title":"ResponseVariantWithCitations","description":"Response variant with expanded citation details."},"ShareLinkResponse":{"properties":{"share_token":{"type":"string","pattern":"^[A-Za-z0-9_-]{16,128}$","title":"Share Token","description":"Opaque token; the dossier is readable at GET /api/v1/shared/{share_token}"},"shared_at":{"type":"string","format":"date-time","title":"Shared At","description":"When the link was created (ISO 8601)"}},"type":"object","required":["share_token","shared_at"],"title":"ShareLinkResponse","description":"The public read-only link of a dossier."},"SourceAssessment":{"properties":{"discovered_source_count":{"type":"integer","title":"Discovered Source Count","default":0},"reference_url_count":{"type":"integer","title":"Reference Url Count","default":0},"primary_source_present":{"type":"boolean","title":"Primary Source Present","default":false},"diversity_count":{"type":"integer","title":"Diversity Count","default":0},"issue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issue"}},"type":"object","title":"SourceAssessment","description":"Source-set quality summary used by the planner."},"SourceCreate":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url","description":"URL of the source content"},"speaker_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Speaker Name","description":"Name of the speaker"}},"type":"object","required":["url"],"title":"SourceCreate","description":"Schema for creating a new source document (422 for input the columns cannot hold)."},"SourceInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"speaker_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speaker Name"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}},"type":"object","required":["id","url"],"title":"SourceInfo","description":"Brief source info for dossier response."},"SourceResponse":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url","description":"URL of the source content"},"speaker_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speaker Name","description":"Name of the speaker"},"id":{"type":"string","format":"uuid","title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"status":{"$ref":"#/components/schemas/SourceStatus"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"word_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Word Count"},"fetched_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Fetched At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["url","id","status","created_at","updated_at"],"title":"SourceResponse","description":"Schema for source document response."},"SourceStatus":{"type":"string","enum":["pending","fetching","extracting","completed","failed"],"title":"SourceStatus","description":"Status of source document processing."},"SourceWithClaims":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url","description":"URL of the source content"},"speaker_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speaker Name","description":"Name of the speaker"},"id":{"type":"string","format":"uuid","title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"status":{"$ref":"#/components/schemas/SourceStatus"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"word_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Word Count"},"fetched_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Fetched At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"claims":{"items":{"$ref":"#/components/schemas/ClaimResponse"},"type":"array","title":"Claims"},"claim_count":{"type":"integer","title":"Claim Count","description":"Total number of extracted claims","default":0}},"type":"object","required":["url","id","status","created_at","updated_at"],"title":"SourceWithClaims","description":"Schema for source document with extracted claims."},"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"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Clerk session token of the signed-in user"},"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Service API key"}}}}