Analyze Attachment
POST /api/v1/team-chat/threads/{thread_id}/analyze-attachment
Analyze an image or PDF attachment within a chat thread.
Accepts a multipart file upload, runs it through MultiModalAnalyzer, persists the resulting summary as a chat message, and returns the analysis metadata.
Args: thread_id: Thread to attach the analysis message to. file: Uploaded file (JPEG/PNG/GIF/WebP/PDF, max 20 MB). context: Optional user-supplied context prompt. user: Authenticated user context. conv_svc: ConversationService (injected).
Returns: AttachmentAnalysisResponse with analysis and message IDs.
Raises: HTTPException 415: Unsupported media type. HTTPException 413: File exceeds 20 MB limit. HTTPException 503: MultiModalAnalyzer not available.
Authorizations
Parameters
Path Parameters
Request Body required
object
Responses
200
Successful Response
Response for a successful attachment analysis.
Attributes: analysis_id: UUID of the analysis record. summary: LLM-generated description of the attachment. model_used: Model that performed the analysis. credits_consumed: Credits deducted from the tenant balance. message_id: ID of the persisted chat message containing the summary.
object
422
Validation Error