# LTX Video-0.9.7 13B Distilled · Extend API

> 0.9.7 ডিস্টিলড 13B মডেল এবং একটি টেক্সট প্রম্পট ব্যবহার করে বিদ্যমান ভিডিও বাড়ায়

আবশ্যিক `prompt`-এর নির্দেশনায় `video`-তে দেওয়া ক্লিপ চালিয়ে যায়। আউটপুট 480p বা 720p, `aspect_ratio` auto, 9:16, 1:1 বা 16:9 এবং `num_frames` 9 থেকে 1441 পর্যন্ত। `constant_rate_factor` (0 থেকে 51) ইনপুট কমপ্রেশন নিয়ন্ত্রণ করে, আর `loras` কাস্টম ওজন গ্রহণ করে।

- Model id: `ltx-video-13b-distilled/extend`
- Made by: Lightricks
- Category: Video to Video
- Output: video
- Price: $0.04 / video (cheapest run $0.04 (40 API credits))
- Run: `POST https://api.doitong.ru/v1/run/ltx-video-13b-distilled/extend`
- Quote: `POST https://api.doitong.ru/v1/quote/ltx-video-13b-distilled/extend`
- Docs page: https://doitong.com/bn/developers/models/ltx-video-13b-distilled/extend

## Pricing

Price: **$0.04 / video**. Billed once per generated video.

The full example input below costs $0.04 = 40 API credits (1 video × 40 API credits).

Prices are the upstream price in USD, paid from the API balance in API credits (1000 API credits = 1 USD). `POST https://api.doitong.ru/v1/quote/ltx-video-13b-distilled/extend` with the same JSON body returns the exact price for that input; the quote is exactly what a run charges. Invalid input is never charged and failed or canceled requests are refunded automatically.

## Input parameters

