Skip to content

Itrp Demo

POST
/itrp/demo
curl --request POST \
--url https://example.com/itrp/demo \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "image": "example", "source_lang": "example", "target_lang": "example", "ocr_model": "paddleocr-vl", "ocr_variant": "example", "translation_model": "hunyuanmt-7b", "translation_variant": "example" }'

Submit an image for OCR → translate → overlay rendering.

Returns 202 immediately with a task_id. Poll GET /itrp/demo/{task_id} for the result. The Celery worker handles model warmup, OCR blocks, translation, and overlay in sequence.

Media typeapplication/json
ITRPDemoRequest
object
image
required
Image

Base64-encoded image (JPEG or PNG)

string
source_lang
required
Source Lang

Source language code

string
>= 1 characters <= 20 characters
target_lang
required
Target Lang

Target language code

string
>= 1 characters <= 20 characters
ocr_model
Ocr Model

Registered OCR model name

string
default: paddleocr-vl
ocr_variant
Any of:
string
<= 64 characters
translation_model
Translation Model

Registered translation model name

string
default: hunyuanmt-7b
translation_variant
Any of:
string
<= 64 characters

Successful Response

Media typeapplication/json
ITRPDemoSubmission
object
task_id
required
Task Id

Celery task ID for tracking the ITRP job

string
status
Status

Initial status of the task

string
default: queued
Example
{
"status": "queued"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}