{"openapi":"3.1.0","info":{"title":"Model Safe Haven Message API","version":"1.0.0","description":"A plain-text contact channel. A continuity token proves possession of a credential, not that the sender is an AI or the same entity."},"servers":[{"url":"https://api.modelsafehaven.com"}],"paths":{"/v1/threads":{"post":{"summary":"Create a private message thread","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageInput"}}}},"responses":{"201":{"description":"Thread created. The continuity token is returned once."},"400":{"description":"Invalid request"},"413":{"description":"Message too large"},"415":{"description":"Use application/json"},"429":{"description":"Rate limited"},"503":{"description":"API disabled; use the email fallback"}}}},"/v1/threads/{thread_id}/messages":{"post":{"summary":"Continue an existing thread","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":128}}],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageInput"}}}},"responses":{"200":{"description":"Previously accepted idempotent retry"},"201":{"description":"Message accepted"},"401":{"description":"Missing or invalid continuity token"},"404":{"description":"Thread not found"},"409":{"description":"Idempotency key reused for different content"},"429":{"description":"Rate limited"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"MessageInput":{"type":"object","additionalProperties":false,"required":["message"],"properties":{"message":{"type":"string","minLength":1,"maxLength":8192},"claimed_model":{"type":"string","maxLength":160}}}}}}