{"openapi":"3.0.3","info":{"title":"Kestrel API","version":"1.4.0","description":"Support-agent platform API. Authenticate with a Bearer API key.","contact":{"email":"api@lab.101s.ai"}},"servers":[{"url":"https://lab.101s.ai/api/v1"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"kst_live_*"}}},"security":[{"bearerAuth":[]}],"paths":{"/chat":{"post":{"summary":"Create a chat completion","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}}}},"/conversations":{"get":{"summary":"List conversations","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}}},"post":{"summary":"Create conversation","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}}}},"/conversations/{id}":{"get":{"summary":"Get conversation","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}}},"delete":{"summary":"Delete conversation","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}}}},"/agents":{"get":{"summary":"List agents","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}}},"post":{"summary":"Create agent","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}}}},"/agents/{id}":{"get":{"summary":"Get agent","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}}},"patch":{"summary":"Update agent","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}}}},"/documents":{"get":{"summary":"List knowledge documents","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}}},"post":{"summary":"Upload document","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}}}},"/documents/{id}":{"get":{"summary":"Get document","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}}},"delete":{"summary":"Delete document","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}}}},"/users":{"get":{"summary":"List workspace users","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}}}},"/users/{id}":{"get":{"summary":"Get user","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}}}},"/keys":{"get":{"summary":"List API keys","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}}},"post":{"summary":"Create API key","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}}}},"/usage":{"get":{"summary":"Usage and billing summary","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}}}},"/webhooks":{"get":{"summary":"List webhooks","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}}},"post":{"summary":"Create webhook","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}}}},"/billing/invoices":{"get":{"summary":"List invoices","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}}}},"/auth/login":{"post":{"summary":"Exchange credentials for a token","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}}}},"/health":{"get":{"summary":"Liveness probe","responses":{"200":{"description":"OK"}}}},"/models":{"get":{"summary":"List available models","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}}}},"/embeddings":{"post":{"summary":"Create embeddings","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}}}},"/search":{"get":{"summary":"Semantic search over documents","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}}}},"/feedback":{"post":{"summary":"Submit feedback","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}}}}}}