Torii Image Translator
收藏Torii Image Translator API 数据集概述
基本信息
- API名称: Torii Image Translator
- API类别: Translation
- API提供者: stringie
- 订阅人数: 98
- 流行度: 9.8
- 服务等级: 100%
- 延迟: 5125ms
- 测试通过率: 100%
订阅计划
- BASIC: $0.00 / 月
- PRO: $9.99 / 月
功能概述
- 翻译图像中的文本到指定语言,返回包含翻译后文本的新图像。
- 支持多种语言翻译,利用先进的翻译技术(如GPT-4)。
- 提供OCR功能作为独立API选项。
主要特点
- 简单集成: 通过简单的API调用实现图像翻译。
- 无缝翻译: 高质量翻译,保留原始图像布局。
- 先进技术: 使用GPT-4等技术确保翻译准确。
- 开发者友好: 设计简洁高效,易于集成。
使用流程
- 选择翻译模型(mini或main)。
- 上传图像文件。
- 指定目标语言。
- 获取翻译后的图像。
示例代码
cURL
bash curl --request POST --url https://torii-image-translator.p.rapidapi.com/upload --header Content-Type: multipart/form-data --header font: noto --header target_lang: en --header text_align: auto --header stroke_disabled: true --header x-rapidapi-host: torii-image-translator.p.rapidapi.com --header x-rapidapi-key: YOUR_RAPIDAPI_KEY --form file=@path/to/image.png --output translated_image_if_success_response.png --fail --silent --show-error
Python
python import requests
response = requests.post( "https://torii-image-translator.p.rapidapi.com/upload", files={"file": open("path/to/image.png", "rb")}, headers={ "target_lang": "en", "font": "noto", "stroke_disabled": "true", "text_align": "auto", "x-rapidapi-host": "torii-image-translator.p.rapidapi.com", "x-rapidapi-key": "YOUR_RAPIDAPI_KEY" } )
if (response.headers.get("success") == "true"): with open("translated_image.jpg", "wb") as image: image.write(response.content) else: print(response.content)
相关资源
- 产品网站: Torii Image Translator Website
- 使用条款: Terms of Use




