{"openapi":"3.1.0","info":{"title":"HubMix — Gaspard IA public API","description":"\n**HubMix**, an AI hub made of modules, for businesses, partners (schools, universities,\ncities, organisations, apps) and widgets embedded on their sites. Its first module, **Gaspard\nIA**, offers these products (`GET /products`):\n\n- **Gaspard**: the AI assistant (written chat or talking avatar on a site), in\n  conversations (JSON or Server-Sent Events), with sources;\n  listings come from near the asker (their town, else their country). Scope `assistant:public`.\n- **Tutor**: explanations of a lesson, quizzes, flashcards, grading. Scope `tutor`.\n- **Trust**: scam and quality signals of listings (housing, jobs, marketplace). Scope\n  `trust:assess`.\n- **Embeddings**: vectors of short texts. Scope `embeddings`.\n- **Knowledge search**: passages of Gaspard's knowledge base, with sources. Scope\n  `knowledge:search`.\n\nHubMix's team sets up each application and its products (on request:\n`/assistant-ia`); widgets get Gaspard and the knowledge search only.\n\n**Partners** call from their servers with a secret key: `Authorization: Bearer vck_live_…`,\noptionally with `X-End-User: <your user id>` (only a keyed hash is stored).\n\n**Widgets** call from a browser with a publishable key `X-Gaspard-Key: vcp_live_…`, from one\nof the origins registered for it, and a visitor token (`Authorization: Bearer vst_…`) from\n`POST /sessions`, which requires the visitor's consent to the privacy notice.\n\nConversations are stored on our servers in Switzerland with personal data masked, kept\nfor a limited time, and can be exported or erased by the visitor (`/visitors/me`).\n\nQuotas are announced with `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`;\nbeyond them the answer is `429` with `Retry-After`. Every error has the shape\n`{\"error\": {\"code\", \"message\"}, \"request_id\"}`.\n","version":"1.1.0"},"paths":{"/privacy-notice":{"get":{"tags":["sessions"],"summary":"Privacy Notice","description":"The notice to show (and have accepted) before opening a session.","operationId":"privacy_notice_privacy_notice_get","security":[{"Bearer":[]},{"WidgetKey":[]}],"parameters":[{"name":"locale","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Locale","default":"fr"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivacyNoticeResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}}}},"/assistant":{"get":{"tags":["sessions"],"summary":"Assistant Profile","description":"Who Gaspard is on this application: the product's name, the widget's welcome and its\nsuggested questions when the product gave him its context; ``product_name`` is ``null``\nwhen he is Valais Connect's general assistant. ``enabled`` false: the console turned the\nproduct's assistant off. ``mode`` ``avatar``: a talking avatar (when the avatars' speech\nservice is configured; otherwise the written chat).","operationId":"assistant_profile_assistant_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantProfileResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]},{"WidgetKey":[]}]}},"/assistant/avatar":{"post":{"tags":["sessions"],"summary":"Avatar Session","description":"Widgets in avatar mode: a 10-minute Azure AI Speech token and the video relay's\ncredentials, for the browser to show the talking avatar and recognise the visitor's speech.\nThe service's key never leaves the server. 403 ``avatar_not_offered`` when this\napplication's assistant is not an avatar; 503 ``avatar_unavailable`` otherwise.","operationId":"avatar_session_assistant_avatar_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarSessionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]},{"WidgetKey":[]},{"EndUser":[]}]}},"/sessions":{"post":{"tags":["sessions"],"summary":"Open Session","description":"Widgets: opens (or renews) a visitor session once the privacy notice is accepted.\n\nSend the publishable key from an allowed origin; to keep the same visitor, also send the\ncurrent visitor token. Limited per address.","operationId":"open_session_sessions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]},{"WidgetKey":[]}]}},"/gaspard/conversations":{"post":{"tags":["conversations"],"summary":"Start Conversation","operationId":"start_conversation_gaspard_conversations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartConversationRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]},{"WidgetKey":[]},{"EndUser":[]}]}},"/gaspard/conversations/{conversation_id}":{"get":{"tags":["conversations"],"summary":"Show Conversation","description":"The conversation as stored (personal data masked).","operationId":"show_conversation_gaspard_conversations__conversation_id__get","security":[{"Bearer":[]},{"WidgetKey":[]},{"EndUser":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationThreadResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}}}},"/gaspard/conversations/{conversation_id}/messages":{"post":{"tags":["conversations"],"summary":"Ask","description":"Asks Gaspard; the question and the answer are stored (personal data masked).","operationId":"ask_gaspard_conversations__conversation_id__messages_post","security":[{"Bearer":[]},{"WidgetKey":[]},{"EndUser":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageRequest"}}}},"responses":{"200":{"description":"JSON answer, or Server-Sent Events with ``Accept: text/event-stream``: ``delta`` {text}…, then ``answer`` (same fields as the JSON answer) or ``error`` {code}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerResponse"}},"text/event-stream":{"schema":{"type":"string"},"example":"event: delta\ndata: {\"text\": \"Bonjour\"}\n\nevent: answer\ndata: {\"conversation_id\": \"cnv_…\", \"question_id\": \"msg_…\", \"message_id\": \"msg_…\", \"text\": \"Bonjour…\", \"pages\": [], \"sources\": [], \"listings\": [], \"remaining_messages\": 58}\n\n"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}}}},"/gaspard/messages/{message_id}/feedback":{"post":{"tags":["conversations"],"summary":"Give Feedback","description":"Rates one of Gaspard's answers (a new rating replaces the previous one).","operationId":"give_feedback_gaspard_messages__message_id__feedback_post","security":[{"Bearer":[]},{"WidgetKey":[]},{"EndUser":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}}}},"/visitors/me/data":{"get":{"tags":["privacy"],"summary":"Export My Data","description":"Everything kept about the visitor (right of access). Partners: send ``X-End-User``.","operationId":"export_my_data_visitors_me_data_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitorDataResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]},{"WidgetKey":[]},{"EndUser":[]}]}},"/visitors/me/consent":{"get":{"tags":["privacy"],"summary":"Show My Consent","description":"The consent in force. Partners: send ``X-End-User`` for each of your users.","operationId":"show_my_consent_visitors_me_consent_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]},{"WidgetKey":[]},{"EndUser":[]}]},"put":{"tags":["privacy"],"summary":"Give My Consent","description":"Records the person's consent to the notice in force (and, if they wish, to improving\nGaspard). Partners: show your user the notice first, then call this with ``X-End-User``;\nonly users who allowed it ever enter the training dataset.","operationId":"give_my_consent_visitors_me_consent_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]},{"WidgetKey":[]},{"EndUser":[]}]},"delete":{"tags":["privacy"],"summary":"Withdraw My Consent","description":"Withdraws the consent: no more training use from now on; a widget visitor must accept\nthe notice again to keep talking. To also delete what is kept, use ``DELETE /visitors/me``.","operationId":"withdraw_my_consent_visitors_me_consent_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]},{"WidgetKey":[]},{"EndUser":[]}]}},"/visitors/me":{"delete":{"tags":["privacy"],"summary":"Erase Me","description":"Erases the visitor and every conversation; their visitor token stops working.","operationId":"erase_me_visitors_me_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErasureResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]},{"WidgetKey":[]},{"EndUser":[]}]}},"/knowledge/search":{"post":{"tags":["knowledge"],"summary":"Search Knowledge","description":"Passages of Gaspard's knowledge base, with their sources (scope ``knowledge:search``).\n\nWhat each source allows is applied (« Données des annonces et attribution »): passages of\n``facts`` sources come with their title, source and link but an empty ``text``.","operationId":"search_knowledge_knowledge_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSearchResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]},{"WidgetKey":[]},{"EndUser":[]}]}},"/products":{"get":{"tags":["products"],"summary":"List Products","description":"The hub's products: what each does, the scope it needs, its routes and what it counts.\nNo key needed.","operationId":"list_products_products_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/tutor/explanations":{"post":{"tags":["tutor"],"summary":"Tutor Explanation","description":"Gaspard explains a lesson in a conversation (oldest message first, the learner's last).\nScope ``tutor``; counted in tokens.","operationId":"tutor_explanation_tutor_explanations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicExplanationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TutorReplyResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]},{"WidgetKey":[]},{"EndUser":[]}]}},"/tutor/quizzes":{"post":{"tags":["tutor"],"summary":"Tutor Quiz","description":"A quiz on a lesson (single or multiple choice, true/false, short answers).","operationId":"tutor_quiz_tutor_quizzes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicQuizRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuizResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]},{"WidgetKey":[]},{"EndUser":[]}]}},"/tutor/flashcards":{"post":{"tags":["tutor"],"summary":"Tutor Flashcards","description":"Revision cards (front, back) from a lesson.","operationId":"tutor_flashcards_tutor_flashcards_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicFlashcardsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlashcardsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]},{"WidgetKey":[]},{"EndUser":[]}]}},"/tutor/grades":{"post":{"tags":["tutor"],"summary":"Tutor Grade","description":"Grades a free answer against the expected one: a score, a verdict and a kind\nfeedback.","operationId":"tutor_grade_tutor_grades_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicGradeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradeResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]},{"WidgetKey":[]},{"EndUser":[]}]}},"/trust/assessments":{"post":{"tags":["trust"],"summary":"Trust Assessments","description":"Scam and quality signals of 1 to 50 listings (housing, opportunities, marketplace), in\nthe order received: a risk score from 0 to 100, a level and the words found. Rules only,\nnothing stored. Scope ``trust:assess``; counted in listings.","operationId":"trust_assessments_trust_assessments_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrustRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrustResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]},{"WidgetKey":[]},{"EndUser":[]}]}},"/embeddings":{"post":{"tags":["embeddings"],"summary":"Embeddings","description":"Vectors of 1 to 32 short texts (multilingual model, unit length). Nothing stored.\nScope ``embeddings``; counted in texts.","operationId":"embeddings_embeddings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEmbeddingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEmbeddingsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]},{"WidgetKey":[]},{"EndUser":[]}]}},"/mcp":{"post":{"tags":["mcp"],"summary":"Mcp","description":"Model Context Protocol endpoint (Streamable HTTP): ``initialize``, ``tools/list``,\n``tools/call``, ``ping``. Server keys only (a widget's key is refused).","operationId":"mcp_mcp_post","responses":{"200":{"description":"JSON-RPC answer(s).","content":{"application/json":{"schema":{}}}},"202":{"description":"Notification(s) accepted."}},"security":[{"Bearer":[]},{"WidgetKey":[]},{"EndUser":[]}]}},"/remix/chat/completions":{"post":{"tags":["remix"],"summary":"Chat Completions","operationId":"chat_completions_remix_chat_completions_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Remix-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"X-Remix-User"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/remix/inspect":{"post":{"tags":["remix"],"summary":"Inspect Text","operationId":"inspect_text_remix_inspect_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Remix-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"X-Remix-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InspectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/remix/agent/check":{"post":{"tags":["remix"],"summary":"Check Tool","operationId":"check_tool_remix_agent_check_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Remix-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"X-Remix-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/remix/agent/approvals/{approval_id}":{"get":{"tags":["remix"],"summary":"Approval Status","operationId":"approval_status_remix_agent_approvals__approval_id__get","parameters":[{"name":"approval_id","in":"path","required":true,"schema":{"type":"string","title":"Approval Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/remix/agent/approvals/{approval_id}/decision":{"post":{"tags":["remix"],"summary":"Decide Approval","operationId":"decide_approval_remix_agent_approvals__approval_id__decision_post","parameters":[{"name":"approval_id","in":"path","required":true,"schema":{"type":"string","title":"Approval Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/remix/documents/inspect":{"post":{"tags":["remix"],"summary":"Inspect Document","operationId":"inspect_document_remix_documents_inspect_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Remix-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"X-Remix-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/remix/retrieval/filter":{"post":{"tags":["remix"],"summary":"Filter Retrieval","operationId":"filter_retrieval_remix_retrieval_filter_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Remix-User","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"X-Remix-User"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrievalRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/remix/edge/policies":{"get":{"tags":["remix"],"summary":"Edge Policies","operationId":"edge_policies_remix_edge_policies_get","parameters":[{"name":"version","in":"query","required":false,"schema":{"type":"string","default":"","title":"Version"}},{"name":"host","in":"query","required":false,"schema":{"type":"string","default":"","title":"Host"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/remix/edge/events":{"post":{"tags":["remix"],"summary":"Edge Events","operationId":"edge_events_remix_edge_events_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgeEventsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/remix/edge/approvals":{"post":{"tags":["remix"],"summary":"Edge Approval Request","operationId":"edge_approval_request_remix_edge_approvals_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgeApprovalRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/remix/edge/approvals/{app_id}/{approval_id}":{"get":{"tags":["remix"],"summary":"Edge Approval","operationId":"edge_approval_remix_edge_approvals__app_id___approval_id__get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","title":"App Id"}},{"name":"approval_id","in":"path","required":true,"schema":{"type":"string","title":"Approval Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AnswerResponse":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"question_id":{"type":"string","title":"Question Id"},"message_id":{"type":"string","title":"Message Id"},"text":{"type":"string","title":"Text"},"pages":{"items":{"type":"string"},"type":"array","title":"Pages","description":"Valais Connect pages Gaspard suggests opening."},"sources":{"items":{"$ref":"#/components/schemas/SourceSchema"},"type":"array","title":"Sources"},"listings":{"items":{"$ref":"#/components/schemas/ListingSchema"},"type":"array","title":"Listings"},"remaining_messages":{"type":"integer","title":"Remaining Messages"}},"type":"object","required":["conversation_id","question_id","message_id","text","pages","sources","listings","remaining_messages"],"title":"AnswerResponse"},"AssistantMessage":{"properties":{"role":{"type":"string","const":"assistant","title":"Role"},"content":{"type":"string","maxLength":8000,"minLength":1,"title":"Content"}},"type":"object","required":["role","content"],"title":"AssistantMessage"},"AssistantProfileResponse":{"properties":{"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name","description":"The product Gaspard is the assistant of; ``null``: Valais Connect's."},"welcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Welcome","description":"The widget's first message."},"suggestions":{"items":{"type":"string"},"type":"array","title":"Suggestions","description":"Questions to start with."},"enabled":{"type":"boolean","title":"Enabled","description":"``false``: the product's assistant is turned off; hide the widget.","default":true},"mode":{"type":"string","enum":["text","avatar"],"title":"Mode","description":"``avatar``: a talking avatar answers aloud (``POST /assistant/avatar``).","default":"text"},"avatar":{"anyOf":[{"$ref":"#/components/schemas/AvatarProfile"},{"type":"null"}]}},"type":"object","title":"AssistantProfileResponse"},"AvatarProfile":{"properties":{"character":{"type":"string","title":"Character","description":"Azure's avatar (``lisa``, ``harry``…)."},"style":{"type":"string","title":"Style","description":"Its style (``casual-sitting``…)."}},"type":"object","required":["character","style"],"title":"AvatarProfile"},"AvatarSessionRequest":{"properties":{"locale":{"$ref":"#/components/schemas/Locale","default":"fr"}},"type":"object","title":"AvatarSessionRequest"},"AvatarSessionResponse":{"properties":{"region":{"type":"string","title":"Region"},"token":{"type":"string","title":"Token","description":"Azure speech token (``SpeechConfig.fromAuthorizationToken``)."},"expires_in":{"type":"integer","title":"Expires In"},"ice_servers":{"items":{"$ref":"#/components/schemas/IceServer"},"type":"array","title":"Ice Servers"},"character":{"type":"string","title":"Character"},"style":{"type":"string","title":"Style"},"voice":{"type":"string","title":"Voice","description":"The Azure voice the avatar speaks with (``fr-CH-…``)."},"language":{"type":"string","title":"Language","description":"The language the visitor's speech is recognised in."},"custom":{"type":"boolean","title":"Custom","description":"A custom avatar (``AvatarConfig.customized = true`` in the Speech SDK).","default":false}},"type":"object","required":["region","token","expires_in","ice_servers","character","style","voice","language"],"title":"AvatarSessionResponse","description":"What the browser needs to talk with the avatar through Azure AI Speech (Speech SDK,\n``AvatarSynthesizer`` over WebRTC); ask again before ``expires_in`` seconds."},"ChoiceSchema":{"properties":{"id":{"type":"string","title":"Id"},"text":{"type":"string","title":"Text"}},"type":"object","required":["id","text"],"title":"ChoiceSchema"},"ChunkSchema":{"properties":{"id":{"type":"string","maxLength":200,"title":"Id"},"text":{"type":"string","maxLength":50000,"title":"Text"},"groups":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Groups"}},"type":"object","required":["id","text"],"title":"ChunkSchema"},"ConsentRequest":{"properties":{"notice_version":{"type":"string","maxLength":40,"title":"Notice Version","description":"The version of the privacy notice the person accepted (``GET /privacy-notice``); it must be the one in force (422 ``notice_outdated``)."},"allow_training":{"type":"boolean","title":"Allow Training","description":"The person also accepts that their redacted conversations help improve Gaspard (optional, off by default).","default":false}},"type":"object","required":["notice_version"],"title":"ConsentRequest"},"ConsentResponse":{"properties":{"given":{"type":"boolean","title":"Given"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"allow_training":{"type":"boolean","title":"Allow Training","default":false},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At"},"notice_version":{"type":"string","title":"Notice Version"},"up_to_date":{"type":"boolean","title":"Up To Date"}},"type":"object","required":["given","notice_version","up_to_date"],"title":"ConsentResponse","description":"The consent in force for this visitor or partner user, if any."},"ConsentSchema":{"properties":{"version":{"type":"string","title":"Version"},"allow_training":{"type":"boolean","title":"Allow Training"},"granted_at":{"type":"string","format":"date-time","title":"Granted At"},"withdrawn_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Withdrawn At"}},"type":"object","required":["version","allow_training","granted_at","withdrawn_at"],"title":"ConsentSchema"},"ConversationResponse":{"properties":{"id":{"type":"string","title":"Id"},"channel":{"type":"string","title":"Channel"},"locale":{"$ref":"#/components/schemas/Locale"},"page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"last_message_at":{"type":"string","format":"date-time","title":"Last Message At"},"message_count":{"type":"integer","title":"Message Count"},"remaining_messages":{"type":"integer","title":"Remaining Messages"}},"type":"object","required":["id","channel","locale","page","started_at","last_message_at","message_count","remaining_messages"],"title":"ConversationResponse"},"ConversationThreadResponse":{"properties":{"conversation":{"$ref":"#/components/schemas/ConversationResponse"},"messages":{"items":{"$ref":"#/components/schemas/StoredMessageSchema"},"type":"array","title":"Messages"}},"type":"object","required":["conversation","messages"],"title":"ConversationThreadResponse"},"DecisionRequest":{"properties":{"approve":{"type":"boolean","title":"Approve"},"by":{"type":"string","maxLength":120,"title":"By","default":""},"note":{"type":"string","maxLength":500,"title":"Note","default":""}},"type":"object","required":["approve"],"title":"DecisionRequest"},"Difficulty":{"type":"string","enum":["easy","medium","hard"],"title":"Difficulty"},"DocumentRequest":{"properties":{"text":{"type":"string","maxLength":2000000,"title":"Text"},"name":{"type":"string","maxLength":300,"title":"Name","default":""}},"type":"object","required":["text"],"title":"DocumentRequest"},"EdgeApprovalRequest":{"properties":{"app_id":{"type":"string","maxLength":64,"title":"App Id"},"tool":{"type":"string","maxLength":128,"title":"Tool"},"arguments":{"type":"string","maxLength":20000,"title":"Arguments","default":""},"reason":{"type":"string","maxLength":200,"title":"Reason","default":""}},"type":"object","required":["app_id","tool"],"title":"EdgeApprovalRequest"},"EdgeEventsRequest":{"properties":{"events":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":500,"title":"Events"}},"type":"object","required":["events"],"title":"EdgeEventsRequest"},"ErasureResponse":{"properties":{"erased":{"type":"boolean","title":"Erased","default":true},"conversations":{"type":"integer","title":"Conversations"},"messages":{"type":"integer","title":"Messages"},"feedback":{"type":"integer","title":"Feedback"}},"type":"object","required":["conversations","messages","feedback"],"title":"ErasureResponse"},"ErrorDetail":{"properties":{"code":{"type":"string","title":"Code","examples":["consent_required"]},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","message"],"title":"ErrorDetail"},"ErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"}},"type":"object","required":["error"],"title":"ErrorResponse","description":"Every error has this shape; ``code`` is stable, ``message`` is for developers."},"FeedbackRequest":{"properties":{"rating":{"type":"string","enum":["up","down"],"title":"Rating"},"comment":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Comment"}},"type":"object","required":["rating"],"title":"FeedbackRequest"},"FeedbackResponse":{"properties":{"message_id":{"type":"string","title":"Message Id"},"rating":{"type":"string","enum":["up","down"],"title":"Rating"}},"type":"object","required":["message_id","rating"],"title":"FeedbackResponse"},"FlashcardSchema":{"properties":{"front":{"type":"string","title":"Front"},"back":{"type":"string","title":"Back"}},"type":"object","required":["front","back"],"title":"FlashcardSchema"},"FlashcardsResponse":{"properties":{"cards":{"items":{"$ref":"#/components/schemas/FlashcardSchema"},"type":"array","maxItems":20,"minItems":1,"title":"Cards"},"usage":{"$ref":"#/components/schemas/UsageSchema"}},"type":"object","required":["cards","usage"],"title":"FlashcardsResponseV1"},"GradeResponse":{"properties":{"score":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Score"},"verdict":{"$ref":"#/components/schemas/Verdict"},"feedback":{"type":"string","title":"Feedback"},"usage":{"$ref":"#/components/schemas/UsageSchema"}},"type":"object","required":["score","verdict","feedback","usage"],"title":"GradeResponseV1"},"GradedLessonSchema":{"properties":{"title":{"type":"string","maxLength":160,"minLength":1,"title":"Title"},"content":{"anyOf":[{"type":"string","maxLength":16000},{"type":"null"}],"title":"Content"}},"type":"object","required":["title"],"title":"GradedLessonSchema"},"GradedQuestionSchema":{"properties":{"prompt":{"type":"string","maxLength":1000,"minLength":1,"title":"Prompt"},"expected_answer":{"type":"string","maxLength":1000,"minLength":1,"title":"Expected Answer"},"explanation":{"anyOf":[{"type":"string","maxLength":2000,"minLength":0},{"type":"null"}],"title":"Explanation"}},"type":"object","required":["prompt","expected_answer"],"title":"GradedQuestionSchema"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HousingType":{"type":"string","enum":["room","shared_flat","studio","apartment","sublet","student_residence"],"title":"HousingType"},"IceServer":{"properties":{"urls":{"items":{"type":"string"},"type":"array","title":"Urls"},"username":{"type":"string","title":"Username"},"credential":{"type":"string","title":"Credential"}},"type":"object","required":["urls","username","credential"],"title":"IceServer"},"InspectRequest":{"properties":{"text":{"type":"string","maxLength":200000,"title":"Text"},"direction":{"type":"string","enum":["input","output"],"title":"Direction","default":"input"}},"type":"object","required":["text"],"title":"InspectRequest"},"KnowledgeSearchRequest":{"properties":{"query":{"type":"string","maxLength":300,"minLength":2,"title":"Query"},"limit":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Limit","default":5},"topics":{"items":{"$ref":"#/components/schemas/KnowledgeTopic"},"type":"array","maxItems":11,"title":"Topics"}},"type":"object","required":["query"],"title":"KnowledgeSearchRequest"},"KnowledgeSearchResponse":{"properties":{"passages":{"items":{"$ref":"#/components/schemas/PassageSchema"},"type":"array","title":"Passages"}},"type":"object","required":["passages"],"title":"KnowledgeSearchResponse"},"KnowledgeTopic":{"type":"string","enum":["app","geography","history","culture","institutions","education","practical","transport","economy","nature","tourism"],"title":"KnowledgeTopic"},"LearnerLevel":{"type":"string","enum":["secondary","apprenticeship","bachelor","master","adult"],"title":"LearnerLevel"},"LearnerSchema":{"properties":{"first_name":{"anyOf":[{"type":"string","maxLength":60,"minLength":1},{"type":"null"}],"title":"First Name"},"level":{"$ref":"#/components/schemas/LearnerLevel","default":"bachelor"},"school":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}],"title":"School"},"program":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}],"title":"Program"},"study_year":{"anyOf":[{"type":"integer","maximum":8.0,"minimum":1.0},{"type":"null"}],"title":"Study Year"},"country_code":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}],"title":"Country Code","description":"Optional (additive, world opening): where the learner lives, ISO 3166-1 alpha-2 (users.country_code). Sets the regional forms (« septante » in CH/LI and BE, « soixante-dix » elsewhere; « ss » in CH/LI, « ß » elsewhere) and the emergency numbers. Default: Swiss forms."}},"type":"object","title":"LearnerSchema"},"LessonSchema":{"properties":{"course_title":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}],"title":"Course Title"},"title":{"type":"string","maxLength":160,"minLength":1,"title":"Title"},"objectives":{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":8,"title":"Objectives"},"content":{"type":"string","maxLength":16000,"title":"Content","default":""}},"type":"object","required":["title"],"title":"LessonSchema"},"ListingKind":{"type":"string","enum":["housing","opportunity","marketplace","other"],"title":"ListingKind"},"ListingSchema":{"properties":{"kind":{"type":"string","enum":["opportunity","housing","event","resource"],"title":"Kind"},"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url","description":"The original listing on the source's site: always link to it."},"source_name":{"type":"string","title":"Source Name"},"attribution":{"type":"string","title":"Attribution","description":"Mandatory credit, to show with the card and link to ``url``: « Source : <source_name> ».","examples":["Source : Comptoir Immobilier"]},"redistribution":{"type":"string","enum":["internal","facts","full"],"title":"Redistribution","description":"What the source allows to pass on: ``facts`` (title, kind, category, amount, rooms, surface, locality, dates, organisation, link) or ``full`` (also the summary). Third parties never receive ``internal`` sources."},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"Locality (never the street)."},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code","description":"ISO 3166-1 alpha-2 country of the listing, when known."},"organisation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organisation","description":"Employer, agency, organiser or provider (name only)."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At"},"deadline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deadline","description":"Jobs: application deadline; housing: available from (ISO date)."},"price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price","description":"Rent, salary or ticket price, as an amount (« 1450 CHF/mois »)."},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail","description":"Type, workload, rooms and surface, event category and venue, or a resource's kind, subject and level."},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary","description":"An excerpt of the description: only for sources at ``full``."}},"type":"object","required":["kind","title","url","source_name","attribution","redistribution"],"title":"ListingSchema","description":"A collected job, room, event or learning resource, shown as a card under the answer.\n\nWhat a card holds depends on its source's redistribution level (``redistribution``): at\n``facts`` you get the facts only (no description, image, contact or street address), at\n``full`` the summary too. Always show ``attribution`` linked to ``url``, and do not keep\na card longer than a day without asking again (see « Données des annonces et\nattribution » in the documentation)."},"Locale":{"type":"string","enum":["fr","de","en"],"title":"Locale"},"MessageRequest":{"properties":{"text":{"type":"string","maxLength":2000,"minLength":1,"title":"Text"},"first_name":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"First Name"},"locality":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Locality","description":"Where the asker is (their town, any language: « Lyon », « Genf »): jobs, rooms and events are then picked near them."},"country_code":{"anyOf":[{"type":"string","pattern":"^[A-Za-z]{2}$"},{"type":"null"}],"title":"Country Code","description":"The asker's country (ISO 3166-1 alpha-2): listings from that country when their town is unknown or has none nearby."}},"type":"object","required":["text"],"title":"MessageRequest"},"PassageSchema":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"text":{"type":"string","title":"Text","description":"Empty when the source only allows ``facts``: show the title and link to the source instead."},"language":{"type":"string","title":"Language"},"topic":{"$ref":"#/components/schemas/KnowledgeTopic"},"source":{"anyOf":[{"$ref":"#/components/schemas/SourceSchema"},{"type":"null"}]},"score":{"type":"number","title":"Score"},"redistribution":{"type":"string","enum":["internal","facts","full"],"title":"Redistribution","description":"What the source allows to pass on (``facts``: no text)."}},"type":"object","required":["id","title","text","language","topic","source","score","redistribution"],"title":"PassageSchema"},"PrivacyNoticeResponse":{"properties":{"version":{"type":"string","title":"Version"},"text":{"type":"string","title":"Text"},"retention_days":{"type":"integer","title":"Retention Days"}},"type":"object","required":["version","text","retention_days"],"title":"PrivacyNoticeResponse"},"ProductRouteSchema":{"properties":{"method":{"type":"string","title":"Method"},"path":{"type":"string","title":"Path"}},"type":"object","required":["method","path"],"title":"ProductRouteSchema"},"ProductSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"tagline":{"type":"string","title":"Tagline"},"description":{"type":"string","title":"Description"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"unit":{"type":"string","title":"Unit"},"unit_label":{"type":"string","title":"Unit Label"},"client_kinds":{"items":{"type":"string"},"type":"array","title":"Client Kinds"},"routes":{"items":{"$ref":"#/components/schemas/ProductRouteSchema"},"type":"array","title":"Routes"},"docs_url":{"type":"string","title":"Docs Url"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","name","tagline","description","scopes","unit","unit_label","client_kinds","routes","docs_url","status"],"title":"ProductSchema"},"ProductsResponse":{"properties":{"products":{"items":{"$ref":"#/components/schemas/ProductSchema"},"type":"array","title":"Products"}},"type":"object","required":["products"],"title":"ProductsResponse"},"PublicEmbeddingsRequest":{"properties":{"texts":{"items":{"type":"string","maxLength":2000,"minLength":1},"type":"array","maxItems":32,"minItems":1,"title":"Texts","description":"1 to 32 texts of at most 2000 characters, 32000 in all."}},"additionalProperties":false,"type":"object","required":["texts"],"title":"PublicEmbeddingsRequestV1"},"PublicEmbeddingsResponse":{"properties":{"model":{"type":"string","title":"Model"},"dimensions":{"type":"integer","title":"Dimensions"},"embeddings":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"Embeddings"}},"type":"object","required":["model","dimensions","embeddings"],"title":"PublicEmbeddingsResponseV1"},"PublicExplanationRequest":{"properties":{"locale":{"$ref":"#/components/schemas/Locale","default":"fr"},"learner":{"$ref":"#/components/schemas/LearnerSchema"},"lesson":{"$ref":"#/components/schemas/LessonSchema"},"mode":{"$ref":"#/components/schemas/TutorMode","default":"explain"},"messages":{"items":{"oneOf":[{"$ref":"#/components/schemas/UserMessage"},{"$ref":"#/components/schemas/AssistantMessage"}],"discriminator":{"propertyName":"role","mapping":{"assistant":"#/components/schemas/AssistantMessage","user":"#/components/schemas/UserMessage"}}},"type":"array","maxItems":24,"minItems":1,"title":"Messages"}},"type":"object","required":["lesson","messages"],"title":"PublicTutorExplanationRequestV1"},"PublicFlashcardsRequest":{"properties":{"locale":{"$ref":"#/components/schemas/Locale","default":"fr"},"lesson":{"$ref":"#/components/schemas/LessonSchema"},"count":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Count","default":10},"learner":{"$ref":"#/components/schemas/LearnerSchema"}},"type":"object","required":["lesson"],"title":"PublicTutorFlashcardsRequestV1"},"PublicGradeRequest":{"properties":{"locale":{"$ref":"#/components/schemas/Locale","default":"fr"},"lesson":{"$ref":"#/components/schemas/GradedLessonSchema"},"question":{"$ref":"#/components/schemas/GradedQuestionSchema"},"answer":{"type":"string","maxLength":2000,"minLength":1,"title":"Answer"},"country_code":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}],"title":"Country Code","description":"Optional (additive, world opening): where the learner lives, ISO 3166-1 alpha-2 (users.country_code). Sets the regional forms (« septante » in CH/LI and BE, « soixante-dix » elsewhere; « ss » in CH/LI, « ß » elsewhere) and the emergency numbers. Default: Swiss forms."}},"type":"object","required":["lesson","question","answer"],"title":"PublicTutorGradeRequestV1"},"PublicQuizRequest":{"properties":{"locale":{"$ref":"#/components/schemas/Locale","default":"fr"},"learner":{"$ref":"#/components/schemas/LearnerSchema"},"lesson":{"$ref":"#/components/schemas/LessonSchema"},"count":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Count","default":5},"difficulty":{"$ref":"#/components/schemas/Difficulty","default":"medium"},"kinds":{"items":{"$ref":"#/components/schemas/QuestionKind"},"type":"array","maxItems":4,"minItems":1,"title":"Kinds"}},"type":"object","required":["lesson"],"title":"PublicTutorQuizRequestV1"},"QualityFlag":{"type":"string","enum":["rent_far_below_median","advance_payment_request","owner_abroad_story","missing_address","missing_rent","no_photos","short_description","identity_document_request","messaging_app_contact","foreign_currency","urgency_pressure"],"title":"QualityFlag"},"QuestionKind":{"type":"string","enum":["single_choice","multiple_choice","true_false","short_answer"],"title":"QuestionKind"},"QuestionSchema":{"properties":{"kind":{"$ref":"#/components/schemas/QuestionKind"},"prompt":{"type":"string","title":"Prompt"},"choices":{"items":{"$ref":"#/components/schemas/ChoiceSchema"},"type":"array","maxItems":6,"title":"Choices"},"correct_choice_ids":{"items":{"type":"string"},"type":"array","title":"Correct Choice Ids"},"expected_answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Answer"},"explanation":{"type":"string","title":"Explanation"}},"type":"object","required":["kind","prompt","choices","correct_choice_ids","expected_answer","explanation"],"title":"QuestionSchema"},"QuizResponse":{"properties":{"questions":{"items":{"$ref":"#/components/schemas/QuestionSchema"},"type":"array","maxItems":10,"minItems":1,"title":"Questions"},"usage":{"$ref":"#/components/schemas/UsageSchema"}},"type":"object","required":["questions","usage"],"title":"QuizResponseV1"},"RetrievalRequest":{"properties":{"chunks":{"items":{"$ref":"#/components/schemas/ChunkSchema"},"type":"array","maxItems":200,"title":"Chunks"},"groups":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Groups"}},"type":"object","required":["chunks"],"title":"RetrievalRequest"},"RiskLevel":{"type":"string","enum":["low","medium","high"],"title":"RiskLevel"},"SessionRequest":{"properties":{"locale":{"$ref":"#/components/schemas/Locale","default":"fr"},"consent":{"type":"boolean","title":"Consent","description":"The visitor accepted the privacy notice (``GET /privacy-notice``). Required: without it no session is opened (403 ``consent_required``)."},"allow_training":{"type":"boolean","title":"Allow Training","description":"The visitor also accepts that their redacted conversations help improve Gaspard (optional, off by default).","default":false}},"type":"object","required":["consent"],"title":"SessionRequest"},"SessionResponse":{"properties":{"token":{"type":"string","title":"Token","description":"Visitor token: ``Authorization: Bearer vst_…``."},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"visitor_id":{"type":"string","title":"Visitor Id"},"consent":{"$ref":"#/components/schemas/PrivacyNoticeResponse"},"allow_training":{"type":"boolean","title":"Allow Training"}},"type":"object","required":["token","expires_at","visitor_id","consent","allow_training"],"title":"SessionResponse"},"SourceSchema":{"properties":{"name":{"type":"string","title":"Name"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"licence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Licence"}},"type":"object","required":["name"],"title":"SourceSchema"},"StartConversationRequest":{"properties":{"locale":{"$ref":"#/components/schemas/Locale","default":"fr"},"page":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Page","description":"Where the visitor is, e.g. « admissions » (free text)."}},"type":"object","title":"StartConversationRequest"},"StoredMessageSchema":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","enum":["user","assistant"],"title":"Role"},"text":{"type":"string","title":"Text","description":"As stored: personal data is masked (« [e-mail] »…)."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"pages":{"items":{"type":"string"},"type":"array","title":"Pages","default":[]},"sources":{"items":{"$ref":"#/components/schemas/SourceSchema"},"type":"array","title":"Sources","default":[]},"listings":{"items":{"$ref":"#/components/schemas/ListingSchema"},"type":"array","title":"Listings","default":[]},"rating":{"anyOf":[{"type":"string","enum":["up","down"]},{"type":"null"}],"title":"Rating"}},"type":"object","required":["id","role","text","created_at"],"title":"StoredMessageSchema"},"ToolCheckRequest":{"properties":{"tool":{"type":"string","maxLength":128,"title":"Tool"},"arguments":{"additionalProperties":true,"type":"object","title":"Arguments"}},"type":"object","required":["tool"],"title":"ToolCheckRequest"},"TrustAssessmentResult":{"properties":{"risk_score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Risk Score"},"level":{"$ref":"#/components/schemas/RiskLevel"},"withheld":{"type":"boolean","title":"Withheld","description":"Gaspard does not propose such a listing."},"findings":{"items":{"$ref":"#/components/schemas/TrustFinding"},"type":"array","title":"Findings"},"quality_flags":{"items":{"$ref":"#/components/schemas/QualityFlag"},"type":"array","title":"Quality Flags","description":"The findings the ingest contract v1.1 knows (housing quality_flags)."}},"type":"object","required":["risk_score","level","withheld","findings","quality_flags"],"title":"TrustAssessmentV1"},"TrustFinding":{"properties":{"signal":{"$ref":"#/components/schemas/TrustSignal"},"weight":{"type":"integer","title":"Weight"},"evidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence"}},"type":"object","required":["signal","weight","evidence"],"title":"TrustFindingV1"},"TrustListing":{"properties":{"kind":{"$ref":"#/components/schemas/ListingKind"},"title":{"type":"string","maxLength":300,"minLength":1,"title":"Title"},"description":{"type":"string","maxLength":20000,"title":"Description","default":""},"country_code":{"anyOf":[{"type":"string","pattern":"^[A-Za-z]{2}$"},{"type":"null"}],"title":"Country Code","description":"ISO 3166-1 alpha-2."},"city":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"City"},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Za-z]{3}$"},{"type":"null"}],"title":"Currency","description":"ISO 4217 of price_amount; null: the country's own."},"price_amount":{"anyOf":[{"type":"number","maximum":1000000000.0,"minimum":0.0},{"type":"null"}],"title":"Price Amount","description":"Housing: monthly rent; marketplace: price."},"housing_type":{"anyOf":[{"$ref":"#/components/schemas/HousingType"},{"type":"null"}]},"rooms":{"anyOf":[{"type":"number","maximum":50.0,"minimum":0.0},{"type":"null"}],"title":"Rooms"},"photos":{"type":"integer","maximum":1000.0,"minimum":0.0,"title":"Photos","default":0},"address":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address"}},"additionalProperties":false,"type":"object","required":["kind","title"],"title":"TrustListingV1"},"TrustRequest":{"properties":{"listings":{"items":{"$ref":"#/components/schemas/TrustListing"},"type":"array","maxItems":50,"minItems":1,"title":"Listings"}},"additionalProperties":false,"type":"object","required":["listings"],"title":"TrustRequestV1"},"TrustResponse":{"properties":{"version":{"type":"string","title":"Version"},"assessments":{"items":{"$ref":"#/components/schemas/TrustAssessmentResult"},"type":"array","title":"Assessments"}},"type":"object","required":["version","assessments"],"title":"TrustResponseV1"},"TrustSignal":{"type":"string","enum":["rent_far_below_median","advance_payment_request","owner_abroad_story","missing_address","missing_rent","no_photos","short_description","identity_document_request","messaging_app_contact","foreign_currency","urgency_pressure","fee_to_apply","money_or_parcel_relay","unrealistic_pay","crypto_investment"],"title":"TrustSignal","description":"Every signal of a trust assessment. The first eleven are the ``QualityFlag`` values of\nthe ingest contract v1.1 (same strings); the job signals after them are only known by the\ntrust API until a later contract carries them (see docs/hub.md)."},"TutorMode":{"type":"string","enum":["explain","socratic","exam_prep"],"title":"TutorMode"},"TutorReplyResponse":{"properties":{"text":{"type":"string","title":"Text"},"follow_ups":{"items":{"type":"string"},"type":"array","maxItems":3,"title":"Follow Ups"},"usage":{"$ref":"#/components/schemas/UsageSchema"}},"type":"object","required":["text","usage"],"title":"TutorReplyResponseV1"},"UsageSchema":{"properties":{"model":{"type":"string","title":"Model"},"prompt_tokens":{"type":"integer","minimum":0.0,"title":"Prompt Tokens"},"completion_tokens":{"type":"integer","minimum":0.0,"title":"Completion Tokens"},"duration_ms":{"type":"integer","minimum":0.0,"title":"Duration Ms"}},"type":"object","required":["model","prompt_tokens","completion_tokens","duration_ms"],"title":"UsageSchema","description":"Cost of the model calls behind this answer (0 when the model was not asked)."},"UserMessage":{"properties":{"role":{"type":"string","const":"user","title":"Role"},"content":{"type":"string","maxLength":4000,"minLength":1,"title":"Content"}},"type":"object","required":["role","content"],"title":"UserMessage"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"Verdict":{"type":"string","enum":["correct","partial","incorrect"],"title":"Verdict"},"VisitorDataResponse":{"properties":{"visitor_id":{"type":"string","title":"Visitor Id"},"locale":{"type":"string","title":"Locale"},"first_seen":{"type":"string","format":"date-time","title":"First Seen"},"last_seen":{"type":"string","format":"date-time","title":"Last Seen"},"consents":{"items":{"$ref":"#/components/schemas/ConsentSchema"},"type":"array","title":"Consents"},"conversations":{"items":{"$ref":"#/components/schemas/ConversationThreadResponse"},"type":"array","title":"Conversations"}},"type":"object","required":["visitor_id","locale","first_seen","last_seen","consents","conversations"],"title":"VisitorDataResponse"}},"securitySchemes":{"Bearer":{"type":"http","description":"Partners: secret key ``vck_live_…``. Widgets: visitor token ``vst_…``.","scheme":"bearer"},"WidgetKey":{"type":"apiKey","description":"Widgets: publishable key ``vcp_live_…`` (works only from allowed origins).","in":"header","name":"X-Gaspard-Key"},"EndUser":{"type":"apiKey","description":"Partners (optional): your own id of the person asking; only a keyed hash is stored, so their conversations stay theirs.","in":"header","name":"X-End-User"}}},"tags":[{"name":"sessions","description":"Visitor sessions of widgets (consent)."},{"name":"conversations","description":"Talking with Gaspard."},{"name":"privacy","description":"Visitors' rights: access and erasure."},{"name":"knowledge","description":"Gaspard's knowledge base, with sources."},{"name":"products","description":"The hub's products (no key needed)."},{"name":"tutor","description":"Explanations, quizzes, flashcards, grading."},{"name":"trust","description":"Scam and quality signals of listings."},{"name":"embeddings","description":"Vectors of short texts."}],"servers":[{"url":"/v1/public"}]}