> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/video-operations.md).

# Video operations

Use this operation to generate a video in OpenAI. Refer to [OpenAI](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai.md) for more information on the OpenAI node itself.

## Generate Video <a href="#generate-video" id="generate-video"></a>

Use this operation to generate a video from a text prompt.

Enter these parameters:

* **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai.md).
* **Resource**: Select **Video**.
* **Operation**: Select **Generate Video**.
* **Model**: Select the model you want to use to generate a video. Currently supports `sora-2` and `sora-2-pro`.
* **Prompt**: The prompt to generate a video from.
* **Seconds**: Clip duration in seconds (up to 25).
* **Size**: Output resolution formatted as width x height. 1024x1792 and 1792x1024 are only supported by Sora 2 Pro.

### Options <a href="#options" id="options"></a>

* **Reference**: Optional image reference that guides generation. Has to be passed in as a binary item.
* **Wait Timeout**: Time to wait for the video to be generated in seconds. Defaults to 300.
* **Output Field Name**: The name of the output field to put the binary file data in. Defaults to `data`.

Refer to [Video Generation | OpenAI](https://platform.openai.com/docs/guides/video-generation) for more information.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/video-operations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
