{"openapi":"3.1.0","info":{"title":"CPU-LLM High Performance Gateway","version":"2.0.0"},"paths":{"/v1/models":{"get":{"tags":["OpenAI Protocol"],"summary":"List Models","operationId":"list_models_v1_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/chat/completions":{"post":{"tags":["OpenAI Protocol"],"summary":"Chat Completions","operationId":"chat_completions_v1_chat_completions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/completions":{"post":{"tags":["OpenAI Protocol"],"summary":"Text Completions","operationId":"text_completions_v1_completions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/embeddings":{"post":{"tags":["OpenAI Protocol"],"summary":"Embeddings","operationId":"embeddings_v1_embeddings_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/responses":{"post":{"tags":["OpenAI Protocol"],"summary":"Responses","description":"OpenAI /v1/responses endpoint forwarding to chat completions.","operationId":"responses_v1_responses_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/messages/count_tokens":{"post":{"tags":["Anthropic Protocol"],"summary":"Count Tokens","operationId":"count_tokens_v1_messages_count_tokens_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/messages":{"post":{"tags":["Anthropic Protocol"],"summary":"Anthropic Messages","operationId":"anthropic_messages_v1_messages_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/chat/auth/me":{"get":{"tags":["AI Chat Interface"],"summary":"Chat Auth Me","operationId":"chat_auth_me_api_chat_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/chat/models":{"get":{"tags":["AI Chat Interface"],"summary":"Chat Models","description":"Fetches installed models enriched with live loaded status from llama-server.","operationId":"chat_models_api_chat_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/chat/models/preload":{"post":{"tags":["AI Chat Interface"],"summary":"Preload Model","description":"Triggers model preloading in llama-server.","operationId":"preload_model_api_chat_models_preload_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/chat/conversations":{"get":{"tags":["AI Chat Interface"],"summary":"Get Conversations","operationId":"get_conversations_api_chat_conversations_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"folder_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Id"}},{"name":"archived","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["AI Chat Interface"],"summary":"New Conversation","operationId":"new_conversation_api_chat_conversations_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/chat/conversations/{conv_id}":{"get":{"tags":["AI Chat Interface"],"summary":"Get Conversation Detail","operationId":"get_conversation_detail_api_chat_conversations__conv_id__get","parameters":[{"name":"conv_id","in":"path","required":true,"schema":{"type":"string","title":"Conv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["AI Chat Interface"],"summary":"Patch Conversation","operationId":"patch_conversation_api_chat_conversations__conv_id__patch","parameters":[{"name":"conv_id","in":"path","required":true,"schema":{"type":"string","title":"Conv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["AI Chat Interface"],"summary":"Remove Conversation","operationId":"remove_conversation_api_chat_conversations__conv_id__delete","parameters":[{"name":"conv_id","in":"path","required":true,"schema":{"type":"string","title":"Conv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/attachments":{"post":{"tags":["AI Chat Interface"],"summary":"Upload Attachment","operationId":"upload_attachment_api_chat_attachments_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_attachment_api_chat_attachments_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/conversations/{conv_id}/messages":{"post":{"tags":["AI Chat Interface"],"summary":"Send Chat Message","operationId":"send_chat_message_api_chat_conversations__conv_id__messages_post","parameters":[{"name":"conv_id","in":"path","required":true,"schema":{"type":"string","title":"Conv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/messages/{message_id}/rate":{"post":{"tags":["AI Chat Interface"],"summary":"Rate Message","operationId":"rate_message_api_chat_messages__message_id__rate_post","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/conversations/{conv_id}/summarize":{"post":{"tags":["AI Chat Interface"],"summary":"Summarize Conversation","description":"Summarizes conversation history to free context window while preserving core context.","operationId":"summarize_conversation_api_chat_conversations__conv_id__summarize_post","parameters":[{"name":"conv_id","in":"path","required":true,"schema":{"type":"string","title":"Conv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/folders":{"get":{"tags":["AI Chat Interface"],"summary":"Get Folders","operationId":"get_folders_api_chat_folders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["AI Chat Interface"],"summary":"Add Folder","operationId":"add_folder_api_chat_folders_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/chat/folders/{folder_id}":{"delete":{"tags":["AI Chat Interface"],"summary":"Remove Folder","operationId":"remove_folder_api_chat_folders__folder_id__delete","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/presets":{"get":{"tags":["AI Chat Interface"],"summary":"Get Presets","operationId":"get_presets_api_chat_presets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["AI Chat Interface"],"summary":"Add Preset","operationId":"add_preset_api_chat_presets_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/chat/presets/{preset_id}":{"delete":{"tags":["AI Chat Interface"],"summary":"Remove Preset","operationId":"remove_preset_api_chat_presets__preset_id__delete","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","title":"Preset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/export/{conv_id}":{"get":{"tags":["AI Chat Interface"],"summary":"Export Conversation Route","operationId":"export_conversation_route_api_chat_export__conv_id__get","parameters":[{"name":"conv_id","in":"path","required":true,"schema":{"type":"string","title":"Conv Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(markdown|json)$","default":"markdown","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/usage":{"get":{"tags":["AI Chat Interface"],"summary":"Chat Usage","operationId":"chat_usage_api_chat_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/chat/data":{"delete":{"tags":["AI Chat Interface"],"summary":"Delete All Data","operationId":"delete_all_data_api_chat_data_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/metrics":{"get":{"summary":"Metrics Endpoint","operationId":"metrics_endpoint_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Health","operationId":"health_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/login":{"post":{"summary":"Login","operationId":"login_api_auth_login_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/logout":{"post":{"summary":"Logout","operationId":"logout_api_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/me":{"get":{"summary":"Get Me","operationId":"get_me_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/models/installed":{"get":{"summary":"Get Models","operationId":"get_models_api_models_installed_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/models/settings":{"post":{"summary":"Save Settings","operationId":"save_settings_api_models_settings_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/models/delete":{"post":{"summary":"Delete Model","operationId":"delete_model_api_models_delete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/models/hf/curated":{"get":{"summary":"Get Curated","operationId":"get_curated_api_models_hf_curated_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/models/hf/search":{"get":{"summary":"Search Hf","operationId":"search_hf_api_models_hf_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/models/hf/files":{"get":{"summary":"Repo Files","operationId":"repo_files_api_models_hf_files_get","parameters":[{"name":"repo_id","in":"query","required":true,"schema":{"type":"string","title":"Repo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/models/hf/download":{"post":{"summary":"Download Hf","operationId":"download_hf_api_models_hf_download_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/models/hf/downloads":{"get":{"summary":"List Downloads","operationId":"list_downloads_api_models_hf_downloads_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/models/hf/cancel":{"post":{"summary":"Cancel Download","operationId":"cancel_download_api_models_hf_cancel_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/benchmark/run":{"post":{"summary":"Run Benchmark","operationId":"run_benchmark_api_benchmark_run_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/benchmark/history":{"get":{"summary":"Bench History","operationId":"bench_history_api_benchmark_history_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/keys":{"get":{"summary":"List Keys","operationId":"list_keys_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/keys/create":{"post":{"summary":"Create Key","operationId":"create_key_api_keys_create_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/keys/revoke":{"post":{"summary":"Revoke Key","operationId":"revoke_key_api_keys_revoke_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/keys/delete":{"post":{"summary":"Delete Key","operationId":"delete_key_api_keys_delete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/keys/usage":{"get":{"summary":"Get Usage","operationId":"get_usage_api_keys_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/system/telemetry":{"get":{"summary":"Telemetry","operationId":"telemetry_api_system_telemetry_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/settings":{"get":{"summary":"Get All Settings","operationId":"get_all_settings_api_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Update Settings","operationId":"update_settings_api_settings_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/logs":{"get":{"summary":"Get Server Logs","operationId":"get_server_logs_api_logs_get","parameters":[{"name":"lines","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Lines"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Serve Dashboard","operationId":"serve_dashboard__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"head":{"summary":"Serve Dashboard","operationId":"serve_dashboard__head","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"Body_upload_attachment_api_chat_attachments_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"}},"type":"object","required":["file"],"title":"Body_upload_attachment_api_chat_attachments_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}