For Developers

Torii Image Translator API

Integrate the power of Torii's API into your own applications.

Get Started in Minutes

Start translating images with just a few lines of code.

1

Sign Up & Get Your Key

Create a free account and generate your unique API key from your dashboard.

2

Purchase Credits

Our API uses a simple credit-based system. Top up your account to start translating.

3

Make Your First Request

Use our simple endpoint to send an image and receive the translation instantly.

API Reference

Endpoints

Build Your Request

Authentication

Authenticate your requests by including your API key in the Authorization header as a Bearer token.

Translate Endpoint

POST https://api.toriitranslate.com/api/upload

Request Headers

target_lang string * required

The target language code for the translation.

translator string * required

The translation model to use.

font string * required

The font to be used for the translated text.

text_align string

The alignment of the translated text.

stroke_disabled boolean

Whether to disable the text stroke/outline (useful for some documents, since Torii tries to detect the stroke and color for every word).

inpaint_only boolean

Whether to display to only remove text from the image and return a cleaned image without translations.

Request Body

The body of the request must contain the raw binary data of the image you want to translate or clean, as multipart/form-data, with the key "file" containing the image bytes.

Response Headers

success boolean

Whether the request was successful. If true, the response contains the translated or cleaned image, else the response contains an error message.

credits number

The amount of credits remaining in the account.

Response Body

The response content will contain the raw bytes of the translated or cleaned image.

Example Code

Manage Your API Key

Please sign in to generate and manage your API key.

Sign In