pub struct VideoGenRequest<N>{
pub key: String,
/* private fields */
}Expand description
Video generation request structure Handles HTTP requests for video generation API
Fields§
§key: StringAPI key for authentication
Implementations§
Source§impl<N> VideoGenRequest<N>
impl<N> VideoGenRequest<N>
Sourcepub fn new(model: N, key: String) -> Self
pub fn new(model: N, key: String) -> Self
Create a new video generation request
§Arguments
model- Video generation model implementing VideoGen traitbody- Video generation parameters and configurationkey- API key for authentication
pub fn with_base_url(self, base: impl Into<String>) -> Self
pub fn with_endpoint_config(self, endpoint_config: EndpointConfig) -> Self
pub fn with_http_config(self, config: HttpClientConfig) -> Self
Sourcepub fn with_prompt(self, prompt: impl Into<String>) -> Self
pub fn with_prompt(self, prompt: impl Into<String>) -> Self
Set the prompt for video generation
Sourcepub fn with_quality(self, quality: VideoQuality) -> Self
pub fn with_quality(self, quality: VideoQuality) -> Self
Set the quality mode (speed or quality)
Sourcepub fn with_audio(self, with_audio: bool) -> Self
pub fn with_audio(self, with_audio: bool) -> Self
Enable/disable audio generation
Sourcepub fn with_watermark_enabled(self, watermark_enabled: bool) -> Self
pub fn with_watermark_enabled(self, watermark_enabled: bool) -> Self
Enable/disable watermark
Sourcepub fn with_image_url(self, image_url: ImageUrl) -> Self
pub fn with_image_url(self, image_url: ImageUrl) -> Self
Set image URL(s) for video generation
Sourcepub fn with_duration(self, duration: VideoDuration) -> Self
pub fn with_duration(self, duration: VideoDuration) -> Self
Set video duration (5 or 10 seconds)
Sourcepub fn with_request_id(self, request_id: String) -> Self
pub fn with_request_id(self, request_id: String) -> Self
Set custom request ID
Sourcepub fn with_user_id(self, user_id: String) -> Self
pub fn with_user_id(self, user_id: String) -> Self
Set user ID for policy enforcement
Trait Implementations§
Source§impl<N> HttpClient for VideoGenRequest<N>
impl<N> HttpClient for VideoGenRequest<N>
type Body = VideoBody<N>
Source§fn http_config(&self) -> Arc<HttpClientConfig> ⓘ
fn http_config(&self) -> Arc<HttpClientConfig> ⓘ
Get HTTP client configuration for this request Read more
Source§fn post(&self) -> impl Future<Output = ZaiResult<Response>> + Send
fn post(&self) -> impl Future<Output = ZaiResult<Response>> + Send
Sends a POST request to the API endpoint. Read more
Source§fn get(&self) -> impl Future<Output = ZaiResult<Response>> + Send
fn get(&self) -> impl Future<Output = ZaiResult<Response>> + Send
Sends a GET request to the API endpoint. Read more
Auto Trait Implementations§
impl<N> Freeze for VideoGenRequest<N>where
N: Freeze,
impl<N> RefUnwindSafe for VideoGenRequest<N>where
N: RefUnwindSafe,
impl<N> Send for VideoGenRequest<N>where
N: Send,
impl<N> Sync for VideoGenRequest<N>where
N: Sync,
impl<N> Unpin for VideoGenRequest<N>where
N: Unpin,
impl<N> UnsafeUnpin for VideoGenRequest<N>where
N: UnsafeUnpin,
impl<N> UnwindSafe for VideoGenRequest<N>where
N: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more