# API examples The Space exposes the `generate` function through Gradio's built-in API. Use the API page shown in the Space UI to copy the exact client snippet for the deployed Gradio version. Python client pattern: ```python import gradio as gr client = gr.Client("YOUR_USERNAME/PocketSora") result = client.predict( "A white cat running through a neon city", "Text-to-Video", None, "16:9", 49, 30, 4, 42, api_name="/generate", ) print(result) ``` For image-to-video, provide a local image path in place of `None`.