T-OCR is the vision-category specialist service in thcode’s AI for Thai catalog. It detects and recognizes Thai text present in an image and returns the recognized text as a string alongside a confidence score and a list of individual words. In the broader thcode workflow, T-OCR results feed directly into the Typhoon reasoning model — after the OCR endpoint produces Thai text, Typhoon can interpret, translate, classify, or incorporate that text into a coding task, bridging the gap between image-embedded Thai content and code.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Temicide/thcode/llms.txt
Use this file to discover all available pages before exploring further.
T-OCR is catalogued in this release. That means it is discoverable and fully inspectable via
/tools, but the endpoint mapping, live transport, and contract test are a subsequent integration phase. Invoking T-OCR now returns a stub refusal: "Catalogued — Not available yet".Service Identity
| Field | Value |
|---|---|
| Service ID | t-ocr |
| Upstream name | T-OCR |
| Thai name | ที-โอซีอาร์ |
| Category | vision |
| Modality | image |
| Endpoint | https://api.aiforthai.in.th/ocr |
| Support level | catalogued |
| Contract ver. | 1.0.0 |
| Adapter ver. | 1.0.0 |
Search Terms
The router matches T-OCR against the following terms. You can use any of them in the/tools search command:
Handler: Input Contract
TheTocrSpecialistHandler builds a transport request from a binary image artifact. The handler reads the first prepared artifact, validates that it carries bytes (contentKind: 'bytes'), base64-encodes the image data, and assembles the JSON request body.
Request body sent to the OCR endpoint
POST to https://api.aiforthai.in.th/ocr with:
Authorization: Bearer <key>— the raw API key is resolved in scope only and never appears in Evidence, logs, or the secret-freeheadersSummary(which shows[redacted]).Content-Type: application/json
bytes, the handler throws before a transport call is made.
Handler: Output Contract
TheTocrSpecialistHandler maps the upstream JSON response into three typed SpecialistFieldValue fields:
- recognizedText
- confidence
- words
Kind:
textMapped from the result key in the upstream response. Present when result is a non-empty string. Empty string and null are both treated as not-present and the field is listed in emptyFields.null, or of the wrong type produces present: false and is appended to emptyFields. The handler never invents fields that were not in the upstream response.
Fixture
The handler ships with a deterministic, built-in (non-user) fixture used for health probes. The fixture is a minimal valid 1×1 red PNG (70 bytes), and the health canary verifies the endpoint accepts it and returns a valid JSON object. The fixture’s expected outputs are:image/png as the media type; any other media type is rejected before the probe is dispatched.
What Typhoon Does with T-OCR Results
Once T-OCR returns recognized Thai text, Typhoon receives therecognizedText field as the primary output. From there the reasoning model can:
- Translate the text into English for an international developer.
- Use the text as input to a subsequent specialist service (for example, pipe it into Named Entity Recognition).
- Incorporate the text into code — variable names, comments, string constants, or documentation derived from an image.
- Describe or summarize the visual content of a scanned document relevant to a coding task.
Using /tools with T-OCR
Inspect the T-OCR catalog entry
Search for vision services