---
agent:
  instructions: "Search the site by keyword or question. The search API returns Markdown."
  endpoint: "https://platform.invideo.io/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Gemini Omni Flash 1.2 API

Model id: `gemini-omni-flash-12-preview-edit` · Google · Video

## invideo API

Set the base URL to `https://platform-api.invideo.io/v1`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /v1/request` · Model ID in `model`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/v1/request' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "model": "gemini-omni-flash-12-preview-edit",
    "mode": "edit",
    "input": {
      "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/v1/request", headers=headers, json=json.loads("{\"model\":\"gemini-omni-flash-12-preview-edit\",\"mode\":\"edit\",\"input\":{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/v1/request", {
  method: "POST", headers, body: JSON.stringify({"model":"gemini-omni-flash-12-preview-edit","mode":"edit","input":{"prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

answers at once with the request's id; read it with GET /v1/request/{id} until it has ended. The completed request contains `output.files[]` with temporary download links, or `output.transcript` for transcription.

`cost_usd` on the completed request. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "status": "succeeded",
  "output": {
    "files": [
      {
        "url": "https://…/completed-output"
      }
    ]
  },
  "cost_usd": "0.024",
  "cost": {
    "total_usd": "0.024",
    "lines": [
      {
        "item": "second",
        "quantity": "1",
        "unit_price_usd": "0.024",
        "amount_usd": "0.024"
      }
    ]
  }
}
```

## Adobe Firefly

Set the base URL to `https://platform-api.invideo.io/adobe`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /adobe/v3/videos/generate` · Model ID in `model`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/adobe/v3/videos/generate' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "model": "gemini-omni-flash-12-preview-edit",
    "extra": {
      "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/adobe/v3/videos/generate", headers=headers, json=json.loads("{\"model\":\"gemini-omni-flash-12-preview-edit\",\"extra\":{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/adobe/v3/videos/generate", {
  method: "POST", headers, body: JSON.stringify({"model":"gemini-omni-flash-12-preview-edit","extra":{"prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

Returns a task. Read `GET /adobe/v3/status/{id}` for the result.

`metadata.invideo_cost_usd` on the completed result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "metadata": {
    "invideo_cost_usd": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## Alibaba Model Studio

Set the base URL to `https://platform-api.invideo.io/dashscope`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /dashscope/api/v1/services/aigc/video-generation/video-synthesis` · Model ID in `model`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/dashscope/api/v1/services/aigc/video-generation/video-synthesis' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  -H 'x-dashscope-async: enable' \
  --data-binary '{
    "model": "gemini-omni-flash-12-preview-edit",
    "extra": {
      "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\",\"x-dashscope-async\":\"enable\"}").items()}
