{"openapi":"3.1.0","info":{"title":"AI Landing Page Generator","version":"0.1.0"},"paths":{"/configurations":{"get":{"summary":"Get Configurations","description":"Get all configurations with pagination","operationId":"get_configurations_configurations_get","parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Config"},"title":"Response Get Configurations Configurations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/configurations/active":{"get":{"summary":"Get Active Config","description":"Get the active configuration (first one by ID)","operationId":"get_active_config_configurations_active_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Config"}}}}}}},"/conversation-flows":{"get":{"summary":"Get Conversation Flows","description":"Get all conversation flows with optional filtering by config_id","operationId":"get_conversation_flows_conversation_flows_get","parameters":[{"name":"config_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Config Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConversationFlow"},"title":"Response Get Conversation Flows Conversation Flows Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Conversation Flow","description":"Create a new conversation flow","operationId":"create_conversation_flow_conversation_flows_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationFlowCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationFlow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/configurations/{config_id}":{"get":{"summary":"Get Configuration","description":"Get a specific configuration by ID","operationId":"get_configuration_configurations__config_id__get","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Config"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/configurations":{"post":{"summary":"Create Configuration","description":"Create a new configuration","operationId":"create_configuration_api_configurations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Config"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/configurations/{config_id}":{"put":{"summary":"Update Configuration","description":"Update an existing configuration","operationId":"update_configuration_api_configurations__config_id__put","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Config"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Configuration","description":"Delete a configuration","operationId":"delete_configuration_api_configurations__config_id__delete","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversation-flows/{flow_id}":{"get":{"summary":"Get Conversation Flow","description":"Get a specific conversation flow by ID","operationId":"get_conversation_flow_conversation_flows__flow_id__get","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationFlow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Conversation Flow","description":"Update an existing conversation flow","operationId":"update_conversation_flow_conversation_flows__flow_id__put","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationFlowUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationFlow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Conversation Flow","description":"Delete a conversation flow","operationId":"delete_conversation_flow_conversation_flows__flow_id__delete","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations":{"get":{"summary":"Get Conversations","description":"Get all conversations with optional filtering by config_id","operationId":"get_conversations_conversations_get","parameters":[{"name":"config_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Config Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Conversation"},"title":"Response Get Conversations Conversations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Conversation","description":"Create a new conversation","operationId":"create_conversation_conversations_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}":{"get":{"summary":"Get Conversation","description":"Get a specific conversation by ID","operationId":"get_conversation_conversations__conversation_id__get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"integer","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Conversation","description":"Update an existing conversation","operationId":"update_conversation_conversations__conversation_id__put","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"integer","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Conversation","description":"Delete a conversation","operationId":"delete_conversation_conversations__conversation_id__delete","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"integer","title":"Conversation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/test-echo":{"post":{"summary":"Test Echo","description":"Debug endpoint to echo back the request body","operationId":"test_echo_test_echo_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/openai/chat":{"post":{"summary":"Process Chat","description":"Process chat message through OpenAI and determine PASS/FAIL response","operationId":"process_chat_openai_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/backend__schemas__ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/configs/{config_id}/flows":{"post":{"summary":"Create Conversation Flow","description":"Create a new conversation flow","operationId":"create_conversation_flow_configs__config_id__flows_post","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationFlowCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationFlow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Get Conversation Flows","description":"Get all conversation flows for a configuration","operationId":"get_conversation_flows_configs__config_id__flows_get","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConversationFlow"},"title":"Response Get Conversation Flows Configs Config Id Flows Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/configs/{config_id}/flows/{flow_id}":{"put":{"summary":"Update Conversation Flow","description":"Update an existing conversation flow","operationId":"update_conversation_flow_configs__config_id__flows__flow_id__put","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}},{"name":"flow_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationFlowCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationFlow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/videos":{"get":{"summary":"Get Available Videos","description":"Get list of available video files","operationId":"get_available_videos_videos_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/configs":{"get":{"summary":"Get All Configs","description":"Fetch all configurations from the database.","operationId":"get_all_configs_configs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Config"},"type":"array","title":"Response Get All Configs Configs Get"}}}}}}},"/chat":{"post":{"summary":"Process Chat","description":"Process chat message and determine PASS/FAIL response","operationId":"process_chat_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/backend__main__ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Config":{"properties":{"page_title":{"type":"string","minLength":1,"title":"Page Title","description":"Title of the landing page"},"heygen_scene_id":{"type":"string","minLength":1,"title":"Heygen Scene Id","description":"HeyGen scene identifier"},"voice_id":{"type":"string","minLength":1,"title":"Voice Id","description":"Voice identifier for the avatar"},"openai_agent_config":{"$ref":"#/components/schemas/OpenAIAgentConfig","description":"OpenAI agent configuration"},"pass_response":{"type":"string","minLength":1,"title":"Pass Response","description":"Response for successful interaction"},"fail_response":{"type":"string","minLength":1,"title":"Fail Response","description":"Response for failed interaction"},"id":{"type":"integer","title":"Id","description":"Unique identifier for the configuration"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Timestamp when the config was created"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when the config was last updated"}},"type":"object","required":["page_title","heygen_scene_id","voice_id","openai_agent_config","pass_response","fail_response","id","created_at"],"title":"Config"},"ConfigCreate":{"properties":{"page_title":{"type":"string","minLength":1,"title":"Page Title","description":"Title of the landing page"},"heygen_scene_id":{"type":"string","minLength":1,"title":"Heygen Scene Id","description":"HeyGen scene identifier"},"voice_id":{"type":"string","minLength":1,"title":"Voice Id","description":"Voice identifier for the avatar"},"openai_agent_config":{"$ref":"#/components/schemas/OpenAIAgentConfig","description":"OpenAI agent configuration"},"pass_response":{"type":"string","minLength":1,"title":"Pass Response","description":"Response for successful interaction"},"fail_response":{"type":"string","minLength":1,"title":"Fail Response","description":"Response for failed interaction"}},"type":"object","required":["page_title","heygen_scene_id","voice_id","openai_agent_config","pass_response","fail_response"],"title":"ConfigCreate"},"ConfigUpdate":{"properties":{"page_title":{"type":"string","minLength":1,"title":"Page Title","description":"Title of the landing page"},"heygen_scene_id":{"type":"string","minLength":1,"title":"Heygen Scene Id","description":"HeyGen scene identifier"},"voice_id":{"type":"string","minLength":1,"title":"Voice Id","description":"Voice identifier for the avatar"},"openai_agent_config":{"$ref":"#/components/schemas/OpenAIAgentConfig","description":"OpenAI agent configuration"},"pass_response":{"type":"string","minLength":1,"title":"Pass Response","description":"Response for successful interaction"},"fail_response":{"type":"string","minLength":1,"title":"Fail Response","description":"Response for failed interaction"}},"type":"object","required":["page_title","heygen_scene_id","voice_id","openai_agent_config","pass_response","fail_response"],"title":"ConfigUpdate"},"Conversation":{"properties":{"config_id":{"type":"integer","title":"Config Id","description":"ID of the associated configuration"},"messages":{"items":{"$ref":"#/components/schemas/Message"},"type":"array","title":"Messages","description":"List of conversation messages"},"status":{"type":"string","title":"Status","description":"Status of the conversation","default":"ongoing"},"id":{"type":"integer","title":"Id","description":"Unique identifier for the conversation"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Timestamp when the conversation was created"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when the conversation was last updated"}},"type":"object","required":["config_id","messages","id","created_at"],"title":"Conversation"},"ConversationCreate":{"properties":{"config_id":{"type":"integer","title":"Config Id","description":"ID of the associated configuration"},"messages":{"items":{"$ref":"#/components/schemas/Message"},"type":"array","title":"Messages","description":"List of conversation messages"},"status":{"type":"string","title":"Status","description":"Status of the conversation","default":"ongoing"}},"type":"object","required":["config_id","messages"],"title":"ConversationCreate"},"ConversationFlow":{"properties":{"config_id":{"type":"integer","title":"Config Id","description":"ID of the associated configuration"},"order":{"type":"integer","minimum":1.0,"title":"Order","description":"Order in which this flow appears"},"video_filename":{"type":"string","minLength":1,"title":"Video Filename","description":"Name of the video file to play"},"system_prompt":{"type":"string","title":"System Prompt","description":"System prompt for the AI"},"agent_question":{"type":"string","title":"Agent Question","description":"Question that will be asked by the AI"},"pass_next":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pass Next","description":"Next flow order number on PASS"},"fail_next":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fail Next","description":"Next flow order number on FAIL"},"video_only":{"type":"boolean","title":"Video Only","description":"If True, plays video and moves to pass_next without input","default":false},"show_form":{"type":"boolean","title":"Show Form","description":"If True, shows a form instead of chat input","default":false},"form_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form Name","description":"Name of the form component to display"},"input_delay":{"type":"integer","minimum":0.0,"title":"Input Delay","description":"Seconds to wait before enabling input","default":0},"id":{"type":"integer","title":"Id","description":"Unique identifier for the flow"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Timestamp when the flow was created"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when the flow was last updated"}},"type":"object","required":["config_id","order","video_filename","system_prompt","agent_question","id","created_at"],"title":"ConversationFlow"},"ConversationFlowCreate":{"properties":{"config_id":{"type":"integer","title":"Config Id","description":"ID of the associated configuration"},"order":{"type":"integer","minimum":1.0,"title":"Order","description":"Order in which this flow appears"},"video_filename":{"type":"string","minLength":1,"title":"Video Filename","description":"Name of the video file to play"},"system_prompt":{"type":"string","title":"System Prompt","description":"System prompt for the AI"},"agent_question":{"type":"string","title":"Agent Question","description":"Question that will be asked by the AI"},"pass_next":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pass Next","description":"Next flow order number on PASS"},"fail_next":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fail Next","description":"Next flow order number on FAIL"},"video_only":{"type":"boolean","title":"Video Only","description":"If True, plays video and moves to pass_next without input","default":false},"show_form":{"type":"boolean","title":"Show Form","description":"If True, shows a form instead of chat input","default":false},"form_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form Name","description":"Name of the form component to display"},"input_delay":{"type":"integer","minimum":0.0,"title":"Input Delay","description":"Seconds to wait before enabling input","default":0}},"type":"object","required":["config_id","order","video_filename","system_prompt","agent_question"],"title":"ConversationFlowCreate"},"ConversationFlowUpdate":{"properties":{"config_id":{"type":"integer","title":"Config Id","description":"ID of the associated configuration"},"order":{"type":"integer","minimum":1.0,"title":"Order","description":"Order in which this flow appears"},"video_filename":{"type":"string","minLength":1,"title":"Video Filename","description":"Name of the video file to play"},"system_prompt":{"type":"string","title":"System Prompt","description":"System prompt for the AI"},"agent_question":{"type":"string","title":"Agent Question","description":"Question that will be asked by the AI"},"pass_next":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pass Next","description":"Next flow order number on PASS"},"fail_next":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fail Next","description":"Next flow order number on FAIL"},"video_only":{"type":"boolean","title":"Video Only","description":"If True, plays video and moves to pass_next without input","default":false},"show_form":{"type":"boolean","title":"Show Form","description":"If True, shows a form instead of chat input","default":false},"form_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form Name","description":"Name of the form component to display"},"input_delay":{"type":"integer","minimum":0.0,"title":"Input Delay","description":"Seconds to wait before enabling input","default":0}},"type":"object","required":["config_id","order","video_filename","system_prompt","agent_question"],"title":"ConversationFlowUpdate"},"ConversationUpdate":{"properties":{"config_id":{"type":"integer","title":"Config Id","description":"ID of the associated configuration"},"messages":{"items":{"$ref":"#/components/schemas/Message"},"type":"array","title":"Messages","description":"List of conversation messages"},"status":{"type":"string","title":"Status","description":"Status of the conversation","default":"ongoing"}},"type":"object","required":["config_id","messages"],"title":"ConversationUpdate"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Message":{"properties":{"role":{"type":"string","title":"Role","description":"Role of the message sender (user/assistant/system)"},"content":{"type":"string","title":"Content","description":"Content of the message"}},"type":"object","required":["role","content"],"title":"Message"},"OpenAIAgentConfig":{"properties":{"assistant_id":{"type":"string","title":"Assistant Id","description":"OpenAI Assistant ID"}},"type":"object","required":["assistant_id"],"title":"OpenAIAgentConfig"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"backend__main__ChatRequest":{"properties":{"system_prompt":{"type":"string","title":"System Prompt"},"agent_question":{"type":"string","title":"Agent Question"},"user_message":{"type":"string","title":"User Message"}},"type":"object","required":["system_prompt","agent_question","user_message"],"title":"ChatRequest"},"backend__schemas__ChatRequest":{"properties":{"system_prompt":{"type":"string","title":"System Prompt","description":"System prompt for OpenAI"},"agent_question":{"type":"string","title":"Agent Question","description":"Question to be asked by the agent"},"user_message":{"type":"string","title":"User Message","description":"Message from the user"}},"type":"object","required":["system_prompt","agent_question","user_message"],"title":"ChatRequest"}}}}