{"openapi":"3.0.0","info":{"title":"Paw Assistant API","version":"1.0.0","description":"API for the Paw Assistant chat application. Provides AI-powered assistant management, thread-based conversations, audio generation, image processing, and PDF handling."},"servers":[{"url":"http://localhost:3000","description":"Development server"}],"tags":[{"name":"Health","description":"Health check endpoints"},{"name":"Assistant","description":"AI assistant management"},{"name":"Thread","description":"Conversation thread operations"},{"name":"Audio","description":"Text-to-speech audio generation"},{"name":"Image","description":"Image processing and signed URLs"},{"name":"PDF","description":"PDF processing"}],"components":{"schemas":{"Error":{"type":"object","properties":{"status":{"type":"integer","example":500},"type":{"type":"string","example":"server_error"},"error":{"type":"object","properties":{"message":{"type":"string","example":"Internal server error"}}}}},"Assistant":{"type":"object","properties":{"id":{"type":"string","example":"asst_abc123"},"object":{"type":"string","example":"assistant"},"name":{"type":"string","example":"New Assistant"},"model":{"type":"string","example":"gpt-4o-mini"}}},"Thread":{"type":"object","properties":{"id":{"type":"string","example":"thread_abc123"},"object":{"type":"string","example":"thread"}}},"Message":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"array","items":{"type":"object"}}}}}},"paths":{"/":{"get":{"tags":["Health"],"summary":"Health check","responses":{"200":{"description":"Server is healthy","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"uptime":{"type":"number","example":123.45}}}}}}}}},"/assistant":{"post":{"tags":["Assistant"],"summary":"Create a new AI assistant","responses":{"200":{"description":"Assistant created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assistant"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/assistant/{assistantId}":{"get":{"tags":["Assistant"],"summary":"Get an assistant by ID","parameters":[{"name":"assistantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Assistant details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assistant"}}}}}},"patch":{"tags":["Assistant"],"summary":"Update an assistant","parameters":[{"name":"assistantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"Partial assistant data to update"}}}},"responses":{"200":{"description":"Updated assistant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assistant"}}}}}},"delete":{"tags":["Assistant"],"summary":"Delete an assistant","parameters":[{"name":"assistantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Assistant deleted","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","example":"assistant.deleted"},"deleted":{"type":"boolean","example":true}}}}}}}}},"/assistant/{assistantId}/thread":{"post":{"tags":["Thread"],"summary":"Create a new thread","parameters":[{"name":"assistantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Thread created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thread"}}}}}}},"/assistant/{assistantId}/thread/{threadId}/messages":{"get":{"tags":["Thread"],"summary":"Get thread messages","parameters":[{"name":"assistantId","in":"path","required":true,"schema":{"type":"string"}},{"name":"threadId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of messages","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Message"}}}}}}}},"/assistant/{assistantId}/thread/{threadId}/message":{"post":{"tags":["Thread"],"summary":"Send a message to a thread","parameters":[{"name":"assistantId","in":"path","required":true,"schema":{"type":"string"}},{"name":"threadId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","minLength":1,"maxLength":50000},"images":{"type":"array","items":{"type":"string","format":"uri"}}}}}}},"responses":{"200":{"description":"Streamed response"}}}},"/assistant/{assistantId}/thread/{threadId}/runs":{"get":{"tags":["Thread"],"summary":"Get thread runs","parameters":[{"name":"assistantId","in":"path","required":true,"schema":{"type":"string"}},{"name":"threadId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of runs"}}}},"/assistant/{assistantId}/thread/{threadId}/lastRun":{"get":{"tags":["Thread"],"summary":"Get the last run for a thread","parameters":[{"name":"assistantId","in":"path","required":true,"schema":{"type":"string"}},{"name":"threadId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Last run details"}}}},"/assistant/{assistantId}/thread/{threadId}":{"delete":{"tags":["Thread"],"summary":"Delete a thread","parameters":[{"name":"assistantId","in":"path","required":true,"schema":{"type":"string"}},{"name":"threadId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Thread deleted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Thread deleted"}}}}}}}}},"/audio":{"post":{"tags":["Audio"],"summary":"Generate text-to-speech audio","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","minLength":1,"maxLength":5000}}}}}},"responses":{"200":{"description":"Audio file","content":{"audio/mpeg":{"schema":{"type":"string","format":"binary"}}}}}}},"/image/getSignedURLs":{"post":{"tags":["Image"],"summary":"Get signed upload URLs for images","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["images"],"properties":{"images":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":20}}}}}},"responses":{"200":{"description":"Array of signed URLs","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","format":"uri"}}}}}}}},"/image":{"post":{"tags":["Image"],"summary":"Process images with AI","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["images"],"properties":{"images":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":10}}}}}},"responses":{"200":{"description":"AI analysis of images"}}}},"/pdf":{"post":{"tags":["PDF"],"summary":"Process PDFs","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["pdfs"],"properties":{"pdfs":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":10}}}}}},"responses":{"200":{"description":"PDFs processed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"count":{"type":"integer"}}}}}}}}}}}