{"openapi":"3.1.0","info":{"title":"Echo API (LibreChat)","description":"AI chat frontend with multi-provider support. Echo is a fork of LibreChat that provides\na comprehensive chat interface for multiple AI providers including OpenAI, Anthropic,\nGoogle, Azure, and custom endpoints.\n","version":"v1","contact":{"name":"Haiven Support","url":"https://echo.haiven.site"},"license":{"name":"MIT","url":"https://github.com/danny-avila/LibreChat/blob/main/LICENSE"}},"servers":[{"url":"https://echo.haiven.site","description":"Production server (HTTPS)"},{"url":"http://echo:3080","description":"Internal Docker network"}],"tags":[{"name":"Auth","description":"Authentication and user session management"},{"name":"Conversations","description":"Conversation management and operations"},{"name":"Messages","description":"Message creation, retrieval, and modification"},{"name":"Presets","description":"User preset configurations"},{"name":"Endpoints","description":"AI provider endpoint configuration"},{"name":"Models","description":"Available AI models"},{"name":"User","description":"User profile and settings"},{"name":"Files","description":"File upload and management"},{"name":"Assistants","description":"AI assistant management"},{"name":"Config","description":"Application configuration"}],"security":[{"BearerAuth":[]}],"paths":{"/health":{"get":{"summary":"Health check endpoint","tags":["Config"],"security":[],"responses":{"200":{"description":"Service is healthy","content":{"text/plain":{"schema":{"type":"string","example":"OK"}}}}}}},"/api/auth/login":{"post":{"summary":"User login","tags":["Auth"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string","format":"email"},"password":{"type":"string","format":"password"}}}}}},"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"user":{"$ref":"#/components/schemas/User"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/auth/logout":{"post":{"summary":"User logout","tags":["Auth"],"responses":{"200":{"description":"Logout successful"}}}},"/api/auth/refresh":{"post":{"summary":"Refresh authentication token","tags":["Auth"],"responses":{"200":{"description":"Token refreshed","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}}}}}}}}},"/api/auth/register":{"post":{"summary":"Register new user","tags":["Auth"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","email","password","confirm_password"],"properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"password":{"type":"string","format":"password"},"confirm_password":{"type":"string","format":"password"}}}}}},"responses":{"201":{"description":"User registered successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}}}},"/api/user":{"get":{"summary":"Get current user information","tags":["User"],"responses":{"200":{"description":"User information retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}}}},"/api/convos":{"get":{"summary":"List conversations","tags":["Conversations"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"isArchived","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}}],"responses":{"200":{"description":"List of conversations","content":{"application/json":{"schema":{"type":"object","properties":{"conversations":{"type":"array","items":{"$ref":"#/components/schemas/Conversation"}},"cursor":{"type":"string"},"hasMore":{"type":"boolean"}}}}}}}}},"/api/convos/{conversationId}":{"get":{"summary":"Get conversation details","tags":["Conversations"],"parameters":[{"$ref":"#/components/parameters/ConversationId"}],"responses":{"200":{"description":"Conversation details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"summary":"Delete conversation","tags":["Conversations"],"parameters":[{"$ref":"#/components/parameters/ConversationId"}],"responses":{"200":{"description":"Conversation deleted"}}}},"/api/convos/update":{"post":{"summary":"Update conversation properties","tags":["Conversations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["conversationId"],"properties":{"conversationId":{"type":"string"},"title":{"type":"string"},"isArchived":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Conversation updated"}}}},"/api/convos/gen_title":{"post":{"summary":"Generate conversation title","tags":["Conversations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["conversationId"],"properties":{"conversationId":{"type":"string"}}}}}},"responses":{"200":{"description":"Title generated","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"}}}}}}}}},"/api/convos/fork":{"post":{"summary":"Fork conversation from specific message","tags":["Conversations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["conversationId","messageId"],"properties":{"conversationId":{"type":"string"},"messageId":{"type":"string"},"splitAtTarget":{"type":"boolean"}}}}}},"responses":{"201":{"description":"Conversation forked"}}}},"/api/messages":{"get":{"summary":"Get messages with pagination and filtering","tags":["Messages"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"pageSize","in":"query","schema":{"type":"integer","default":20}},{"name":"conversationId","in":"query","schema":{"type":"string"}},{"name":"search","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"List of messages","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"cursor":{"type":"string"},"hasMore":{"type":"boolean"}}}}}}}}},"/api/messages/{conversationId}":{"get":{"summary":"Get all messages in a conversation","tags":["Messages"],"parameters":[{"$ref":"#/components/parameters/ConversationId"}],"responses":{"200":{"description":"Messages retrieved","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Message"}}}}}}},"post":{"summary":"Save new message to conversation","tags":["Messages"],"parameters":[{"$ref":"#/components/parameters/ConversationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageCreate"}}}},"responses":{"201":{"description":"Message saved"}}}},"/api/messages/{conversationId}/{messageId}":{"get":{"summary":"Get specific message","tags":["Messages"],"parameters":[{"$ref":"#/components/parameters/ConversationId"},{"$ref":"#/components/parameters/MessageId"}],"responses":{"200":{"description":"Message retrieved"}}},"put":{"summary":"Update message","tags":["Messages"],"parameters":[{"$ref":"#/components/parameters/ConversationId"},{"$ref":"#/components/parameters/MessageId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"}}}}}},"responses":{"200":{"description":"Message updated"}}},"delete":{"summary":"Delete message","tags":["Messages"],"parameters":[{"$ref":"#/components/parameters/ConversationId"},{"$ref":"#/components/parameters/MessageId"}],"responses":{"200":{"description":"Message deleted"}}}},"/api/presets":{"get":{"summary":"List user presets","tags":["Presets"],"responses":{"200":{"description":"List of presets","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Preset"}}}}}}},"post":{"summary":"Create new preset","tags":["Presets"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresetCreate"}}}},"responses":{"201":{"description":"Preset created"}}}},"/api/presets/delete":{"post":{"summary":"Delete preset(s)","tags":["Presets"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"presetId":{"type":"string"}}}}}},"responses":{"201":{"description":"Preset(s) deleted"}}}},"/api/endpoints":{"get":{"summary":"List available AI endpoints","tags":["Endpoints"],"responses":{"200":{"description":"Available endpoints","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EndpointConfig"}}}}}}}},"/api/models":{"get":{"summary":"List available AI models","tags":["Models"],"responses":{"200":{"description":"Available models","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/files":{"post":{"summary":"Upload file","tags":["Files"],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"},"metadata":{"type":"string"}}}}}},"responses":{"201":{"description":"File uploaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}}}}},"/api/files/images":{"post":{"summary":"Upload image","tags":["Files"],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"201":{"description":"Image uploaded"}}}},"/api/files/speech/stt":{"post":{"summary":"Speech-to-text transcription","tags":["Files"],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["audio"],"properties":{"audio":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"Transcription result","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"}}}}}}}}},"/api/assistants":{"get":{"summary":"List assistants","tags":["Assistants"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":20}},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"List of assistants","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Assistant"}},"has_more":{"type":"boolean"}}}}}}}},"post":{"summary":"Create assistant","tags":["Assistants"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantCreate"}}}},"responses":{"201":{"description":"Assistant created"}}}},"/api/assistants/{id}":{"get":{"summary":"Get assistant details","tags":["Assistants"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Assistant details"}}},"patch":{"summary":"Update assistant","tags":["Assistants"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantUpdate"}}}},"responses":{"200":{"description":"Assistant updated"}}},"delete":{"summary":"Delete assistant","tags":["Assistants"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Assistant deleted"}}}},"/api/config":{"get":{"summary":"Get application configuration","tags":["Config"],"security":[],"responses":{"200":{"description":"Application configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartupConfig"}}}}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"parameters":{"ConversationId":{"name":"conversationId","in":"path","required":true,"schema":{"type":"string"}},"MessageId":{"name":"messageId","in":"path","required":true,"schema":{"type":"string"}}},"schemas":{"User":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["user","admin"]},"avatar":{"type":"string","format":"uri"},"createdAt":{"type":"string","format":"date-time"}}},"Conversation":{"type":"object","properties":{"conversationId":{"type":"string"},"title":{"type":"string"},"endpoint":{"type":"string"},"model":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"isArchived":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"user":{"type":"string"}}},"Message":{"type":"object","properties":{"messageId":{"type":"string"},"conversationId":{"type":"string"},"parentMessageId":{"type":"string"},"sender":{"type":"string","enum":["user","assistant","system"]},"text":{"type":"string"},"model":{"type":"string"},"tokenCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"feedback":{"type":"string","enum":["positive","negative","neutral"]}}},"MessageCreate":{"type":"object","required":["text","sender"],"properties":{"text":{"type":"string"},"sender":{"type":"string","enum":["user","assistant"]},"parentMessageId":{"type":"string"},"model":{"type":"string"}}},"Preset":{"type":"object","properties":{"presetId":{"type":"string"},"title":{"type":"string"},"endpoint":{"type":"string"},"model":{"type":"string"},"promptPrefix":{"type":"string"},"temperature":{"type":"number"},"top_p":{"type":"number"},"maxOutputTokens":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}},"PresetCreate":{"type":"object","required":["title","endpoint"],"properties":{"title":{"type":"string"},"endpoint":{"type":"string"},"model":{"type":"string"},"promptPrefix":{"type":"string"},"temperature":{"type":"number","minimum":0,"maximum":2},"top_p":{"type":"number","minimum":0,"maximum":1},"maxOutputTokens":{"type":"integer"}}},"EndpointConfig":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"models":{"type":"array","items":{"type":"string"}},"available":{"type":"boolean"}}},"Assistant":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"model":{"type":"string"},"instructions":{"type":"string"},"tools":{"type":"array","items":{"type":"object"}},"file_ids":{"type":"array","items":{"type":"string"}},"created_at":{"type":"integer"}}},"AssistantCreate":{"type":"object","required":["name","model"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"model":{"type":"string"},"instructions":{"type":"string"},"tools":{"type":"array","items":{"type":"object"}},"file_ids":{"type":"array","items":{"type":"string"}}}},"AssistantUpdate":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"model":{"type":"string"},"instructions":{"type":"string"},"tools":{"type":"array","items":{"type":"object"}},"file_ids":{"type":"array","items":{"type":"string"}}}},"File":{"type":"object","properties":{"file_id":{"type":"string"},"filename":{"type":"string"},"type":{"type":"string"},"filepath":{"type":"string"},"bytes":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}},"StartupConfig":{"type":"object","properties":{"appTitle":{"type":"string"},"serverDomain":{"type":"string"},"registrationEnabled":{"type":"boolean"},"socialLoginEnabled":{"type":"boolean"},"emailLoginEnabled":{"type":"boolean"},"passwordResetEnabled":{"type":"boolean"},"sharedLinksEnabled":{"type":"boolean"},"modelSpecs":{"type":"object"},"interface":{"type":"object"},"balance":{"type":"object"}}}},"responses":{"Unauthorized":{"description":"Unauthorized - invalid or missing authentication","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"}}}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Not found"}}}}}}}}}