response = requests.post("https://platform-api.invideo.io/dashscope/api/v1/services/aigc/video-generation/video-synthesis", headers=headers, json=json.loads("{\"model\":\"gemini-omni-flash-12-preview-edit\",\"extra\":{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json",
  "x-dashscope-async": "enable"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/dashscope/api/v1/services/aigc/video-generation/video-synthesis", {
  method: "POST", headers, body: JSON.stringify({"model":"gemini-omni-flash-12-preview-edit","extra":{"prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

Returns a task. Read `GET /dashscope/api/v1/tasks/{id}` for the result.

`metadata.invideo_cost_usd` on the completed result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "metadata": {
    "invideo_cost_usd": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## Bach

Set the base URL to `https://platform-api.invideo.io/bach`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /bach/api/vdr/video/v2` · Model ID in `model_name`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/bach/api/vdr/video/v2' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "model_name": "gemini-omni-flash-12-preview-edit",
    "extra": {
      "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/bach/api/vdr/video/v2", headers=headers, json=json.loads("{\"model_name\":\"gemini-omni-flash-12-preview-edit\",\"extra\":{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/bach/api/vdr/video/v2", {
  method: "POST", headers, body: JSON.stringify({"model_name":"gemini-omni-flash-12-preview-edit","extra":{"prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

Returns a task. Read `GET /bach/api/vdr/video/v2/{id}` for the result.

`metadata.invideo_cost_usd` on the completed result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "metadata": {
    "invideo_cost_usd": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## Beeble

Set the base URL to `https://platform-api.invideo.io/beeble`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /beeble/v1/switchx/generations` · Model ID in `model`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/beeble/v1/switchx/generations' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "model": "gemini-omni-flash-12-preview-edit",
    "generation_type": "video",
    "extra": {
      "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/beeble/v1/switchx/generations", headers=headers, json=json.loads("{\"model\":\"gemini-omni-flash-12-preview-edit\",\"generation_type\":\"video\",\"extra\":{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/beeble/v1/switchx/generations", {
  method: "POST", headers, body: JSON.stringify({"model":"gemini-omni-flash-12-preview-edit","generation_type":"video","extra":{"prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

Returns a task. Read `GET /beeble/v1/switchx/generations/{id}` for the result.

`metadata.invideo_cost_usd` on the completed result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "metadata": {
    "invideo_cost_usd": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## BytePlus ModelArk

Set the base URL to `https://platform-api.invideo.io/byteplus/api/v3`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /byteplus/api/v3/contents/generations/tasks` · Model ID in `model`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/byteplus/api/v3/contents/generations/tasks' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "model": "gemini-omni-flash-12-preview-edit",
    "extra": {
      "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/byteplus/api/v3/contents/generations/tasks", headers=headers, json=json.loads("{\"model\":\"gemini-omni-flash-12-preview-edit\",\"extra\":{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/byteplus/api/v3/contents/generations/tasks", {
  method: "POST", headers, body: JSON.stringify({"model":"gemini-omni-flash-12-preview-edit","extra":{"prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

Returns a task. Read `GET /byteplus/api/v3/contents/generations/tasks/{id}` for the result. The completed task contains its `content.video_url`.

`usage.cost` on the completed result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "usage": {
    "cost": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## BytePlus Vision

Set the base URL to `https://platform-api.invideo.io/byteplusvision`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /byteplusvision?Action=CVSync2AsyncSubmitTask&Version=2024-06-06` · Model ID in `model`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/byteplusvision?Action=CVSync2AsyncSubmitTask&Version=2024-06-06' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "model": "gemini-omni-flash-12-preview-edit",
    "extra": {
      "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/byteplusvision?Action=CVSync2AsyncSubmitTask&Version=2024-06-06", headers=headers, json=json.loads("{\"model\":\"gemini-omni-flash-12-preview-edit\",\"extra\":{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/byteplusvision?Action=CVSync2AsyncSubmitTask&Version=2024-06-06", {
  method: "POST", headers, body: JSON.stringify({"model":"gemini-omni-flash-12-preview-edit","extra":{"prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

Returns a task ID. Poll CVSync2AsyncGetResult for the result.

`usage.invideo_cost_usd` on the result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "usage": {
    "invideo_cost_usd": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## Cleanvoice

Set the base URL to `https://platform-api.invideo.io/cleanvoice`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /cleanvoice/v2/edits` · Model ID in `model`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/cleanvoice/v2/edits' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "model": "gemini-omni-flash-12-preview-edit",
    "extra": {
      "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/cleanvoice/v2/edits", headers=headers, json=json.loads("{\"model\":\"gemini-omni-flash-12-preview-edit\",\"extra\":{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/cleanvoice/v2/edits", {
  method: "POST", headers, body: JSON.stringify({"model":"gemini-omni-flash-12-preview-edit","extra":{"prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

Returns a task. Read `GET /cleanvoice/v2/edits/{id}` for the result.

`metadata.invideo_cost_usd` on the completed result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "metadata": {
    "invideo_cost_usd": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## fal

Set the base URL to `https://platform-api.invideo.io/fal`. Use `Authorization: Key $INVIDEO_API_KEY` for authentication.

Endpoint `POST /fal/gemini-omni-flash-12-preview-edit` · Model ID in `URL model segment`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/fal/gemini-omni-flash-12-preview-edit' \
  -H "Authorization: Key $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
    "edit_video_url": "https://example.com/video.mp4"
  }'
```

### fal · JavaScript

```js
const response = await fetch("https://platform-api.invideo.io/fal/gemini-omni-flash-12-preview-edit", {
  method: "POST",
  redirect: "error",
  headers: {
    Authorization: `Key ${process.env.INVIDEO_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
  "edit_video_url": "https://example.com/video.mp4"
}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Key $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/fal/gemini-omni-flash-12-preview-edit", headers=headers, json=json.loads("{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"edit_video_url\":\"https://example.com/video.mp4\"}"), timeout=120)
response.raise_for_status()
print(response.text)
```

a queue request: read status_url until COMPLETED, then response_url for the result.

`usage.cost` on the completed result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "usage": {
    "cost": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## Gemini

Set the base URL to `https://platform-api.invideo.io`. Use `x-goog-api-key: $INVIDEO_API_KEY` for authentication.

Endpoint `POST /v1beta/models/gemini-omni-flash-12-preview-edit:predictLongRunning` · Model ID in `URL model segment`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/v1beta/models/gemini-omni-flash-12-preview-edit:predictLongRunning' \
  -H "x-goog-api-key: $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "instances": [
      {
        "prompt": "A blue paper pinwheel turns slowly in a gentle breeze."
      }
    ],
    "extra": {
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"x-goog-api-key\":\"$INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/v1beta/models/gemini-omni-flash-12-preview-edit:predictLongRunning", headers=headers, json=json.loads("{\"instances\":[{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\"}],\"extra\":{\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "x-goog-api-key": "$INVIDEO_API_KEY",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/v1beta/models/gemini-omni-flash-12-preview-edit:predictLongRunning", {
  method: "POST", headers, body: JSON.stringify({"instances":[{"prompt":"A blue paper pinwheel turns slowly in a gentle breeze."}],"extra":{"edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

an operation `name`; read it with GET /v1beta/{name} until `done`. The completed operation contains generated video samples inside `response`.

`usageMetadata.cost_usd` on the completed result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "usageMetadata": {
    "cost_usd": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## HeyGen

Set the base URL to `https://platform-api.invideo.io/heygen`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /heygen/v3/models/videos` · Model ID in `model`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/heygen/v3/models/videos' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "model": "gemini-omni-flash-12-preview-edit",
    "mode": "text-to-video",
    "extra": {
      "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/heygen/v3/models/videos", headers=headers, json=json.loads("{\"model\":\"gemini-omni-flash-12-preview-edit\",\"mode\":\"text-to-video\",\"extra\":{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/heygen/v3/models/videos", {
  method: "POST", headers, body: JSON.stringify({"model":"gemini-omni-flash-12-preview-edit","mode":"text-to-video","extra":{"prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

Returns a task. Read `GET /heygen/v3/models/videos/{id}` for the result.

`usage.invideo_cost_usd` on the result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "usage": {
    "invideo_cost_usd": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## Higgsfield

Set the base URL to `https://platform-api.invideo.io/higgsfield`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /higgsfield/v1/image2video/dop` · Model ID in `model`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/higgsfield/v1/image2video/dop' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "model": "gemini-omni-flash-12-preview-edit",
    "extra": {
      "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/higgsfield/v1/image2video/dop", headers=headers, json=json.loads("{\"model\":\"gemini-omni-flash-12-preview-edit\",\"extra\":{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/higgsfield/v1/image2video/dop", {
  method: "POST", headers, body: JSON.stringify({"model":"gemini-omni-flash-12-preview-edit","extra":{"prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

Returns a task. Read `GET /higgsfield/v1/job-sets/{id}` for the result. Read the job outputs in `jobs[].results.raw` after completion.

`metadata.invideo_cost_usd` on the completed result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "metadata": {
    "invideo_cost_usd": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## Kling

Set the base URL to `https://platform-api.invideo.io/kling`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /kling/v1/videos/text2video` · Model ID in `model_name`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/kling/v1/videos/text2video' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "model_name": "gemini-omni-flash-12-preview-edit",
    "extra": {
      "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/kling/v1/videos/text2video", headers=headers, json=json.loads("{\"model_name\":\"gemini-omni-flash-12-preview-edit\",\"extra\":{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/kling/v1/videos/text2video", {
  method: "POST", headers, body: JSON.stringify({"model_name":"gemini-omni-flash-12-preview-edit","extra":{"prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

Returns a task. Read `GET /kling/v1/videos/text2video/{id}` for the result. When `data.task_status` is `succeed`, read `data.task_result` for the media URLs.

`metadata.invideo_cost_usd` on the completed result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "data": {
    "task_status": "succeed",
    "task_result": {
      "videos": [
        {
          "url": "https://…/completed-output"
        }
      ]
    }
  },
  "metadata": {
    "invideo_cost_usd": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## LTX

Set the base URL to `https://platform-api.invideo.io/ltx`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /ltx/v2/text-to-video` · Model ID in `model`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/ltx/v2/text-to-video' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "model": "gemini-omni-flash-12-preview-edit",
    "extra": {
      "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/ltx/v2/text-to-video", headers=headers, json=json.loads("{\"model\":\"gemini-omni-flash-12-preview-edit\",\"extra\":{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/ltx/v2/text-to-video", {
  method: "POST", headers, body: JSON.stringify({"model":"gemini-omni-flash-12-preview-edit","extra":{"prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

Returns a task. Read `GET /ltx/v2/text-to-video/{id}` for the result.

`metadata.invideo_cost_usd` on the completed result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "metadata": {
    "invideo_cost_usd": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## Luma

Set the base URL to `https://platform-api.invideo.io/luma/dream-machine/v1`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /luma/dream-machine/v1/generations` · Model ID in `model`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/luma/dream-machine/v1/generations' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
    "model": "gemini-omni-flash-12-preview-edit",
    "extra": {
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/luma/dream-machine/v1/generations", headers=headers, json=json.loads("{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"model\":\"gemini-omni-flash-12-preview-edit\",\"extra\":{\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/luma/dream-machine/v1/generations", {
  method: "POST", headers, body: JSON.stringify({"prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","model":"gemini-omni-flash-12-preview-edit","extra":{"edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

a generation; read GET /luma/dream-machine/v1/generations/{id} until `completed`. The completed generation contains the file URL in `assets`.

`metadata.invideo_cost_usd` on the completed result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "state": "completed",
  "assets": {
    "video": "https://…/completed-output"
  },
  "metadata": {
    "invideo_cost_usd": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## MiniMax

Set the base URL to `https://platform-api.invideo.io/minimax`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /minimax/v1/video_generation` · Model ID in `model`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/minimax/v1/video_generation' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "model": "gemini-omni-flash-12-preview-edit",
    "extra": {
      "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/minimax/v1/video_generation", headers=headers, json=json.loads("{\"model\":\"gemini-omni-flash-12-preview-edit\",\"extra\":{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/minimax/v1/video_generation", {
  method: "POST", headers, body: JSON.stringify({"model":"gemini-omni-flash-12-preview-edit","extra":{"prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

Returns a task. Read `GET /minimax/v1/query/video_generation?task_id={id}` for the result.

`metadata.invideo_cost_usd` on the completed result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "metadata": {
    "invideo_cost_usd": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## PixVerse

Set the base URL to `https://platform-api.invideo.io/pixverse`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /pixverse/openapi/v2/video/text/generate` · Model ID in `model`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/pixverse/openapi/v2/video/text/generate' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "model": "gemini-omni-flash-12-preview-edit",
    "extra": {
      "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/pixverse/openapi/v2/video/text/generate", headers=headers, json=json.loads("{\"model\":\"gemini-omni-flash-12-preview-edit\",\"extra\":{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/pixverse/openapi/v2/video/text/generate", {
  method: "POST", headers, body: JSON.stringify({"model":"gemini-omni-flash-12-preview-edit","extra":{"prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

Returns a task. Read `GET /pixverse/openapi/v2/video/result/{id}` for the result.

`Resp.usage.invideo_cost_usd` on the result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "Resp": {
    "usage": {
      "invideo_cost_usd": "0.024",
      "invideo_cost": {
        "total_usd": "0.024",
        "lines": [
          {
            "item": "second",
            "quantity": "1",
            "unit_price_usd": "0.024",
            "amount_usd": "0.024"
          }
        ]
      }
    }
  }
}
```

## Pruna AI

Set the base URL to `https://platform-api.invideo.io/pruna`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /pruna/v1/predictions` · Model ID in `Model header`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/pruna/v1/predictions' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  -H 'model: gemini-omni-flash-12-preview-edit' \
  --data-binary '{
    "input": {},
    "extra": {
      "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\",\"model\":\"gemini-omni-flash-12-preview-edit\"}").items()}
response = requests.post("https://platform-api.invideo.io/pruna/v1/predictions", headers=headers, json=json.loads("{\"input\":{},\"extra\":{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json",
  "model": "gemini-omni-flash-12-preview-edit"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/pruna/v1/predictions", {
  method: "POST", headers, body: JSON.stringify({"input":{},"extra":{"prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

Returns a task. Read `GET /pruna/v1/predictions/status/{id}` for the result.

`metadata.invideo_cost_usd` on the completed result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "metadata": {
    "invideo_cost_usd": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## Replicate

Set the base URL to `https://platform-api.invideo.io/replicate`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /replicate/v1/models/invideo/gemini-omni-flash-12-preview-edit/predictions` · Model ID in `URL model segment`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/replicate/v1/models/invideo/gemini-omni-flash-12-preview-edit/predictions' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "input": {
      "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### Replicate client · Python

```python
import os, replicate

client = replicate.Client(api_token=os.environ["INVIDEO_API_KEY"], base_url="https://platform-api.invideo.io/replicate")
output = client.run("invideo/gemini-omni-flash-12-preview-edit", input={
    "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
    "edit_video_url": "https://example.com/video.mp4",
})
print(output)
```

### Replicate client · JavaScript

```js
import Replicate from "replicate";

const replicate = new Replicate({ auth: process.env.INVIDEO_API_KEY, baseUrl: "https://platform-api.invideo.io/replicate/v1" });
const output = await replicate.run("invideo/gemini-omni-flash-12-preview-edit", { input: {
  "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
  "edit_video_url": "https://example.com/video.mp4"
} });
console.log(output);
```

a prediction: read it with GET /replicate/v1/predictions/{id} until the run ends. Read `output` from the completed prediction. It holds a download URL or a list of URLs.

`metrics.cost_usd` on the completed prediction. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "status": "succeeded",
  "output": [
    "https://…/completed-output"
  ],
  "metrics": {
    "cost_usd": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## Runware

Set the base URL to `https://platform-api.invideo.io/runware/v1`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /runware/v1` · Model ID in `task.model`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/runware/v1' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '[
    {
      "taskType": "videoInference",
      "taskUUID": "'"$(uuidgen | tr '[:upper:]' '[:lower:]')"'",
      "model": "gemini-omni-flash-12-preview-edit",
      "deliveryMethod": "async",
      "extra": {
        "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
        "edit_video_url": "https://example.com/video.mp4"
      }
    }
  ]'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/runware/v1", headers=headers, json=json.loads("[{\"taskType\":\"videoInference\",\"taskUUID\":\"" + str(uuid4()) + "\",\"model\":\"gemini-omni-flash-12-preview-edit\",\"deliveryMethod\":\"async\",\"extra\":{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"edit_video_url\":\"https://example.com/video.mp4\"}}]"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/runware/v1", {
  method: "POST", headers, body: JSON.stringify([{"taskType":"videoInference","taskUUID":randomUUID(),"model":"gemini-omni-flash-12-preview-edit","deliveryMethod":"async","extra":{"prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","edit_video_url":"https://example.com/video.mp4"}}]),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

Returns a task UUID. Send getResponse using this UUID.

`data[].usage.invideo_cost_usd` on the result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "metadata": {
    "invideo_cost_usd": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## Runway

Set the base URL to `https://platform-api.invideo.io/runway`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /runway/v1/text_to_video` · Model ID in `model`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/runway/v1/text_to_video' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "X-Runway-Version: 2024-11-06" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "model": "gemini-omni-flash-12-preview-edit",
    "promptText": "A blue paper pinwheel turns slowly in a gentle breeze.",
    "extra": {
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### Runway SDK · Python

```python
import json
import os
import httpx
from runwayml import RunwayML

client = RunwayML(base_url="https://platform-api.invideo.io/runway", api_key=os.environ["INVIDEO_API_KEY"])
result = client.post(
    "/v1/text_to_video",
    cast_to=httpx.Response,
    body=json.loads("{\"model\":\"gemini-omni-flash-12-preview-edit\",\"promptText\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"extra\":{\"edit_video_url\":\"https://example.com/video.mp4\"}}"),
)
print(result.json())
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "X-Runway-Version": "2024-11-06",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/runway/v1/text_to_video", {
  method: "POST", headers, body: JSON.stringify({"model":"gemini-omni-flash-12-preview-edit","promptText":"A blue paper pinwheel turns slowly in a gentle breeze.","extra":{"edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

`{ id }`; read GET /runway/v1/tasks/{id} until SUCCEEDED, then `output`. Read the output URLs in `output[]` after the task succeeds.

`metadata.invideo_cost_usd` on the completed result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "status": "SUCCEEDED",
  "output": [
    "https://…/completed-output"
  ],
  "metadata": {
    "invideo_cost_usd": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## Tencent Wand

Set the base URL to `https://platform-api.invideo.io/tencent`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /tencent/v1/wand/vega-videos/tasks` · Model ID in `model`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/tencent/v1/wand/vega-videos/tasks' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "model": "gemini-omni-flash-12-preview-edit",
    "extra": {
      "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/tencent/v1/wand/vega-videos/tasks", headers=headers, json=json.loads("{\"model\":\"gemini-omni-flash-12-preview-edit\",\"extra\":{\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/tencent/v1/wand/vega-videos/tasks", {
  method: "POST", headers, body: JSON.stringify({"model":"gemini-omni-flash-12-preview-edit","extra":{"prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

Returns a task. Read `GET /tencent/v1/wand/vega-videos/tasks/{id}` for the result.

`usage.invideo_cost_usd` on the result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "usage": {
    "invideo_cost_usd": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## xAI

Set the base URL to `https://platform-api.invideo.io/xai`. Use `Authorization: Bearer $INVIDEO_API_KEY` for authentication.

Endpoint `POST /xai/v1/videos/generations` · Model ID in `model`.

### curl

```bash
curl -X POST 'https://platform-api.invideo.io/xai/v1/videos/generations' \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "model": "gemini-omni-flash-12-preview-edit",
    "prompt": "A blue paper pinwheel turns slowly in a gentle breeze.",
    "extra": {
      "edit_video_url": "https://example.com/video.mp4"
    }
  }'
```

### HTTP · Python

```python
import json
import os
from pathlib import Path
from uuid import uuid4

import requests

headers = {name: value.replace("$INVIDEO_API_KEY", os.environ["INVIDEO_API_KEY"])
           for name, value in json.loads("{\"Authorization\":\"Bearer $INVIDEO_API_KEY\",\"Content-Type\":\"application/json\"}").items()}
response = requests.post("https://platform-api.invideo.io/xai/v1/videos/generations", headers=headers, json=json.loads("{\"model\":\"gemini-omni-flash-12-preview-edit\",\"prompt\":\"A blue paper pinwheel turns slowly in a gentle breeze.\",\"extra\":{\"edit_video_url\":\"https://example.com/video.mp4\"}}"), timeout=120)
response.raise_for_status()
print(response.text)
```

### HTTP · JavaScript

```js
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";

const headers = Object.fromEntries(Object.entries({
  "Authorization": "Bearer $INVIDEO_API_KEY",
  "Content-Type": "application/json"
})
  .map(([name, value]) => [name, value.replace("$INVIDEO_API_KEY", process.env.INVIDEO_API_KEY)]));

const response = await fetch("https://platform-api.invideo.io/xai/v1/videos/generations", {
  method: "POST", headers, body: JSON.stringify({"model":"gemini-omni-flash-12-preview-edit","prompt":"A blue paper pinwheel turns slowly in a gentle breeze.","extra":{"edit_video_url":"https://example.com/video.mp4"}}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
```

`{ request_id }`; read GET /xai/v1/videos/{request_id} until `done`. The completed job contains the URL in `video.url`.

`usage.cost` on the completed result. The settled USD charge is also in `x-invideo-cost-usd` when known before headers are sent.

### Example response fields

```json
{
  "usage": {
    "cost": "0.024",
    "invideo_cost": {
      "total_usd": "0.024",
      "lines": [
        {
          "item": "second",
          "quantity": "1",
          "unit_price_usd": "0.024",
          "amount_usd": "0.024"
        }
      ]
    }
  }
}
```

## invideo API input

The keys of `input`. An unknown key is refused. A file is an `https` URL or a data URI. Inline (data URI) up to 64 MB per request; larger files: an `https` URL or an upload, video up to 300 MB.

| Key | Type | Required | Default | Allowed | Description |
| --- | --- | --- | --- | --- | --- |
| `prompt` | string | yes | - | up to 5,000 characters | Prompt |
| `edit_video_url` | string (URL or data URI) | yes | - | MP4, MOV or WebM; at most 15.49 seconds | Video to edit |
| `reference_image_urls` | array of strings (URLs or data URIs) | no | `[]` | up to 5 files; PNG, JPEG or WebP | Reference images |

## Output

### Submit answers

```json
{
  "id": "0f8b6c1e-0000-0000-0000-000000000000",
  "status": "queued"
}
```

### A finished request

```json
{
  "id": "0f8b6c1e-0000-0000-0000-000000000000",
  "model": "gemini-omni-flash-12-preview-edit",
  "mode": "edit",
  "status": "succeeded",
  "created_at": "2026-01-01T10:00:00Z",
  "started_at": "2026-01-01T10:00:02Z",
  "finished_at": "2026-01-01T10:01:00Z",
  "output": {
    "kind": "video",
    "files": [
      {
        "url": "https://… (valid for 1 hour)",
        "content_type": "video/mp4",
        "size_bytes": 1048576,
        "width": 1280,
        "height": 720,
        "duration": 5
      }
    ]
  },
  "error": null,
  "cost_usd": "0.25"
}
```

`status` is `preparing`, `queued`, `running`, `succeeded`, or `failed` (a request that did not start within 15 minutes fails with `queue_timeout`). `output` and `cost_usd` are `null` until it succeeds. Each file link is signed again on every read and works for 1 hour. A failed run is still a `200`: `error` holds `{type, code, message, retryable}`, and `type` is `content`, `model`, `input` or `server`.

## Request and response logs

Request and response logs, as JSON; files are fresh 1-hour links. `GET https://platform-api.invideo.io/v1/request/{id}/logs/request` gives what was sent, `GET https://platform-api.invideo.io/v1/request/{id}/logs/response` what came back. The key reads only its own workspace's requests. A log that is no longer available answers `410 log_expired`. `GET https://platform-api.invideo.io/v1/request/{id}` gives the log links without checking them.

### Read the response log (curl)

```bash
curl "https://platform-api.invideo.io/v1/request/$ID/logs/response" \
  -H "Authorization: Bearer $INVIDEO_API_KEY"
```

### A response log

```json
{
  "id": "01a21889-e91b-7aba-a0d6-7b2cc4510be7",
  "model": "<model-id>",
  "mode": "generate",
  "created_at": "2026-11-26T15:47:01.022556Z",
  "finished_at": "2026-11-26T15:47:09.350578Z",
  "cost_usd": "0.193248",
  "error": null,
  "output": {
    "files": [
      {
        "name": "1.mp3",
        "url": "https://…/1.mp3?X-Amz-Expires=3600&…",
        "download_url": "https://…/1.mp3?response-content-disposition=attachment…",
        "content_type": "audio/mpeg",
        "size_bytes": 1440620,
        "duration": 60.024,
        "width": null,
        "height": null
      }
    ]
  }
}
```

## Errors

A refused call answers with `{error}`, most with a `message` too; `invalid_input` has `detail` instead.

| HTTP | error | When |
| --- | --- | --- |
| 400 | - | The body is not valid JSON. |
| 401 | `unauthorized` | The API key is missing, invalid, disabled or expired. |
| 404 | `model_not_found` | No such model or mode, or it is not on for this workspace. |
| 404 | `not_found` | No request with this id (on a read). |
| 413 | - | The body is over 64 MB. Send larger files as an `https` URL or an upload. |
| 422 | `invalid_input` | `detail` lists each problem as `{loc, msg, type}`; `loc` ends with the field's name. |
| 422 | `model_not_priced` | These options have no price yet, so they cannot run. |
| 429 | `rate_limited` | Over the workspace's requests per minute (all its keys and the playground together; 300 by default, see Limits) or 3000 reads a minute. Wait `Retry-After` seconds. |
| 429 | `spend_limit_exceeded` | The spend limit of the workspace is used up. |
| 500 | `server_error` | Something went wrong on our end. Please try again. |

## Price

From $0.023172 / second.

| Mode and options | Unit rate (USD) |
| --- | --- |
| Edit · Resolution: 360p | $0.023172 / second |
| Edit · Resolution: 720p | $0.069504 / second |
| Edit · Resolution: 1080p | $0.104256 / second |
| Edit · Resolution: 4k | $0.208512 / second |