| Parameter | Canonical name | Type | Required | Default | Allowed values / range | Description |
|---|---|---|---|---|---|---|
| `prompt` |  | string | yes |  |  | জেনারেশন নির্দেশনাদানকারী টেক্সট নির্দেশনা। |
| `negative_prompt` |  | string | no | `worst quality, inconsistent motion, blurry, jittery, distorted` |  | জেনারেশনের জন্য নেতিবাচক টেক্সট নির্দেশনা। |
| `loras` |  | array of object {path, weight_name, scale} | no | `[]` |  | জেনারেশনের সময় প্রয়োগ করা LoRA ওজন। |
| `loras[].path` |  | string | yes |  |  | LoRA ওজনের অবস্থান, URL বা পাথ হিসেবে দেওয়া। |
| `loras[].weight_name` |  | string \| null | no |  |  | HuggingFace repository-তে একাধিক ওজনের মধ্য থেকে নির্বাচন করার জন্য LoRA ওজনের নাম; শুধু একাধিক ওজন থাকা repository-তে এটি প্রয়োজন। `path` কোনো HuggingFace repository শনাক্ত না করলে এই সেটিংয়ের কোনো প্রভাব নেই। |
| `loras[].scale` |  | number | no | `1` | 0 – 4 | লোড করার সময় LoRA ওজনের স্কেল নির্ধারণকারী গুণক। |
| `resolution` |  | enum (string) | no | `720p` | `480p`, `720p` | আউটপুট ভিডিওর রেজোলিউশন। |
| `aspect_ratio` |  | enum (string) | no | `auto` | `9:16`, `1:1`, `16:9`, `auto` | ভিডিওর aspect ratio। |
| `seed` |  | integer \| null | no |  |  | জেনারেশনের সময় র‍্যান্ডমনেস নিয়ন্ত্রণকারী সিড। |
| `num_frames` |  | integer | no | `121` | 9 – 1,441 | ভিডিওর মোট ফ্রেম সংখ্যা। |
| `first_pass_num_inference_steps` |  | integer | no | `8` | 2 – 12 | প্রথম পাসের ইনফারেন্স ধাপের সংখ্যা। |
| `second_pass_num_inference_steps` |  | integer | no | `8` | 2 – 12 | দ্বিতীয় পাসের ইনফারেন্স ধাপের সংখ্যা। |
| `second_pass_skip_initial_steps` |  | integer | no | `5` | 1 – 11 | দ্বিতীয় পাসে বাদ দেওয়ার প্রাথমিক ইনফারেন্স-ধাপের সংখ্যা, যা বড় পরিবর্তনের বদলে সূক্ষ্ম বিবরণে সেই পাসকে কেন্দ্রীভূত করে। |
| `frame_rate` |  | integer | no | `24` | 1 – 60 | ভিডিওর ফ্রেম রেট। |
| `expand_prompt` |  | boolean | no | `false` |  | ভাষা মডেলের মাধ্যমে প্রম্পট সম্প্রসারণ। |
| `reverse_video` |  | boolean | no | `false` |  | ভিডিওর প্লেব্যাকের ক্রম উল্টে দেওয়া। |
| `enable_safety_checker` |  | boolean | no | `true` |  | নিরাপত্তা যাচাইয়ের সুইচ; off সেটিংটি শুধু অনুমোদিত অ্যাকাউন্টের ক্ষেত্রে কার্যকর হয়। সেই অনুমোদন ছাড়া সব রিকোয়েস্টে নিরাপত্তা যাচাই করা হয়। |
| `enable_detail_pass` |  | boolean | no | `false` |  | ঐচ্ছিক দ্বিতীয় পরিশোধন পাস, সক্রিয় থাকলে ভিডিওর বিবরণ উন্নত করে। |
| `temporal_adain_factor` |  | number | no | `0.5` | 0 – 1 | অ্যাডাপটিভ ইনস্ট্যান্স নর্মালাইজেশন (AdaIN) শক্তি, যা বেশি সেটিংয়ে রঙের সামঞ্জস্য এবং কম সেটিংয়ে বেশি রঙের বৈচিত্র্যের মধ্যে ভারসাম্য বজায় রাখে। এটি প্রথমটি ছাড়া জেনারেট করা প্রতিটি খণ্ডে কাজ করে, পুরো ভিডিওতে রঙের বণ্টন স্বাভাবিক করে এবং স্যাচুরেশন বা কনট্রাস্টের ক্রমবর্ধমান বৃদ্ধি কমাতে সহায়তা করে। |
| `tone_map_compression_ratio` |  | number | no | `0` | 0 – 1 | টোন-ম্যাপিং কমপ্রেশন স্তর, 0.0-এ কোনো কমপ্রেশন না থাকা থেকে 1.0-এ সর্বাধিক কমপ্রেশন পর্যন্ত। এভাবে ভিডিওর ডায়নামিক রেঞ্জ কমপ্রেস করলে ভিজ্যুয়াল মান উন্নত হয়। |
| `constant_rate_factor` |  | integer | no | `29` | 0 – 51 | ইনপুট কমপ্রেশনের জন্য ব্যবহৃত কনস্ট্যান্ট রেট ফ্যাক্টর (CRF), যা সরবরাহ করা মিডিয়াকে মডেলের প্রশিক্ষণ ডেটার কাছাকাছি এনে মোশন কোয়ালিটি উন্নত করতে পারে। |
| `video` |  | object {video_url, start_frame_num, strength, limit_num_frames, max_num_frames, resample_fps, target_fps, reverse_video} | yes |  |  | সম্প্রসারণের জন্য সোর্স ভিডিও। |
| `video.video_url` |  | string (video URL) | yes |  |  | URL দ্বারা সরবরাহ করা কন্ডিশনিং ভিডিও। |
| `video.start_frame_num` |  | integer | no | `0` | 0 – 1,440 | ভিডিওতে কন্ডিশনিং শুরুর অবস্থান, 8 দ্বারা বিভাজ্য ফ্রেম নম্বর হিসেবে নির্দিষ্ট। |
| `video.strength` |  | number | no | `1` | 0 – 1 | কন্ডিশনিং তীব্রতা: 0.0 কন্ডিশনিং নিষ্ক্রিয় করে, আর 1.0 এটি সম্পূর্ণভাবে প্রয়োগ করে। |
| `video.limit_num_frames` |  | boolean | no | `false` |  | ভিডিও ফ্রেম-সীমা সুইচ: সক্রিয় করলে ভিডিও থেকে নেওয়া ফ্রেমের সর্বোচ্চ সীমা হিসেবে `max_num_frames` ব্যবহৃত হয়। |
| `video.max_num_frames` |  | integer | no | `1441` | 1 – 1,441 | ভিডিও থেকে ব্যবহারের ফ্রেম-সীমা; None নির্বাচন করলে সীমিত ফ্রেম সংখ্যার বদলে পুরো ভিডিও নির্বাচন করা হয়। |
| `video.resample_fps` |  | boolean | no | `false` |  | ভিডিও ফ্রেম-রেট রূপান্তর সুইচ: সক্রিয় করলে `target_fps`-এ নির্দিষ্ট হারে ভিডিওটি পুনরায় স্যাম্পল করা হয়। |
| `video.target_fps` |  | integer | no | `24` | 1 – 60 | FPS-এ পুনরায় স্যাম্পলিং ফ্রেম রেট, কেবল `resample_fps` সক্রিয় থাকলেই প্রযোজ্য। |
| `video.reverse_video` |  | boolean | no | `false` |  | যেসব কাজে কন্ডিশনিংকে পেছন দিকের ফ্রেম অনুসরণ করতে হয়, সেগুলোর জন্য ভিডিওর ক্রম উল্টে দেওয়া। |

## Example input

Required parameters only:

```json
{
  "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
  "video": {
    "video_url": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
  }
}
```

A fuller example:

```json
{
  "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
  "video": {
    "video_url": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
  }
}
```

## Run it

