{"components":{"schemas":{"ErrorResponse":{"properties":{"code":{"type":"string"},"error":{"type":"string"}},"required":["error"],"type":"object"},"TranslateRequest":{"properties":{"source_lang":{"enum":["en","id","es","fr","de","it","pt","ru","ja","ko","zh","ar"],"type":"string"},"target_lang":{"enum":["en","id","es","fr","de","it","pt","ru","ja","ko","zh","ar"],"type":"string"},"text":{"maxLength":3000,"type":"string"}},"required":["text","source_lang","target_lang"],"type":"object"},"TranslateResponse":{"properties":{"cache_hit":{"type":"boolean"},"daily_limit":{"type":["integer","null"]},"path":{"items":{"items":{"type":"string"},"type":"array"},"type":"array"},"plan_code":{"enum":["free","unlimited"],"type":"string"},"remaining_credits":{"type":["integer","null"]},"source_lang":{"type":"string"},"target_lang":{"type":"string"},"translation":{"type":"string"},"used_today":{"type":"integer"}},"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"in":"header","name":"X-API-Key","type":"apiKey"}}},"info":{"description":"Machine-readable API contract for Quenza Translation.","title":"Quenza Translation API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/api/v1/languages":{"get":{"responses":{"200":{"description":"Language metadata."}},"summary":"List supported languages","tags":["Account"]}},"/api/v1/plans":{"get":{"responses":{"200":{"description":"Available subscription plans."}},"summary":"List available plans","tags":["Account"]}},"/api/v1/translate":{"post":{"description":"Runs the same MarianMT language pipeline used by the web application. API requests never save translation history, but they can return per-user cached results when the same text and language pair were translated before.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslateResponse"}}},"description":"Translation completed."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid request or unsupported language."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid or inactive API key."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Insufficient credits."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Character limit exceeded."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded."},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Translation model unavailable."}},"security":[{"ApiKeyAuth":[]}],"summary":"Translate text","tags":["Translation"]}},"/api/v1/usage":{"get":{"responses":{"200":{"description":"Usage information for the authenticated API key."},"401":{"description":"Invalid or inactive API key."}},"security":[{"ApiKeyAuth":[]}],"summary":"Inspect API usage","tags":["Account"]}}},"servers":[{"url":"http://translate.quenza.id"}],"tags":[{"description":"Translate text without storing history.","name":"Translation"},{"description":"Inspect plans, languages, and usage metadata.","name":"Account"}]}
