{"openapi":"3.1.0","info":{"title":"Qiplim Studio API","version":"1.0.0","description":"Public API for generating educational widgets (quizzes, flashcards, summaries, etc.) from text sources using AI.","contact":{"name":"Qiplim","url":"https://qiplim.com"}},"servers":[{"url":"{baseUrl}","description":"Qiplim Studio instance","variables":{"baseUrl":{"default":"https://studio.qiplim.com"}}}],"security":[{"BearerAuth":[]}],"paths":{"/api/v1/generate/quiz-interactive":{"post":{"operationId":"generate_quiz_interactive","summary":"Generate a Quiz Interactif widget","description":"Quiz à choix multiples avec scoring et explications","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"questionCount":{"type":"string","enum":["moins","standard","plus"],"default":"standard","description":"Quantite de questions: moins (3-5), standard (7-10), plus (12-18)"},"difficulty":{"type":"string","enum":["easy","medium","hard"],"default":"medium","description":"Niveau de difficulte"}},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/roleplay-conversation":{"post":{"operationId":"generate_roleplay_conversation","summary":"Generate a Jeu de Rôle Conversation widget","description":"Scénario de jeu de rôle pour l'entraînement aux compétences relationnelles","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"roleCount":{"type":"integer","minimum":2,"maximum":6,"default":2,"title":"Nombre de rôles"},"scenario":{"type":"string","title":"Contexte additionnel du scénario"},"personality":{"type":"string","enum":["cooperative","neutral","challenging","difficult"],"default":"neutral","title":"Personnalité des personnages"}},"required":[],"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/wordcloud-interactive":{"post":{"operationId":"generate_wordcloud_interactive","summary":"Generate a Nuage de Mots Interactif widget","description":"Nuage de mots collaboratif pour explorer les concepts clés","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"maxWords":{"type":"integer","minimum":5,"maximum":100,"default":30,"title":"Nombre maximum de mots affichés"},"minWordLength":{"type":"integer","minimum":1,"maximum":5,"default":2,"title":"Longueur minimale des mots"},"maxWordLength":{"type":"integer","minimum":10,"maximum":50,"default":30,"title":"Longueur maximale des mots"}},"required":[],"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/slide-simple":{"post":{"operationId":"generate_slide_simple","summary":"Generate a Slide Simple widget","description":"Generates a single slide with SlideSpec JSON for deterministic rendering","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"intent":{"type":"string","enum":["title","section","content","summary","interactive"],"default":"content","title":"Intent de la slide","description":"Le but principal de cette slide"},"layoutHint":{"type":"string","enum":["auto","simple","two-columns","media-left","media-right","media-center","full-media"],"default":"auto","title":"Suggestion de layout","description":"Le layout suggéré pour cette slide (auto laisse l'IA décider)"},"textDensity":{"type":"string","enum":["minimal","balanced","detailed"],"default":"balanced","title":"Densité de texte","description":"Quantité de texte sur la slide"},"includeImage":{"type":"boolean","default":false,"title":"Inclure une image","description":"Générer une image pour cette slide"},"activitySlot":{"type":"string","enum":["none","quiz","wordcloud","postit"],"default":"none","title":"Activité interactive","description":"Type d'activité à inclure sur la slide"},"keyPoints":{"type":"array","items":{"type":"string"},"title":"Points clés","description":"Points clés à couvrir sur cette slide"}},"required":[],"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/presentation-from-sources":{"post":{"operationId":"generate_presentation_from_sources","summary":"Generate a Presentation depuis Sources widget","description":"Generates a complete presentation deck plan from source documents with v2 architecture","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"slideCount":{"type":"integer","minimum":3,"maximum":50,"default":10,"title":"Nombre de slides","description":"Nombre total de slides dans la présentation"},"textDensity":{"type":"string","enum":["minimal","balanced","detailed"],"default":"balanced","title":"Densité de texte","description":"Quantité de texte par slide"},"tone":{"type":"string","enum":["formel","professionnel","decontracte","pedagogique"],"default":"professionnel","title":"Ton","description":"Le ton général de la présentation"},"includeInteractiveWidgets":{"type":"boolean","default":true,"title":"Inclure des widgets interactifs","description":"Ajouter des quiz, wordclouds ou autres activités"},"imageSource":{"type":"string","enum":["none","ai","unsplash"],"default":"ai","title":"Source des images","description":"Comment générer les images (none, IA, ou Unsplash)"},"targetAudience":{"type":"string","title":"Public cible","description":"Description du public cible de la présentation"},"duration":{"type":"integer","minimum":5,"maximum":120,"title":"Durée (minutes)","description":"Durée estimée de la présentation en minutes"},"learningObjectives":{"type":"array","items":{"type":"string"},"title":"Objectifs pédagogiques","description":"Liste des objectifs d'apprentissage"}},"required":["slideCount"],"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/multiple-choice-interactive":{"post":{"operationId":"generate_multiple_choice_interactive","summary":"Generate a Choix Multiple Interactif widget","description":"Questions a choix multiples avec correction et feedback","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"questionCount":{"type":"integer","minimum":1,"maximum":20,"default":5,"title":"Nombre de questions"},"optionsPerQuestion":{"type":"integer","minimum":2,"maximum":6,"default":4,"title":"Options par question"},"allowMultiple":{"type":"boolean","default":false,"title":"Autoriser les reponses multiples"},"timeLimit":{"type":"integer","minimum":10,"maximum":300,"title":"Temps limite (secondes)"}},"required":["questionCount"],"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/postit-brainstorm":{"post":{"operationId":"generate_postit_brainstorm","summary":"Generate a Post-it Brainstorm widget","description":"Session de brainstorming avec post-its categorises","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"prompt":{"type":"string","title":"Question ou theme","description":"La question ou le theme pour le brainstorming"},"categoryCount":{"type":"integer","minimum":0,"maximum":8,"default":3,"title":"Nombre de categories"},"maxPostIts":{"type":"integer","minimum":1,"maximum":20,"default":5,"title":"Post-its max par participant"},"allowVoting":{"type":"boolean","default":true,"title":"Autoriser le vote"}},"required":[],"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/ranking-prioritization":{"post":{"operationId":"generate_ranking_prioritization","summary":"Generate a Classement par priorite widget","description":"Classement d'elements par ordre de priorite ou de preference","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"prompt":{"type":"string","title":"Consigne de classement","description":"La question ou l'instruction pour le classement"},"itemCount":{"type":"integer","minimum":3,"maximum":15,"default":5,"title":"Nombre d'elements a classer"},"timeLimit":{"type":"integer","minimum":30,"maximum":600,"title":"Temps limite (secondes)"}},"required":[],"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/opentext-reflection":{"post":{"operationId":"generate_opentext_reflection","summary":"Generate a Texte libre - Reflexion widget","description":"Question ouverte pour une reflexion individuelle","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"prompt":{"type":"string","title":"Question ouverte","description":"La question pour la reflexion"},"placeholder":{"type":"string","title":"Texte d'aide","description":"Placeholder dans le champ de saisie"},"minLength":{"type":"integer","minimum":0,"maximum":500,"default":10,"title":"Longueur minimale (caracteres)"},"maxLength":{"type":"integer","minimum":50,"maximum":5000,"default":500,"title":"Longueur maximale (caracteres)"},"timeLimit":{"type":"integer","minimum":30,"maximum":600,"title":"Temps limite (secondes)"}},"required":[],"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/image-generation":{"post":{"operationId":"generate_image_generation","summary":"Generate a Generation d'image widget","description":"Genere une image a partir d'un prompt textuel","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"prompt":{"type":"string","description":"Description detaillee de l'image a generer"},"style":{"type":"string","enum":["photo","illustration","3d","art"],"default":"photo","description":"Style visuel de l'image"},"aspectRatio":{"type":"string","enum":["1:1","16:9","9:16","4:3"],"default":"16:9","description":"Ratio d'aspect de l'image"}},"required":["prompt"],"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/faq-extraction":{"post":{"operationId":"generate_faq_extraction","summary":"Generate a FAQ widget","description":"Questions-reponses frequentes extraites des sources","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"questionCount":{"type":"integer","minimum":3,"maximum":20,"default":8,"title":"Nombre de questions"}},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/glossary-extraction":{"post":{"operationId":"generate_glossary_extraction","summary":"Generate a Glossaire widget","description":"Glossaire de termes et definitions extraits des sources","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"termCount":{"type":"integer","minimum":5,"maximum":50,"default":15,"title":"Nombre de termes"}},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/summary-structured":{"post":{"operationId":"generate_summary_structured","summary":"Generate a Resume structure widget","description":"Resume structure avec sections et points cles","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/flashcard-learning":{"post":{"operationId":"generate_flashcard_learning","summary":"Generate a Fiches d'apprentissage widget","description":"Cartes recto-verso pour la revision","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"cardCount":{"type":"string","enum":["moins","standard","plus"],"default":"standard","title":"Nombre de cartes"},"difficulty":{"type":"string","enum":["facile","moyen","difficile"],"default":"moyen","title":"Difficulte"}},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/timeline-chronological":{"post":{"operationId":"generate_timeline_chronological","summary":"Generate a Frise chronologique widget","description":"Evenements ordonnes sur un axe temporel","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"eventCount":{"type":"integer","minimum":3,"maximum":20,"default":8,"title":"Nombre d'evenements"}},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/report-document":{"post":{"operationId":"generate_report_document","summary":"Generate a Rapport widget","description":"Document structure genere a partir des sources (synthese, guide, article, custom)","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"format":{"type":"string","enum":["synthesis","study-guide","blog-article","custom"],"default":"synthesis","title":"Format du rapport"},"instructions":{"type":"string","title":"Instructions","description":"Preciser la structure, le style ou le focus"}},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/data-table-extraction":{"post":{"operationId":"generate_data_table_extraction","summary":"Generate a Tableau de donnees widget","description":"Extraction de donnees structurees en tableau (colonnes + lignes)","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"instructions":{"type":"string","title":"Instructions","description":"Decrire les donnees a extraire, ex: 'Comparer les 3 technologies'"}},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/mindmap-extraction":{"post":{"operationId":"generate_mindmap_extraction","summary":"Generate a Carte mentale widget","description":"Carte mentale hierarchique extraite des sources","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"maxDepth":{"type":"integer","minimum":2,"maximum":5,"default":3,"title":"Profondeur maximale"}},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/infographic-visual":{"post":{"operationId":"generate_infographic_visual","summary":"Generate a Infographie widget","description":"Poster infographique genere par IA","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"style":{"type":"string","enum":["auto","minimalist","colorful","editorial","scientific","professional"],"default":"auto","title":"Style"},"orientation":{"type":"string","enum":["landscape","portrait","square"],"default":"landscape","title":"Orientation"},"instructions":{"type":"string","title":"Instructions","description":"Optional user instructions to guide the infographic content and layout"}},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/infographic-composition":{"post":{"operationId":"generate_infographic_composition","summary":"Generate a Infographie — Composition widget","description":"Infographie structurée (blocs typés rendus en React/recharts). La génération deux passes (design → remplissage) est portée par lib/infographics/generate-infographic-spec.ts ; ce template sert l'enregistrement (routing + validation) et la préférence de modèle.","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"style":{"type":"string","enum":["auto","minimalist","colorful","editorial","scientific","professional"],"default":"auto","title":"Style"},"orientation":{"type":"string","enum":["landscape","portrait","square"],"default":"landscape","title":"Ratio"},"instructions":{"type":"string","title":"Instructions"}},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/syllabus-generation":{"post":{"operationId":"generate_syllabus_generation","summary":"Generate a Syllabus widget","description":"Programme de formation structure avec objectifs, prerequis et plan detaille","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"locale":{"type":"string","enum":["fr-lmd","fr-secondary","fr-pro","generic"],"default":"generic","title":"Referentiel pedagogique"}},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/session-plan-generation":{"post":{"operationId":"generate_session_plan_generation","summary":"Generate a Plan de seance widget","description":"Plan detaille d'une seance pedagogique avec objectifs, deroulement et activites","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"duration":{"type":"string","default":"1h30","title":"Duree de la seance"}},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/program-overview-generation":{"post":{"operationId":"generate_program_overview_generation","summary":"Generate a Programme widget","description":"Vue d'ensemble d'un programme d'enseignement superieur (UE, credits, competences)","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/class-overview-generation":{"post":{"operationId":"generate_class_overview_generation","summary":"Generate a Classe widget","description":"Vue d'ensemble d'une classe (secondaire) avec progression, chapitres et activites","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"subject":{"type":"string","title":"Matiere"},"grade":{"type":"string","title":"Niveau (ex: Terminale, Seconde)"}},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/qcm-evaluation":{"post":{"operationId":"generate_qcm_evaluation","summary":"Generate a QCM widget","description":"Ensemble de questions a choix multiple avec correction","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"questionCount":{"type":"integer","minimum":2,"maximum":30,"default":10,"title":"Nombre de questions"},"optionsPerQuestion":{"type":"integer","minimum":2,"maximum":6,"default":4,"title":"Options par question"}},"required":["questionCount"],"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/audio-podcast":{"post":{"operationId":"generate_audio_podcast","summary":"Generate a Podcast educatif widget","description":"Genere un podcast educatif a 2 voix a partir des sources du studio","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"format":{"type":"string","enum":["deep-dive","brief","critique","debate"],"default":"deep-dive","description":"Format du podcast"},"targetDuration":{"type":"string","enum":["short","medium","long"],"default":"medium","description":"Duree cible: short (~3 min), medium (~5 min) ou long (~10 min)"},"ttsProvider":{"type":"string","enum":["openai","mistral","elevenlabs","gemini"],"default":"mistral","description":"Fournisseur de synthese vocale"}},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/video-slideshow":{"post":{"operationId":"generate_video_slideshow","summary":"Generate a Video slideshow educative widget","description":"Genere un storyboard de video educative avec slides et narration","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"slideStyle":{"type":"string","enum":["classic","composed","ai-image"],"default":"classic","description":"Moteur de rendu des slides : classic (texte sur fond + images ponctuelles), composed (fond IA + texte HTML net, a venir), ai-image (1 PNG Ideogram par slide, texte dans l'image)"},"slideCount":{"type":"integer","minimum":3,"maximum":30,"default":8,"description":"Nombre de slides (resolu par le worker depuis le preset duree)"},"targetDuration":{"type":"string","enum":["0.5","1","3","5","10","short","standard","long"],"default":"3","description":"Duree cible en minutes ou preset (short=1min, standard=3min, long=5min)"},"tone":{"type":"string","enum":["casual","professional","academic"],"default":"professional","description":"Tonalite de la narration"},"ttsProvider":{"type":"string","enum":["openai","mistral","elevenlabs","gemini"],"default":"mistral","description":"Fournisseur de synthese vocale"}},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/video-slideshow-composed":{"post":{"operationId":"generate_video_slideshow_composed","summary":"Generate a Video slideshow composee widget","description":"Genere une video educative en slides composees : fond visuel IA sur chaque slide + texte court et net affiche par-dessus (citations, chiffres cles, notions)","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"slideStyle":{"type":"string","enum":["composed"],"default":"composed","description":"Moteur de rendu : composed (fond IA + texte HTML net anime)"},"slideCount":{"type":"integer","minimum":3,"maximum":30,"default":8,"description":"Nombre de slides (resolu par le worker depuis le preset duree)"},"targetDuration":{"type":"string","enum":["0.5","1","3","5","10","short","standard","long"],"default":"3","description":"Duree cible en minutes ou preset (short=1min, standard=3min, long=5min)"},"tone":{"type":"string","enum":["casual","professional","academic"],"default":"professional","description":"Tonalite de la narration"},"ttsProvider":{"type":"string","enum":["openai","mistral","elevenlabs","gemini"],"default":"mistral","description":"Fournisseur de synthese vocale"}},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/slide-deck":{"post":{"operationId":"generate_slide_deck","summary":"Generate a Slide deck widget","description":"Slide deck inline (8-12 slides) avec visual identity, 12 layouts riches (titre, citations, stats, charts, timeline, comparaison) + illustrations IA","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"slideCount":{"type":"number","default":8,"minimum":4,"maximum":16,"title":"Nombre de slides"},"tone":{"type":"string","enum":["professionnel","decontracte","pedagogique","formel"],"default":"professionnel","title":"Ton"},"includeImages":{"type":"boolean","default":true,"title":"Generer une image par slide (Ideogram 4 / DALL-E / Flux / Gemini)"},"visualMode":{"type":"string","enum":["html","image"],"default":"html","title":"Mode visuel — HTML editable (defaut) ou Slides images IA (style NotebookLM)"}},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generate/embedding-map":{"post":{"operationId":"generate_embedding_map","summary":"Generate a Carte 3D widget","description":"Atlas 3D navigable des embeddings des sources selectionnees (PCA + topologie k-NN Datascape)","tags":["Generation"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Title of the widget to generate","maxLength":200},"sources":{"type":"array","items":{"type":"string"},"description":"Raw text sources to use as context for generation"},"inputs":{"type":"object","properties":{"maxChunks":{"type":"integer","enum":[200,500,1000],"default":500,"description":"Nombre maximum de chunks representes (echantillonnage stratifie par source au-dela)"},"colorBy":{"type":"string","enum":["source","cluster"],"default":"source","description":"Coloration des noeuds : par source ou par cluster topologique"}},"description":"Type-specific generation parameters"},"language":{"type":"string","default":"fr","description":"Language for generated content"},"provider":{"type":"string","enum":["mistral","openai","anthropic","google"],"description":"Preferred AI provider. Falls back to user config or environment defaults."}}}}}},"responses":{"200":{"description":"Widget generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request (bad type, missing title, invalid inputs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded (100 requests/hour per API key)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds until next allowed request"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/types":{"get":{"operationId":"list_types","summary":"List all available widget types","description":"Returns all widget types that can be generated, with their input schemas.","tags":["Discovery"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"List of available types","content":{"application/json":{"schema":{"type":"object","properties":{"types":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"URL slug for generation"},"templateId":{"type":"string","description":"Full template ID"},"name":{"type":"string"},"version":{"type":"string"},"description":{"type":"string","nullable":true},"widgetType":{"type":"string"},"inputSchema":{"type":"object","description":"JSON Schema for type-specific inputs"}}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/tts-providers":{"get":{"operationId":"list_tts_providers","summary":"List available TTS providers","description":"Returns which TTS providers are available for generating audio (podcast, video narration). Availability depends on configured API keys (BYOK or environment).","tags":["Discovery"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"List of TTS providers with availability","content":{"application/json":{"schema":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["openai","mistral","elevenlabs","gemini"]},"name":{"type":"string"},"available":{"type":"boolean","description":"Whether an API key is configured for this provider"}}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key obtained from Settings > API Keys. Format: sk_..."}},"schemas":{"GenerateResponse":{"type":"object","properties":{"widget":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"data":{"type":"object","description":"Widget-specific generated data"}}},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer"},"outputTokens":{"type":"integer"},"totalTokens":{"type":"integer"},"model":{"type":"string"},"provider":{"type":"string"}}},"template":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"}}}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"details":{"type":"array","items":{"type":"string"},"description":"Detailed validation errors (when applicable)"}},"required":["error"]}}},"tags":[{"name":"Generation","description":"Widget generation endpoints"},{"name":"Discovery","description":"API discovery and introspection"}]}