> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.ollang.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Project Media Insights

> Check whether a project's video needs lip-sync or visual translation, before you order

Analyzes a project's source video and returns routing signals:

* Whether a person speaks on camera: a lip-sync candidate.
* Whether there is on-screen text to translate: a visual translation candidate.
* Whether some of that text is designed graphic text.
* The workflow that matches those signals.

Use it to route new videos to the right folder or order settings automatically.

> [!NOTE]
>
> The result is informational. Nothing on the project or its orders changes, no
> credits are used, and you still choose the order settings yourself.

The first call for a video analyzes it and can take up to about 45 seconds. Later calls for the same video return the stored result immediately, for up to 7 days or until the source video is replaced. Each answer comes with a probability and a confidence. Treat `low` confidence as "check this video yourself".

**Supported videos:**

* **Formats:** MP4, MOV, WebM, AVI, MPEG, WMV, FLV and 3GP.
* **Length:** up to 20 minutes.
* **Size:** up to 2 GB.

## Authorization

Send the integration API key in `x-api-key`. The project must belong to the key's workspace.

## Path parameters

**projectId** `string` *required*

ID of the project whose source video to analyze.

```bash cURL theme={null}
curl "https://api-integration.ollang.com/integration/project/60b8d6f1e1b9b1d8c6c0d8e1/media-insights" \
  -H "x-api-key: $OLLANG_API_KEY"
```

```javascript JavaScript theme={null}
const projectId = "60b8d6f1e1b9b1d8c6c0d8e1";

const response = await fetch(
  `https://api-integration.ollang.com/integration/project/${projectId}/media-insights`,
  { headers: { "x-api-key": process.env.OLLANG_API_KEY } }
);

if (!response.ok) {
  // 404: unknown project; 422: no video that can be analyzed; 5xx: retry later.
  const error = await response.json().catch(() => ({}));
  throw new Error(`Media insights failed (${response.status}): ${error.message ?? ""}`);
}

const insights = await response.json();
if (insights.suggestedWorkflow.confidence === "high") {
  console.log("Route to:", insights.suggestedWorkflow.value);
} else {
  console.log("Check this video yourself before routing it.");
}
```

```python Python theme={null}
import os
import requests

project_id = "60b8d6f1e1b9b1d8c6c0d8e1"
response = requests.get(
    f"https://api-integration.ollang.com/integration/project/{project_id}/media-insights",
    headers={"x-api-key": os.environ["OLLANG_API_KEY"]},
    timeout=60,
)
response.raise_for_status()  # 404, 422 or 5xx: see Errors below
insights = response.json()
workflow = insights["suggestedWorkflow"]
if workflow["confidence"] == "high":
    print("Route to:", workflow["value"])
else:
    print("Check this video yourself before routing it.")
```

```json 200 theme={null}
{
  "projectId": "60b8d6f1e1b9b1d8c6c0d8e1",
  "docId": "60b8d6f1e1b9b1d8c6c0d8e2",
  "analyzedAt": "2026-11-23T18:43:43.901Z",
  "suggestedWorkflow": { "value": "lipsync_and_visual", "probability": 0.97, "confidence": "high" },
  "speakerOnCamera": { "detected": true, "probability": 0.99, "confidence": "high" },
  "onScreenText": { "detected": true, "probability": 0.98, "confidence": "high" },
  "designedText": { "detected": false, "probability": 0.4, "confidence": "low" }
}
```

## Response

**projectId** `string` *required*

The project ID.

**docId** `string` *required*

The source video document that was analyzed.

**analyzedAt** `string` *required*

When the video was analyzed (ISO 8601). Repeated calls return the stored result with its original time.

**suggestedWorkflow** `object` *required*

The workflow that matches `speakerOnCamera` and `onScreenText`.

**properties**

**value** `string` *required*

One of the following:

* `lipsync_and_visual`: a person speaks on camera and there is on-screen text to translate.
* `lipsync_only`: a person speaks on camera; there is no on-screen text to translate.
* `visual_only`: voice-over or no speech; there is on-screen text to translate.
* `standard_dubbing`: neither.

**probability** `number` *required*

From 0 to 1.

**confidence** `string` *required*

`high`, `medium` or `low`. It is `low` whenever the signals disagree with each other.

**speakerOnCamera** `object` *required*

A person is visibly speaking on camera, with their mouth moving in sync with the speech. This makes the video a lip-sync candidate. A person who is only reacting while a narrator speaks does not count.

**properties**

**detected** `boolean` *required*

**probability** `number` *required*

From 0 to 1.

**confidence** `string` *required*

`high`, `medium` or `low`.

**onScreenText** `object` *required*

On-screen text that would need translating: captions, titles, labels, app or website screens, or graphics with words. Logos and bare person-name labels do not count. Same properties as `speakerOnCamera`.

**designedText** `object` *required*

Designed graphic text beyond plain captions, such as stylised titles, motion graphics, quiz or info cards, or text drawn into an illustration. It is only `detected` when `onScreenText` is detected too. Same properties as `speakerOnCamera`.

## Errors

| Status | Meaning |
| - | - |
| `401` | Invalid API key. |
| `404` | The project does not exist or does not belong to this workspace. |
| `422` | No video can be analyzed. The project may have no source video, or the video is archived, stored outside your workspace's uploads, in an unsupported format, longer than 20 minutes or larger than 2 GB, or it was refused by the analysis. Retrying will not help. |
| `500`, `503` | Analysis is temporarily unavailable or did not finish in time. Try again later. |

## Limitations

* **One video per call:** the source video most recently added to the project is analyzed. Replacing it triggers a fresh analysis.
* **Narration over a talking face:** a person whose mouth moves while a separate narrator speaks can still be reported as an on-camera speaker. Check `low` and `medium` results before you rely on them.
* **No timestamps:** the result covers the whole video. It does not say where in the video the speaker or the text appears.
* **Transferred projects:** a project moved from another workspace keeps its video in that workspace's storage and returns `422` until the video is uploaded again.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.