Set `DOITONG_API_KEY` to a key from https://doitong.com/developers/dashboard#keys. `?wait=20` returns the finished request in the same call when it is ready within 20 seconds; otherwise poll `GET /requests/{id}` (it also accepts `?wait=`), or pass `webhook_url`.

### curl

```bash
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/ltx-video-13b-distilled/extend?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "video": {
      "video_url": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
    }
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"
```

### JavaScript

```javascript
const API = "https://api.doitong.ru/v1";
const headers = {
  "Authorization": "Bearer " + process.env.DOITONG_API_KEY,
  "Content-Type": "application/json",
};

// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/ltx-video-13b-distilled/extend?wait=20", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "video": {
      "video_url": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
    }
  }),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);

// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
  res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
  request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
```

### Python

```python
import os
import requests

API = "https://api.doitong.ru/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}

payload = {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "video": {
        "video_url": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4",
    },
}

# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/ltx-video-13b-distilled/extend", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
    raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])

# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
    request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
    raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
```

### MCP

The MCP server at `https://api.doitong.ru/v1/mcp` exposes the tools `search_models`, `get_model`, `quote`, `run`, `get_request`, `cancel_request`, `list_requests`, `create_upload` and `get_account`. A `run` call for this model:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "run",
    "arguments": {
      "model_id": "ltx-video-13b-distilled/extend",
      "input": {
        "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
        "video": {
          "video_url": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
        }
      },
      "wait_seconds": 20
    }
  }
}
```

## Response

Every call returns a request object. `status` is one of `queued`, `running`, `succeeded`, `failed`, `canceled`. `outputs` lists the generated files with URLs on our storage (kept forever, or 7 days with `?storage=temporary`; `storage` says which); `output` is the model's own result object with the same URLs.

```json
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "ltx-video-13b-distilled/extend",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 40,
    "usd": "0.04",
    "charged": 40,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "video": {
      "video_url": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
    }
  },
  "output": {
    "video": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_name": "0-output.mp4",
      "file_size": 1843200
    },
    "prompt": "Woman walking on a street in Tokyo",
    "seed": 42
  },
  "outputs": [
    {
      "type": "video",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_size": 1843200,
      "width": 1280,
      "height": 720,
      "duration": 5,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
```

### Output fields (`output`)

| Field | Type | Description |
|---|---|---|
| `video` | object {url, content_type, file_name, file_size} | জেনারেশনের মাধ্যমে তৈরি ভিডিও ফাইল। |
| `prompt` | string | আউটপুট জেনারেট করতে ব্যবহৃত প্রম্পট। |
| `seed` | integer | জেনারেশনের সময় প্রয়োগ করা সিডের মান। |

## Related models

- [LTX Video-0.9.7 13B Distilled](https://doitong.com/developers/models/ltx-video-13b-distilled.md) (`ltx-video-13b-distilled`): from $0.04 / second of output video
- [LTX Video-0.9.7 13B Distilled · Image to Video](https://doitong.com/developers/models/ltx-video-13b-distilled/image-to-video.md) (`ltx-video-13b-distilled/image-to-video`): from $0.04 / second of output video
- [LTX Video-0.9.7 13B Distilled · Multiconditioning](https://doitong.com/developers/models/ltx-video-13b-distilled/multiconditioning.md) (`ltx-video-13b-distilled/multiconditioning`): from $0.04 / second of output video
- [Ltx 2.3](https://doitong.com/developers/models/ltx-2.3/reframe.md) (`ltx-2.3/reframe`): from $0.10 / second of input video
- [LTX 2.3 22B](https://doitong.com/developers/models/ltx-2.3-22b/reference-video-to-video/lora.md) (`ltx-2.3-22b/reference-video-to-video/lora`): $0.00181 / megapixel of output video
- [Ltx 2.3 Quality · Clean Plate](https://doitong.com/developers/models/ltx-2.3-quality/clean-plate.md) (`ltx-2.3-quality/clean-plate`): $0.00241 / megapixel of output video
- [Ltx 2.3 Quality · Colorization](https://doitong.com/developers/models/ltx-2.3-quality/colorization.md) (`ltx-2.3-quality/colorization`): $0.00241 / megapixel of output video
- [Ltx 2.3 Quality · Cross Eyed](https://doitong.com/developers/models/ltx-2.3-quality/cross-eyed.md) (`ltx-2.3-quality/cross-eyed`): $0.00241 / megapixel of output video

## Links

- HTML page: https://doitong.com/developers/models/ltx-video-13b-distilled/extend
- All models and guides for AI agents: https://doitong.com/developers/llms.txt
- OpenAPI 3.1 with this model's typed request body: https://doitong.com/developers/openapi.json?model=ltx-video-13b-distilled/extend
- Errors: https://doitong.com/developers/docs/errors
- Model details as JSON: https://api.doitong.ru/v1/models/ltx-video-13b-distilled/extend
