{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/":{"get":{"summary":"Index","operationId":"index__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/up":{"get":{"summary":"Health Check","operationId":"health_check_up_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"boolean","title":"Response Health Check Up Get"}}}}}}},"/health/redis":{"get":{"summary":"Redis Health Check","description":"Check Redis connection health.\n\nReturns:\n    dict with status and optional error message\n\nStatus values:\n    - \"healthy\": Redis is connected and responding\n    - \"unavailable\": Redis is not configured\n    - \"unhealthy\": Redis is configured but not responding","operationId":"redis_health_check_health_redis_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Redis Health Check Health Redis Get"}}}}}}},"/stats/deepgram-connections":{"get":{"summary":"Get Deepgram Connections","description":"Get active Deepgram connection counts from concurrency limiters.\n\nReturns separate counts for STT and TTS, plus a total.\nThese are derived from the concurrency limiters (source of truth)\nrather than manual counters.","operationId":"get_deepgram_connections_stats_deepgram_connections_get","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer"},"title":"Response Get Deepgram Connections Stats Deepgram Connections Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats/rate-limits":{"get":{"summary":"Get Rate Limit Stats","description":"Get current rate limiting statistics for Deepgram TTS.\n\nReturns metrics for both global concurrency limiting and per-client rate limiting.\nUseful for monitoring capacity and identifying potential issues.","operationId":"get_rate_limit_stats_stats_rate_limits_get","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats/rate-limits/stt":{"get":{"summary":"Get Stt Rate Limit Stats","description":"Get current rate limiting statistics for Deepgram STT.\n\nReturns metrics for both global concurrency limiting and per-client rate limiting.\nUseful for monitoring capacity and identifying potential issues.","operationId":"get_stt_rate_limit_stats_stats_rate_limits_stt_get","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats/rate-limits/stt/inworld":{"get":{"summary":"Get Inworld Stt Rate Limit Stats","description":"Get current rate limiting statistics for Inworld STT.\n\nReported separately from Deepgram STT so dashboards can compare\nprovider-level concurrency/throughput during the POC.","operationId":"get_inworld_stt_rate_limit_stats_stats_rate_limits_stt_inworld_get","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats/rate-limits/stt/assemblyai":{"get":{"summary":"Get Assemblyai Stt Rate Limit Stats","description":"Get current rate limiting statistics for direct AssemblyAI STT.\n\nDistinct from the Inworld stats bucket — the AssemblyAI direct path\nhas its own concurrency budget and its own billing model\n(Universal-Streaming session-time pricing).","operationId":"get_assemblyai_stt_rate_limit_stats_stats_rate_limits_stt_assemblyai_get","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats/rate-limits/elevenlabs":{"get":{"summary":"Get Elevenlabs Rate Limit Stats","description":"Get current rate limiting statistics for ElevenLabs TTS.\n\nReturns per-client rate limiting metrics only.\nElevenLabs handles concurrency limiting on their side with a priority queue.\n\nReference: https://elevenlabs.io/docs/models#concurrency-and-priority","operationId":"get_elevenlabs_rate_limit_stats_stats_rate_limits_elevenlabs_get","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Elevenlabs Rate Limit Stats Stats Rate Limits Elevenlabs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats/rate-limits/openai":{"get":{"summary":"Get Openai Rate Limit Stats","description":"Get current rate limiting statistics for OpenAI TTS.\n\nReturns per-client rate limiting metrics only.\nOpenAI handles concurrency limiting on their side via API rate limits.\n\nReference: https://platform.openai.com/docs/guides/rate-limits","operationId":"get_openai_rate_limit_stats_stats_rate_limits_openai_get","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Openai Rate Limit Stats Stats Rate Limits Openai Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats/rate-limits/xai":{"get":{"summary":"Get Xai Rate Limit Stats","description":"Get current rate limiting statistics for Grok (xAI) TTS.\n\nThe concurrency numbers count incremental WebSocket streams; at capacity\na turn runs in sentence mode over HTTP.","operationId":"get_xai_rate_limit_stats_stats_rate_limits_xai_get","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats/rate-limits/gemini":{"get":{"summary":"Get Gemini Rate Limit Stats","description":"Get current rate limiting statistics for Gemini TTS.\n\nReturns per-client rate limiting metrics only.\nGemini handles concurrency limiting on their side via API rate limits.\n\nReference: https://ai.google.dev/gemini-api/docs/rate-limits","operationId":"get_gemini_rate_limit_stats_stats_rate_limits_gemini_get","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Gemini Rate Limit Stats Stats Rate Limits Gemini Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats/rate-limits/google_cloud":{"get":{"summary":"Get Google Cloud Rate Limit Stats","description":"Get current rate limiting statistics for Google Cloud TTS.\n\nReturns per-client rate limiting metrics only.\nGoogle Cloud handles concurrency limiting on their side via API quotas.","operationId":"get_google_cloud_rate_limit_stats_stats_rate_limits_google_cloud_get","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Google Cloud Rate Limit Stats Stats Rate Limits Google Cloud Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats/rate-limits/inworld":{"get":{"summary":"Get Inworld Rate Limit Stats","description":"Get current rate limiting statistics for Inworld TTS.\n\nReturns both concurrency (connection limit) and per-client rate limiting\nmetrics. The Inworld TTS concurrency ceiling lives in config; at capacity\nthe WS path degrades gracefully to sentence-based HTTP streaming.","operationId":"get_inworld_rate_limit_stats_stats_rate_limits_inworld_get","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats/rate-limits/sse":{"get":{"summary":"Get Sse Rate Limit Stats","description":"Get current rate limiting statistics for SSE conductor events endpoint.\n\nReturns both concurrency (global connection limit) and per-client rate\nlimiting metrics to protect against DoS via long-running SSE connections.","operationId":"get_sse_rate_limit_stats_stats_rate_limits_sse_get","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats/rate-limits/liveavatar":{"get":{"summary":"Get Liveavatar Rate Limit Stats","description":"Get current rate limiting statistics for LiveAvatar Lite Mode.\n\nReturns per-client rate limiting metrics only. LiveAvatar has no\nGlobalConcurrencyLimiter — the handshake opens a paid HeyGen session\n(CostTracker + TTS service), so this limiter is a per-client cost guard,\nnot a vendor capacity ceiling.","operationId":"get_liveavatar_rate_limit_stats_stats_rate_limits_liveavatar_get","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Liveavatar Rate Limit Stats Stats Rate Limits Liveavatar Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats/rate-limits/keyframe":{"get":{"summary":"Get Keyframe Rate Limit Stats","description":"Get current rate limiting statistics for the Keyframe avatar endpoint.\n\nReturns per-client rate limiting metrics only. Keyframe has no\nGlobalConcurrencyLimiter — each handshake POSTs to\napi.keyframelabs.com/v1/sessions and mints billable LiveKit minutes, so\nthis limiter is a per-client cost guard, not a vendor capacity ceiling\n(see KEYFRAME_RATE_LIMIT_PER_CLIENT in config.py).","operationId":"get_keyframe_rate_limit_stats_stats_rate_limits_keyframe_get","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Keyframe Rate Limit Stats Stats Rate Limits Keyframe Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats/rate-limits/anam":{"get":{"summary":"Get Anam Rate Limit Stats","description":"Per-client rate limiting for /ws/anam. Like Keyframe's, a cost guard:\neach handshake creates a billed Anam session token (see\nANAM_RATE_LIMIT_PER_CLIENT in config.py). ``route`` is ``disabled`` while\nANAM_ENABLED is off, ``not_configured`` with no key, else ``enabled``.","operationId":"get_anam_rate_limit_stats_stats_rate_limits_anam_get","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Anam Rate Limit Stats Stats Rate Limits Anam Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tts/deepgram":{"post":{"summary":"Rest Tts Deepgram","description":"REST API endpoint for text-to-speech using Deepgram.\nReturns streaming MP3 audio.\n\nRequires authentication via api_key header.\n\nRequest body should contain:\n- text: str (required) - Text to synthesize\n- model: str (required unless voice is sent; the voice IS the model) - Deepgram TTS model\n- sample_rate: int (optional) - Sample rate in Hz (default: 24000)\n- encoding: str (optional) - Audio encoding, should be \"mp3\" for REST (default: mp3)\n- client_id: str (optional) - Client identifier for tracking\n- user_id: str (optional) - User identifier for tracking\n- run_uuid: str (optional) - Run UUID for tracking","operationId":"rest_tts_deepgram_tts_deepgram_post","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tts/openai":{"post":{"summary":"Rest Tts Openai","description":"REST API endpoint for text-to-speech using OpenAI.\nReturns streaming audio in the specified format (default: MP3).\n\nRequires authentication via api_key header.\n\nOpenAI TTS API reference: https://platform.openai.com/docs/api-reference/audio/createSpeech\n\nRequest body should contain:\n- text: str (required) - Text to synthesize (max 4096 characters)\n- model: str (required) - OpenAI TTS model\n- voice: str (optional) - OpenAI voice (default: alloy)\n- response_format: str (optional) - Audio format (default: mp3)\n- speed: float (optional) - Playback speed 0.25-4.0 (default: 1.0)\n- instructions: str (optional) - Style control for gpt-4o-mini-tts only\n- client_id: str (optional) - Client identifier for tracking\n- user_id: str (optional) - User identifier for tracking\n- run_uuid: str (optional) - Run UUID for tracking","operationId":"rest_tts_openai_tts_openai_post","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tts/gemini":{"post":{"summary":"Rest Tts Gemini","description":"REST API endpoint for text-to-speech using Google Gemini.\nReturns streaming audio in WAV format.\n\nRequires authentication via api_key header.\n\nGemini TTS API reference: https://ai.google.dev/gemini-api/docs/speech-generation\n\nRequest body should contain:\n- text: str (required) - Text to synthesize (max 4000 characters)\n- model: str (required) - Gemini TTS model\n- voice: str (optional) - Gemini voice name (default: Kore)\n- style_instructions: str (optional) - Style control for voice customization\n- client_id: str (optional) - Client identifier for tracking\n- user_id: str (optional) - User identifier for tracking\n- run_uuid: str (optional) - Run UUID for tracking","operationId":"rest_tts_gemini_tts_gemini_post","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tts/google_cloud":{"post":{"summary":"Rest Tts Google Cloud","description":"REST API endpoint for text-to-speech using Google Cloud TTS (Chirp 3: HD).\nReturns streaming audio in MP3 or PCM format.\n\nRequires authentication via api_key header.\n\nRequest body should contain:\n- text: str (required) - Text to synthesize (max 5000 characters)\n- voice: str (optional) - Full voice name (default: en-US-Chirp3-HD-Charon)\n- encoding: str (optional) - Audio encoding: mp3 or pcm (default: mp3)\n- speaking_rate: float (optional) - Speech speed 0.25-2.0 (omitted or 1.0 sends no rate)\n- client_id: str (optional) - Client identifier for tracking\n- user_id: str (optional) - User identifier for tracking\n- run_uuid: str (optional) - Run UUID for tracking","operationId":"rest_tts_google_cloud_tts_google_cloud_post","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tts/inworld":{"post":{"summary":"Rest Tts Inworld","description":"REST API endpoint for text-to-speech using Inworld.\nReturns streaming audio in the requested encoding format.\n\nRequires authentication via api_key header.\n\nInworld TTS API reference: https://docs.inworld.ai/api-reference/ttsAPI/texttospeech/synthesize-speech\n\nRequest body should contain:\n- text: str (required) - Text to synthesize (max 2000 characters)\n- voice_id: str (optional) - Inworld voice identifier (default: Dennis)\n- model_id: str (required) - Inworld TTS model\n- encoding: str (optional) - Audio encoding (default: mp3)\n- sample_rate: int (optional) - Sample rate in Hz (default: 48000)\n- delivery_mode: str (optional) - STABLE/BALANCED/CREATIVE (TTS-2 family)\n- text_normalization: str (optional) - ON/OFF for Inworld's applyTextNormalization\n- language: str (optional) - BCP-47 tag (es-MX, ja); TTS-2 family only, omitted when unset\n  (number/date/abbreviation expansion). Omit to let Inworld decide per request — that\n  absence IS the default, so an omitted field is not the same as OFF.\n- speaking_rate: float (optional) - Speech speed 0.5-1.5 (default: 1.0)\n- client_id: str (optional) - Client identifier for tracking\n- user_id: str (optional) - User identifier for tracking\n- run_uuid: str (optional) - Run UUID for tracking","operationId":"rest_tts_inworld_tts_inworld_post","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tts/xai":{"post":{"summary":"Rest Tts Xai","description":"REST API endpoint for text-to-speech using Grok (xAI).\nReturns streaming MP3 audio.\n\nRequires authentication via api_key header.\n\nRequest body should contain:\n- text: str (required) - Text to synthesize\n- voice_id: str (optional) - xAI voice identifier\n- language: str (optional) - xAI language code (es-MX, ja) or auto; anything else is auto\n- speed: float (optional) - Speech speed 0.7-1.5 (default: 1.0)\n- client_id: str (optional) - Client identifier for tracking\n- user_id: str (optional) - User identifier for tracking\n- run_uuid: str (optional) - Run UUID for tracking","operationId":"rest_tts_xai_tts_xai_post","parameters":[{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sse/conductor/run/{run_uuid}/events":{"get":{"summary":"Sse Conductor Events","description":"Stream conductor inference events for a conversation run via Server-Sent Events.\n\nSubscribes to Redis pub/sub channel for real-time conductor events during\nvirtual conversation runs. Events include pre/post inference data, workflow\nchanges, and timing information.\n\nAuthentication is via signed URL (expires + sig parameters) instead of api-key\nheader because browser EventSource API cannot send custom headers. The signed\nURL is generated by Django and proves the user was authorized to access this run.\n\nSecurity: Supports signed URL verification to ensure users can only access\ntheir own runs. When config.RUN_URL_SIGNING_SECRET is configured, expires\nand sig are both required and the signature is verified; a request missing\neither is rejected with 403 before any rate limiting or concurrency slot is\ntouched. With the secret unset (local dev), unsigned requests are accepted.\n\nArgs:\n    run_uuid: The UUID of the conversation run to subscribe to\n    expires: Unix timestamp string when the signature expires (required if RUN_URL_SIGNING_SECRET is set)\n    sig: HMAC-SHA256 signature of \"{run_uuid}:{expires}\" (required if RUN_URL_SIGNING_SECRET is set)\n\nReturns:\n    StreamingResponse with SSE content type for real-time event delivery\n\nEvents:\n    - connected: Initial connection confirmation with run_uuid\n    - conductor_event: Inference event with full debug info\n    - error: Error message if something goes wrong\n\nExample event:\n    event: conductor_event\n    data: {\"uuid\": \"...\", \"sequence\": \"pre\", \"workflow\": \"certification\", ...}","operationId":"sse_conductor_events_sse_conductor_run__run_uuid__events_get","parameters":[{"name":"run_uuid","in":"path","required":true,"schema":{"type":"string","title":"Run Uuid"}},{"name":"expires","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unix timestamp when signature expires","title":"Expires"},"description":"Unix timestamp when signature expires"},{"name":"sig","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HMAC-SHA256 signature","title":"Sig"},"description":"HMAC-SHA256 signature"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conductor/run/{run_uuid}/events":{"get":{"summary":"Get Conductor Events History","description":"Get historical conductor inference events for a conversation run.\n\nFetches prior events from the Copient Trainer backend for backfill when\nthe conductor feed sidebar is first opened. This allows users to see\nevents that occurred before they opened the sidebar.\n\nRequires authentication via api_key header.\n\nSecurity: Supports signed URL verification to ensure users can only access\ntheir own runs. When config.RUN_URL_SIGNING_SECRET is configured and expires/sig\nparams are provided, the signature is verified. During rollout, unsigned\nrequests are allowed with a warning logged.\n\nArgs:\n    run_uuid: The UUID of the conversation run\n    expires: Unix timestamp string when the signature expires (optional during rollout)\n    sig: HMAC-SHA256 signature of \"{run_uuid}:{expires}\" (optional during rollout)\n\nReturns:\n    List of conductor event dictionaries in chronological order\n\nNote:\n    This endpoint proxies to the Copient Trainer backend API.\n    The actual event storage is in the ConductorInference Django model.","operationId":"get_conductor_events_history_api_conductor_run__run_uuid__events_get","parameters":[{"name":"run_uuid","in":"path","required":true,"schema":{"type":"string","title":"Run Uuid"}},{"name":"expires","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unix timestamp when signature expires","title":"Expires"},"description":"Unix timestamp when signature expires"},{"name":"sig","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HMAC-SHA256 signature","title":"Sig"},"description":"HMAC-SHA256 signature"},{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sse/conductor/run/{run_uuid}/workflow-state":{"get":{"summary":"Sse Workflow State","description":"Stream workflow state changes for real-time sidebar updates via Server-Sent Events.\n\nSubscribes to Redis pub/sub channel for real-time workflow state changes during\nvirtual conversation runs. Events include full sanitized workflow state,\nchanged fields, and trigger source.\n\nAuthentication is via signed URL (expires + sig parameters) instead of api-key\nheader because browser EventSource API cannot send custom headers. The signed\nURL is generated by Django and proves the user was authorized to access this run.\n\nSecurity: Supports signed URL verification to ensure users can only access\ntheir own runs. When config.RUN_URL_SIGNING_SECRET is configured, expires\nand sig are both required and the signature is verified; a request missing\neither is rejected with 403 before any rate limiting or concurrency slot is\ntouched. With the secret unset (local dev), unsigned requests are accepted.\n\nArgs:\n    run_uuid: The UUID of the conversation run to subscribe to\n    expires: Unix timestamp string when the signature expires (required if RUN_URL_SIGNING_SECRET is set)\n    sig: HMAC-SHA256 signature of \"{run_uuid}:{expires}\" (required if RUN_URL_SIGNING_SECRET is set)\n\nReturns:\n    StreamingResponse with SSE content type for real-time event delivery\n\nEvents:\n    - connected: Initial connection confirmation with run_uuid\n    - workflow_sidebar_update: Pre-rendered sidebar sections for UI display\n    - error: Error message if something goes wrong\n\nExample event:\n    event: workflow_sidebar_update\n    data: {\"uuid\": \"...\", \"run_uuid\": \"...\", \"sections\": [...], \"trigger_source\": \"...\"}","operationId":"sse_workflow_state_sse_conductor_run__run_uuid__workflow_state_get","parameters":[{"name":"run_uuid","in":"path","required":true,"schema":{"type":"string","title":"Run Uuid"}},{"name":"expires","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unix timestamp when signature expires","title":"Expires"},"description":"Unix timestamp when signature expires"},{"name":"sig","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HMAC-SHA256 signature","title":"Sig"},"description":"HMAC-SHA256 signature"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conductor/run/{run_uuid}/workflow-state-changes":{"get":{"summary":"Get Workflow State History","description":"Get historical workflow state changes for a conversation run.\n\nFetches prior workflow state events from the Copient Trainer backend for backfill\nwhen the workflow sidebar is first opened. This allows users to see state changes\nthat occurred before they opened the sidebar.\n\nRequires authentication via api_key header.\n\nSecurity: Supports signed URL verification to ensure users can only access\ntheir own runs. When config.RUN_URL_SIGNING_SECRET is configured and expires/sig\nparams are provided, the signature is verified. During rollout, unsigned\nrequests are allowed with a warning logged.\n\nArgs:\n    run_uuid: The UUID of the conversation run\n    expires: Unix timestamp string when the signature expires (optional during rollout)\n    sig: HMAC-SHA256 signature of \"{run_uuid}:{expires}\" (optional during rollout)\n    workflow: Optional workflow name to filter by\n    limit: Maximum number of records to return (default: 100, max: 500)\n\nReturns:\n    List of workflow state change dictionaries in chronological order\n\nNote:\n    This endpoint proxies to the Copient Trainer backend API.\n    The actual state storage is in the WorkflowStateChange Django model.","operationId":"get_workflow_state_history_api_conductor_run__run_uuid__workflow_state_changes_get","parameters":[{"name":"run_uuid","in":"path","required":true,"schema":{"type":"string","title":"Run Uuid"}},{"name":"expires","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unix timestamp when signature expires","title":"Expires"},"description":"Unix timestamp when signature expires"},{"name":"sig","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HMAC-SHA256 signature","title":"Sig"},"description":"HMAC-SHA256 signature"},{"name":"workflow","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by workflow name","title":"Workflow"},"description":"Filter by workflow name"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"description":"Maximum number of records to return","default":100,"title":"Limit"},"description":"Maximum number of records to return"},{"name":"api-key","in":"header","required":true,"schema":{"type":"string","title":"Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ClientRateLimitingStats":{"properties":{"name":{"type":"string","title":"Name"},"max_requests_per_window":{"type":"integer","title":"Max Requests Per Window"},"window_seconds":{"type":"number","title":"Window Seconds"},"tracked_clients":{"type":"integer","title":"Tracked Clients"},"total_rate_limited":{"type":"integer","title":"Total Rate Limited"},"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["name","max_requests_per_window","window_seconds","tracked_clients","total_rate_limited","enabled"],"title":"ClientRateLimitingStats","description":"Statistics for per-client rate limiting."},"ConcurrencyStats":{"properties":{"name":{"type":"string","title":"Name"},"max_concurrent":{"type":"integer","title":"Max Concurrent"},"active_count":{"type":"integer","title":"Active Count"},"queued_count":{"type":"integer","title":"Queued Count"},"available_slots":{"type":"integer","title":"Available Slots"},"queue_timeout_seconds":{"type":"number","title":"Queue Timeout Seconds"},"total_timeouts":{"type":"integer","title":"Total Timeouts"},"total_acquired":{"type":"integer","title":"Total Acquired"},"total_rejected":{"type":"integer","title":"Total Rejected"}},"type":"object","required":["name","max_concurrent","active_count","queued_count","available_slots","queue_timeout_seconds","total_timeouts","total_acquired","total_rejected"],"title":"ConcurrencyStats","description":"Statistics for global concurrency limiting."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthStats":{"properties":{"utilization_percent":{"type":"number","title":"Utilization Percent"},"is_at_capacity":{"type":"boolean","title":"Is At Capacity"},"queued_requests":{"type":"integer","title":"Queued Requests"}},"type":"object","required":["utilization_percent","is_at_capacity","queued_requests"],"title":"HealthStats","description":"Health metrics derived from rate limit stats."},"RateLimitStatsResponse":{"properties":{"concurrency":{"$ref":"#/components/schemas/ConcurrencyStats"},"client_rate_limiting":{"$ref":"#/components/schemas/ClientRateLimitingStats"},"health":{"$ref":"#/components/schemas/HealthStats"}},"type":"object","required":["concurrency","client_rate_limiting","health"],"title":"RateLimitStatsResponse","description":"Complete response for /stats/rate-limits endpoint."},"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"}}}}