Detect text regions
detect_text_regionsReturn the OCR text regions detected in a clip's video frames OR a still image asset. Pass either clip (a video..clip filename) or image (an image layer's filename) — not both. Video clips are sampled every 0.3s at upload time; images are OCR'd once. Results are cached in R2 next to the source. Returns { status: 'ready' | 'not-ready', frames: [{ frame, time, words: [{ text, x0, y0, x1, y1, confidence }] }], videoWidth, videoHeight }. For an image there's a single frame (frame 0); videoWidth/videoHeight are the image's pixel dimensions. Each words entry is one detected text line — text may hold several words, the box is axis-aligned, and confidence is 0–100. Coordinates are in the SOURCE pixel space (not canvas space). Use to know where titles / subtitles / lower-thirds are baked into the video or image so the Morpha title + intro graphics can be positioned to not collide.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectId": "<projectId>"
},
"name": "detect_text_regions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clip | No | Video clip filename (the same value as `video.<id>.clip`). Pass this OR `image`. | |
| image | No | Image layer filename (the same value as `image.<id>.filename`). Pass this OR `clip`. | |
| projectId | Yes | Project the clip/image belongs to. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the call succeeded. | |
| data | No | The payload, shaped by the tool. | |
| note | No | What to do next when not ready. | |
| error | No | Why it failed. | |
| status | No | For cache-backed readers: whether the answer was ready. | |
| editorUrl | No | Opens this project in the editor. |