Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

docs(openai/videos.md): document proxy usage on openai docs for video gen

Krrish Dholakia9059905d25e9
diff --git a/docs/my-website/docs/providers/openai/videos.md b/docs/my-website/docs/providers/openai/videos.md
index 06d0934b180..72eb3f43a02 100644
--- a/docs/my-website/docs/providers/openai/videos.md
+++ b/docs/my-website/docs/providers/openai/videos.md
@@ -44,6 +44,113 @@ with open("generated_video.mp4", "wb") as f:
f.write(video_bytes)
```
+## **LiteLLM Proxy Usage**
+
+LiteLLM provides OpenAI API compatible video endpoints for complete video generation workflow:
+
+- `/videos/generations` - Generate new videos
+- `/videos/remix` - Edit existing videos with reference images
+- `/videos/status` - Check video generation status
+- `/videos/retrieval` - Download completed videos
+
+**Setup**
+
+Add this to your litellm proxy config.yaml
+
+```yaml
+model_list:
+ - model_name: sora-2
+ litellm_params:
+ model: openai/sora-2
+ api_key: os.environ/OPENAI_API_KEY
+```
+
+Start litellm
+
+```bash
+litellm --config /path/to/config.yaml
+
+# RUNNING on http://0.0.0.0:4000
+```
+
+Test video generation request
+
+```bash
+curl --location 'http://localhost:4000/v1/videos' \
+--header 'Content-Type: application/json' \
+--header 'x-litellm-api-key: sk-1234' \
+--data '{
+ "model": "sora-2",
+ "prompt": "A beautiful sunset over the ocean"
+}'
+```
+
+Test video status request
+
+```bash
+# Using custom-llm-provider header
+curl --location 'http://localhost:4000/v1/videos/video_id' \
+--header 'Accept: application/json' \
+--header 'x-litellm-api-key: sk-1234' \
+--header 'custom-llm-provider: openai'
+```
+
+Test video retrieval request
+
+```bash
+# Using custom-llm-provider header
+curl --location 'http://localhost:4000/v1/videos/video_id/content' \
+--header 'Accept: application/json' \
+--header 'x-litellm-api-key: sk-1234' \
+--header 'custom-llm-provider: openai' \
+--output video.mp4
+
+# Or using query parameter
+curl --location 'http://localhost:4000/v1/videos/video_id/content?custom_llm_provider=openai' \
+--header 'Accept: application/json' \
+--header 'x-litellm-api-key: sk-1234' \
+--output video.mp4
+```
+
+Test video remix request
+
+```bash
+# Using custom_llm_provider in request body
+curl --location --request POST 'http://localhost:4000/v1/videos/video_id/remix' \
+--header 'Accept: application/json' \
+--header 'Content-Type: application/json' \
+--header 'x-litellm-api-key: sk-1234' \
+--data '{
+ "prompt": "New remix instructions",
+ "custom_llm_provider": "openai"
+}'
+
+# Or using custom-llm-provider header
+curl --location --request POST 'http://localhost:4000/v1/videos/video_id/remix' \
+--header 'Accept: application/json' \
+--header 'Content-Type: application/json' \
+--header 'x-litellm-api-key: sk-1234' \
+--header 'custom-llm-provider: openai' \
+--data '{
+ "prompt": "New remix instructions"
+}'
+```
+
+Test OpenAI video generation request
+
+```bash
+curl http://localhost:4000/v1/videos \
+ -H "Authorization: Bearer sk-1234" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "model": "sora-2",
+ "prompt": "A cat playing with a ball of yarn in a sunny garden",
+ "seconds": "8",
+ "size": "720x1280"
+ }'
+```
+
+
## Supported Models
| Model Name | Description | Max Duration | Supported Sizes |
@@ -112,6 +219,7 @@ video_file = generate_and_download_video(
)
```
+
## Video Editing with Reference Images
```python