{"openapi":"3.0.1","info":{"title":"Test Agent","version":"1.0.0","description":"A test AI agent that processes queries using OpenRouter API."},"x-agent-metadata":{"address":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","name":"testy","version":"1.0.0","description":"A test AI agent that demonstrates OpenRouter API integration","email":"test@example.com","url":"https://localhost:8000","author":"Test Developer","avatar":"https://example.com/avatar.png","license":"MIT","tags":["AI","Test","OpenRouter"]},"servers":[{"url":"http://localhost:8000","description":"Local development server"}],"security":[{"ApiKeyAuth":[]}],"paths":{"/agent-spec":{"get":{"summary":"Get Agent Specification","description":"Returns the complete agent specification in JSON format","operationId":"getAgentSpec","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/query":{"post":{"summary":"Submit a query to the agent","operationId":"submitQuery","description":"Processes a query using OpenRouter API and returns the response","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","description":"The query to be processed by the AI","example":"What is the meaning of life?"}},"required":["question"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string","description":"The response from the AI","example":"The meaning of life is 42"},"dataSources":{"type":"array","items":{"type":"string"},"description":"List of data sources used to generate the response","example":["openrouter.ai"]}},"required":["answer"]}}}},"400":{"description":"Bad request - Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message describing what went wrong","example":"Invalid API key provided"},"code":{"type":"integer","description":"HTTP status code","example":401}},"required":["error","code"]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message describing what went wrong","example":"Invalid API key provided"},"code":{"type":"integer","description":"HTTP status code","example":401}},"required":["error","code"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message describing what went wrong","example":"Invalid API key provided"},"code":{"type":"integer","description":"HTTP status code","example":401}},"required":["error","code"]}}}}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"API key authentication"}},"schemas":{"QueryRequest":{"type":"object","properties":{"question":{"type":"string","description":"The query to be processed by the AI","example":"What is the meaning of life?"}},"required":["question"]},"QueryResponse":{"type":"object","properties":{"answer":{"type":"string","description":"The response from the AI","example":"The meaning of life is 42"},"dataSources":{"type":"array","items":{"type":"string"},"description":"List of data sources used to generate the response","example":["openrouter.ai"]}},"required":["answer"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message describing what went wrong","example":"Invalid API key provided"},"code":{"type":"integer","description":"HTTP status code","example":401}},"required":["error","code"]}}}}