{"openapi":"3.0.3","info":{"title":"Reader Translation API","description":"Instant translation magnifier API with dictionary, documentation, sign language, and emoji enrichment. Part of the Platphorm News Network.","version":"2.0.0","contact":{"name":"Platphorm News","url":"https://platphormnews.com","email":"api@platphormnews.com"},"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"}},"servers":[{"url":"https://reader.platphormnews.com","description":"Production"},{"url":"http://localhost:3000","description":"Development"}],"paths":{"/api/health":{"get":{"summary":"Health check","description":"Check API health and dependency status","operationId":"getHealth","tags":["Meta"],"responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/api/v1/translate":{"get":{"summary":"Translation service info","description":"Get supported languages, features, and integration status","operationId":"getTranslateInfo","tags":["Translation"],"responses":{"200":{"description":"Service info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslateInfo"}}}}}},"post":{"summary":"Translate text","description":"Translate text between supported languages with optional dictionary, documentation, sign language, and emoji enrichment","operationId":"translateText","tags":["Translation"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslateRequest"},"examples":{"simple":{"summary":"Simple translation","value":{"text":"Hello world","target":"es"}},"enriched":{"summary":"Translation with enrichments","value":{"text":"Hello world","source":"en","target":"es","enrich":true}}}}}},"responses":{"200":{"description":"Translation successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslateResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Translation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/analytics":{"get":{"summary":"Get analytics","description":"Get aggregated analytics data","operationId":"getAnalytics","tags":["Analytics"],"parameters":[{"name":"type","in":"query","schema":{"type":"string","enum":["summary","events","languages"],"default":"summary"},"description":"Type of analytics data to retrieve"}],"responses":{"200":{"description":"Analytics data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsResponse"}}}}}},"post":{"summary":"Record analytics event","description":"Record a user behavior analytics event","operationId":"recordAnalytics","tags":["Analytics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsEvent"}}}},"responses":{"200":{"description":"Event recorded"}}}},"/api/v1/network":{"get":{"summary":"Network info","description":"Get Platphorm News Network information","operationId":"getNetwork","tags":["Network"],"responses":{"200":{"description":"Network data"}}}}},"components":{"schemas":{"HealthResponse":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded","error"]},"service":{"type":"string","example":"reader"},"version":{"type":"string","example":"2.0.0"},"timestamp":{"type":"string","format":"date-time"},"dependencies":{"type":"object","additionalProperties":{"type":"string","enum":["ok","error"]}}}},"TranslateInfo":{"type":"object","properties":{"status":{"type":"string"},"service":{"type":"string"},"version":{"type":"string"},"features":{"type":"object","properties":{"autoDetect":{"type":"boolean"},"browserLanguage":{"type":"boolean"},"dictionaryEnrichment":{"type":"boolean"},"docsEnrichment":{"type":"boolean"}}},"supportedLanguages":{"type":"array","items":{"type":"string"},"example":["en","es","fr","de","zh","ja"]},"integrations":{"type":"object","properties":{"dictionary":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"status":{"type":"string"}}},"docs":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"status":{"type":"string"}}},"emoji":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"status":{"type":"string"}}},"signLanguage":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"status":{"type":"string"}}}}}}},"TranslateRequest":{"type":"object","required":["text","target"],"properties":{"text":{"type":"string","maxLength":1000,"description":"Text to translate"},"source":{"type":"string","description":"Source language code (auto-detected if omitted)"},"target":{"type":"string","description":"Target language code"},"enrich":{"type":"boolean","default":false,"description":"Include dictionary, docs, emoji enrichments"}}},"TranslateResponse":{"type":"object","properties":{"originalText":{"type":"string"},"translatedText":{"type":"string"},"sourceLanguage":{"type":"string"},"targetLanguage":{"type":"string"},"confidence":{"type":"number","minimum":0,"maximum":1},"signLanguage":{"type":"object","nullable":true,"properties":{"symbols":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}}},"emoji":{"type":"object","nullable":true,"properties":{"emoji":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}}},"dictionary":{"type":"object","nullable":true,"properties":{"term":{"type":"string"},"definition":{"type":"string"},"phonetic":{"type":"string"},"partOfSpeech":{"type":"string"},"locale":{"type":"string"}}},"docs":{"type":"object","nullable":true,"properties":{"title":{"type":"string"},"excerpt":{"type":"string"},"url":{"type":"string","format":"uri"},"category":{"type":"string"}}},"timestamp":{"type":"string","format":"date-time"},"integrations":{"type":"object","properties":{"dictionary":{"type":"boolean"},"docs":{"type":"boolean"},"emoji":{"type":"boolean"},"signLanguage":{"type":"boolean"}}}}},"AnalyticsEvent":{"type":"object","required":["type","sessionId"],"properties":{"type":{"type":"string","description":"Event type","example":"translation_completed"},"sessionId":{"type":"string","description":"Unique session identifier"},"data":{"type":"object","description":"Event-specific data"}}},"AnalyticsResponse":{"type":"object","properties":{"summary":{"type":"object","properties":{"totalTranslations":{"type":"integer"},"totalErrors":{"type":"integer"},"errorRate":{"type":"number"},"uniqueSessions":{"type":"integer"},"avgConfidence":{"type":"number"}}},"topLanguagePairs":{"type":"array","items":{"type":"object","properties":{"pair":{"type":"string"},"count":{"type":"integer"}}}},"timestamp":{"type":"string","format":"date-time"}}},"Error":{"type":"object","properties":{"error":{"type":"string"}}}}},"tags":[{"name":"Meta","description":"Service metadata and health"},{"name":"Translation","description":"Translation operations"},{"name":"Analytics","description":"User behavior analytics"},{"name":"Network","description":"Platphorm Network integration"}],"externalDocs":{"description":"Platphorm News Network Documentation","url":"https://docs.platphormnews.com"}}