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

# Video generation

> Create and manage async video jobs with the C# SDK.

**Methods**:

* `client.CreateVideo(...)`
* `client.ListVideos(...)`
* `client.GetVideo(...)`
* `client.RetrieveVideoContent(...)`
* `client.GetVideoDownloadUrl(...)`
* `client.CancelVideo(...)`
* `client.DeleteVideo(...)`
* `client.ListVideoModels(...)`
* `client.GetAsyncJobWebSocketUrl(...)`
* `client.GetVideoWebSocketUrl(...)`
* `client.AsyncJobs.WebSocketUrl(...)`

### Example

```csharp theme={null}
using AiStatsSdk;

var client = new AIStats(apiKey);

var response = await client.CreateVideo(new Dictionary<string, object>
{
    ["model"] = "openai/sora-2",
    ["prompt"] = "A calm ocean at dusk",
});

var jobs = await client.ListVideos(new Dictionary<string, string>
{
    ["status"] = "queued,completed",
    ["limit"] = "2"
});

var websocketUrl = client.GetVideoWebSocketUrl((string)response!["id"], intervalMs: 1500);
```

The create response is an async job object. Poll status and then use content or signed download endpoints when the job is complete.

Use `client.GetVideoWebSocketUrl(...)` when you want to subscribe to the documented `/v1/async/video/{id}/ws` lifecycle stream instead of polling only.
Use `client.AsyncJobs.WebSocketUrl("video", videoId, ...)` when you want the generic async-jobs resource helper.
Use `client.GetAsyncJobWebSocketUrl("video", videoId, ...)` when you want the same generic helper without going through the resource object.

`CancelVideo(...)` is exposed, but the public video cancel route currently returns a structured `501 not_implemented_yet` error while provider-level cancellation is standardized.
