{"openapi":"3.1.0","info":{"title":"DeepL via Locus MPP","version":"1.0.0","description":"Professional translation and text improvement — translate text between 30+ languages with industry-leading quality, or improve and rephrase text with DeepL Write.","contact":{"email":"api@paywithlocus.com"},"x-guidance":"Use the documented POST operations for DeepL. Send JSON matching each requestBody schema. Unpaid public x402 requests return an x402 v2 payment challenge; retry the same body with PAYMENT-SIGNATURE and the returned x-locus-request-id."},"x-agentcash-guidance":{"llmsTxtUrl":"https://beta.paywithlocus.com/mpp/deepl.md"},"x-service-info":{"categories":["ai"],"docs":{"homepage":"https://www.deepl.com","apiReference":"https://developers.deepl.com","llms":"https://beta.paywithlocus.com/mpp/deepl.md"}},"paths":{"/deepl/translate":{"post":{"operationId":"deepl_translate","summary":"Translate","description":"Translate text between 30+ languages with DeepL's industry-leading neural machine translation. Supports formality control, context, and model selection.","tags":["AI / Translation"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":null,"currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.025+ (scales with text length)"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"array","items":{"type":"string"},"description":"Text(s) to translate (up to 50 items)"},"target_lang":{"type":"string","description":"Target language code (e.g. \"DE\", \"FR\", \"ES\", \"JA\", \"ZH\")"},"source_lang":{"type":"string","description":"Source language code (auto-detected if omitted)"},"formality":{"type":"string","description":"\"default\", \"more\", \"less\", \"prefer_more\", \"prefer_less\""},"context":{"type":"string","description":"Additional context to improve translation quality (not translated)"},"model_type":{"type":"string","description":"\"quality_optimized\", \"latency_optimized\", or \"prefer_quality_optimized\""},"split_sentences":{"type":"string","description":"\"0\" (none), \"1\" (default), or \"nonewlines\""},"preserve_formatting":{"type":"boolean","description":"Preserve original formatting (punctuation, case)"},"tag_handling":{"type":"string","description":"\"xml\" or \"html\" for markup-aware translation"}},"required":["text","target_lang"],"additionalProperties":true},"example":{"text":["Hello from x402"],"target_lang":"DE"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/deepl/rephrase":{"post":{"operationId":"deepl_rephrase","summary":"Rephrase (Write)","description":"Improve and rephrase text with DeepL Write. Fix grammar, adjust tone, change writing style, and convert between language variants (e.g. US → British English).","tags":["AI / Translation"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":null,"currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.025+ (scales with text length)"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"array","items":{"type":"string"},"description":"Text(s) to improve"},"target_lang":{"type":"string","description":"Language: \"de\", \"en-US\", \"en-GB\", \"es\", \"fr\", \"it\", \"pt-BR\", \"pt-PT\""},"writing_style":{"type":"string","description":"\"simple\", \"business\", \"academic\", \"casual\", or \"default\""},"tone":{"type":"string","description":"\"enthusiastic\", \"friendly\", \"confident\", \"diplomatic\", or \"default\""}},"required":["text","target_lang"],"additionalProperties":true},"example":{"text":["Hello from x402"],"target_lang":"de"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/deepl/languages":{"post":{"operationId":"deepl_languages","summary":"Languages","description":"List all supported source and target languages with formality support info.","tags":["AI / Translation"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"5000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.005 fee only"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"\"source\" (default) or \"target\""}},"additionalProperties":true},"example":{"type":"source"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}}}}