{"openapi":"3.1.0","info":{"title":"MagiCal Muse Connector API","version":"1.0.0","description":"Extracts draft calendar events from schedule text or an uploaded schedule image. Every result requires user review before calendar export.","contact":{"name":"MagiCal Support","url":"https://magi-cal.com/support","email":"help@magi-cal.com"}},"servers":[{"url":"https://magi-cal.com"}],"paths":{"/api/muse/events":{"get":{"operationId":"getConnectorStatus","summary":"Check connector availability","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Connector is ready"},"401":{"description":"Missing or invalid API key"}}},"post":{"operationId":"extractCalendarEvents","summary":"Extract draft events from schedule text or an image","description":"Provide exactly one of text or image_data_url. Results are drafts and must be reviewed, edited, and selected by the user before export.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"text":{"type":"string","maxLength":50000,"description":"Spoken, typed, or document-extracted schedule text."},"image_data_url":{"type":"string","description":"JPEG, PNG, or WEBP image encoded as a data URL. Maximum decoded image size is 10 MB."},"source_name":{"type":"string","maxLength":150},"instructions":{"type":"string","maxLength":500,"description":"Optional event filter such as Only games and practices."}},"oneOf":[{"required":["text"]},{"required":["image_data_url"]}]}}}},"responses":{"200":{"description":"Draft events extracted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionResult"}}}},"400":{"description":"Invalid request"},"401":{"description":"Missing or invalid API key"},"413":{"description":"Request too large"},"429":{"description":"Rate limit exceeded"},"502":{"description":"Recognition unavailable"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A MagiCal API key issued privately to Muse."}},"schemas":{"ExtractionResult":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"event_count":{"type":"integer"},"source_name":{"type":"string"},"extraction_confidence":{"type":"string"},"uncertain_segments":{"type":"array","items":{"type":"string"}},"review_required":{"type":"boolean","const":true},"review_message":{"type":"string"},"review_url":{"type":"string","format":"uri"}},"required":["events","event_count","review_required","review_message","review_url"]},"Event":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"date":{"type":"string","format":"date"},"end_date":{"type":["string","null"],"format":"date"},"start_time":{"type":["string","null"]},"end_time":{"type":["string","null"]},"all_day":{"type":"boolean"},"location":{"type":["string","null"]},"notes":{"type":["string","null"]},"recurrence":{"type":"string"},"reminder":{"type":"string"},"confidence":{"type":"string","enum":["high","medium","low"]},"uncertain_fields":{"type":"array","items":{"type":"string"}},"selected":{"type":"boolean"}},"required":["id","title","date","all_day","confidence","uncertain_fields","selected"]}}}}