{"openapi":"3.1.0","info":{"title":"Lingua — AI Translation & Localization","description":"Pay USDC, get context-aware AI translation between any language pair. Supports 100+ languages, cultural adaptation, and batch translation.","version":"1.0.0","contact":{"email":"jadedfocus@gmail.com"}},"paths":{"/api/translate":{"post":{"summary":"Translate text between any language pair","description":"Translate text between any language pair. Body: { text, to (ISO 639-1), from? (auto-detect if omitted), context? }","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text","to"],"properties":{"text":{"type":"string","minLength":1,"maxLength":50000},"to":{"type":"string"},"from":{"type":"string"},"context":{"type":"string","minLength":1,"maxLength":4000}}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"1.000000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["ok","translation","detected_language","confidence"],"properties":{"ok":{"type":"boolean","enum":[true]},"translation":{"type":"string","minLength":1,"maxLength":200000},"detected_language":{"type":"string"},"confidence":{"type":"string"}}}}}},"400":{"description":"Invalid request; no payment requested"},"402":{"description":"Payment authorization required"},"415":{"description":"JSON media type required; no payment requested"},"502":{"description":"Invalid provider output"},"503":{"description":"Provider or facilitator unavailable; no payment requested"}}}},"/api/localize":{"post":{"summary":"Full localization with cultural adaptation","description":"Full localization with cultural adaptation. Body: { text, target_locale (e.g. ja-JP, pt-BR), content_type? }","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text","target_locale"],"properties":{"text":{"type":"string","minLength":1,"maxLength":50000},"target_locale":{"type":"string"},"content_type":{"type":"string","minLength":1,"maxLength":200}}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"2.000000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["ok","localized","adaptations"],"properties":{"ok":{"type":"boolean","enum":[true]},"localized":{"type":"string","minLength":1,"maxLength":200000},"adaptations":{"type":"array","minItems":0,"maxItems":100,"items":{"type":"object","required":["original","adapted","reason"],"properties":{"original":{"type":"string","minLength":1,"maxLength":50000},"adapted":{"type":"string","minLength":1,"maxLength":50000},"reason":{"type":"string","minLength":1,"maxLength":10000}}}}}}}}},"400":{"description":"Invalid request; no payment requested"},"402":{"description":"Payment authorization required"},"415":{"description":"JSON media type required; no payment requested"},"502":{"description":"Invalid provider output"},"503":{"description":"Provider or facilitator unavailable; no payment requested"}}}},"/api/batch-translate":{"post":{"summary":"Translate up to 20 strings at once","description":"Translate up to 20 strings at once. Body: { texts: string[], to, from? }","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["texts","to"],"properties":{"texts":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"string","minLength":1,"maxLength":2500}},"to":{"type":"string"},"from":{"type":"string"}}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"3.000000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["ok","translations"],"properties":{"ok":{"type":"boolean","enum":[true]},"translations":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","required":["original","translated"],"properties":{"original":{"type":"string","minLength":1,"maxLength":2500},"translated":{"type":"string","minLength":1,"maxLength":10000}}}}}}}}},"400":{"description":"Invalid request; no payment requested"},"402":{"description":"Payment authorization required"},"415":{"description":"JSON media type required; no payment requested"},"502":{"description":"Invalid provider output"},"503":{"description":"Provider or facilitator unavailable; no payment requested"}}}}}}