client.assets.list(...)
-
-
-
List all assets in your organization's media library.
-
-
-
from sync import Sync client = Sync( api_key="YOUR_API_KEY", ) client.assets.list( limit=10, sort_by="dateDesc", )
-
-
-
project_id:
typing.Optional[str]β Filter assets by project ID.
-
limit:
typing.Optional[int]β Maximum number of assets to return (1-100).
-
cursor:
typing.Optional[str]β Cursor for pagination.
-
search_query:
typing.Optional[str]β Search assets by name.
-
sort_by:
typing.Optional[AssetSort]β Sort order for the results.
-
types:
typing.Optional[typing.Sequence[AssetType]]β Filter by asset types. Accepts multiple types as a comma-separated list (AUDIO, VIDEO, IMAGE).
-
request_options:
typing.Optional[RequestOptions]β Request-specific configuration.
-
-
client.assets.get(...)
-
-
-
Retrieve a specific asset by ID.
-
-
-
from sync import Sync client = Sync( api_key="YOUR_API_KEY", ) client.assets.get( id="550e8400-e29b-41d4-a716-446655440000", )
-
-
-
id:
AssetId
-
request_options:
typing.Optional[RequestOptions]β Request-specific configuration.
-
-
client.batch.create(...)
-
-
-
API for Batch Processing. Available only for
ScaleandEnterpriseplans.
-
-
-
from sync import Sync client = Sync( api_key="YOUR_API_KEY", ) client.batch.create( dry_run=True, )
-
-
-
input: `from future import annotations
core.File` β See core.File for more documentation
-
webhook_url:
typing.Optional[str]β Optional webhook URL to receive batch completion notifications. A POST request will be sent when the batch completes or fails.
-
dry_run:
typing.Optional[bool]β When true, validates the input file without processing. Returns validation status without creating generations.
-
request_options:
typing.Optional[RequestOptions]β Request-specific configuration.
-
-
client.batch.get(...)
-
-
-
Retrieve details about a specific batch, including its current status, processing metrics, and output file URL when available.
-
-
-
from sync import Sync client = Sync( api_key="YOUR_API_KEY", ) client.batch.get( id="batch_abc123", )
-
-
-
id:
BatchIdβ The unique identifier of the batch
-
request_options:
typing.Optional[RequestOptions]β Request-specific configuration.
-
-
client.batch.list(...)
-
-
-
List all batches for your organization with optional filtering by status and creation date. Results are ordered by creation date (newest first).
-
-
-
from sync import Sync client = Sync( api_key="YOUR_API_KEY", ) client.batch.list()
-
-
-
status:
typing.Optional[BatchStatus]β Filter batches by status
-
created_after:
typing.Optional[dt.datetime]β Filter batches created after this datetime (ISO 8601 format)
-
created_before:
typing.Optional[dt.datetime]β Filter batches created before this datetime (ISO 8601 format)
-
request_options:
typing.Optional[RequestOptions]β Request-specific configuration.
-
-
client.generations.create(...)
-
-
-
from sync import Sync from sync.common import Audio, GenerationOptions, Video client = Sync( api_key="YOUR_API_KEY", ) client.generations.create( input=[ Video( url="https://assets.sync.so/docs/example-video.mp4", ), Audio( url="https://assets.sync.so/docs/example-audio.wav", ), ], model="lipsync-2", options=GenerationOptions( sync_mode="loop", ), )
-
-
-
model:
Modelβ name of the model to use for generation.
-
input:
typing.Sequence[Input]β Array of input objects. Must include one video input item and at least one audio input item. Audio input items can be provided as either: recorded/captured audio url or a text-to-speech input with tts provider configuration. When using segments, multiple audio inputs can be provided with unique refId values.
-
options:
typing.Optional[GenerationOptions]β additional options available for generation.
-
segments:
typing.Optional[typing.Sequence[GenerationSegment]]β segments definition list. When provided, allows defining one or more video segments with different audio inputs for each segment. Each segment specifies a time range and references an audio input by refId.
-
webhook_url:
typing.Optional[str]β webhook url for generation status updates. once the generation completes we will send a POST request to the webhook url with the generation data.
-
output_file_name:
typing.Optional[str]β Base filename for the generated output without extension. The .mp4 extension will be added automatically. Only alphanumeric characters, underscores, and hyphens are allowed, up to 255 characters.
-
request_options:
typing.Optional[RequestOptions]β Request-specific configuration.
-
-
client.generations.create_with_files(...)
-
-
-
from sync import Sync client = Sync( api_key="YOUR_API_KEY", ) client.generations.create_with_files( model="lipsync-2", )
-
-
-
model:
Model
-
video: `from future import annotations
typing.Optional[core.File]` β See core.File for more documentation
-
audio: `from future import annotations
typing.Optional[core.File]` β See core.File for more documentation
-
input:
typing.Optional[typing.List[Input]]β Array of input objects. Can be used to provide urls for larger files. Each input should either have a file or a url. Audio input items can be provided as either: recorded/captured audio url or a text-to-speech input with tts provider configuration.
-
options:
typing.Optional[GenerationOptions]
-
webhook_url:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]β Request-specific configuration.
-
-
client.generations.get(...)
-
-
-
from sync import Sync client = Sync( api_key="YOUR_API_KEY", ) client.generations.get( id="6533643b-aceb-4c40-967e-d9ba9baac39e", )
-
-
-
id:
GenerationId
-
request_options:
typing.Optional[RequestOptions]β Request-specific configuration.
-
-
client.generations.list(...)
-
-
-
from sync import Sync client = Sync( api_key="YOUR_API_KEY", ) client.generations.list()
-
-
-
status:
typing.Optional[typing.Sequence[GenerationStatus]]β Filter generations by status. Accepts multiple statuses as a comma-separated list.
-
ids:
typing.Optional[typing.Sequence[str]]β Filter generations by ID. Accepts multiple IDs as a comma-separated list.
-
request_options:
typing.Optional[RequestOptions]β Request-specific configuration.
-
-
client.generations.estimate_cost(...)
-
-
-
from sync import Sync from sync.common import Audio, GenerationOptions, Video client = Sync( api_key="YOUR_API_KEY", ) client.generations.estimate_cost( input=[ Video( url="https://assets.sync.so/docs/example-video.mp4", ), Audio( url="https://assets.sync.so/docs/example-audio.wav", ), ], model="lipsync-2", options=GenerationOptions( sync_mode="loop", ), )
-
-
-
model:
Modelβ name of the model to use for generation.
-
input:
typing.Sequence[Input]β Array of input objects. Must include one video input item and at least one audio input item. Audio input items can be provided as either: recorded/captured audio url or a text-to-speech input with tts provider configuration. When using segments, multiple audio inputs can be provided with unique refId values.
-
options:
typing.Optional[GenerationOptions]β additional options available for generation.
-
segments:
typing.Optional[typing.Sequence[GenerationSegment]]β segments definition list. When provided, allows defining one or more video segments with different audio inputs for each segment. Each segment specifies a time range and references an audio input by refId.
-
webhook_url:
typing.Optional[str]β webhook url for generation status updates. once the generation completes we will send a POST request to the webhook url with the generation data.
-
output_file_name:
typing.Optional[str]β Base filename for the generated output without extension. The .mp4 extension will be added automatically. Only alphanumeric characters, underscores, and hyphens are allowed, up to 255 characters.
-
request_options:
typing.Optional[RequestOptions]β Request-specific configuration.
-
-
client.models.list()
-
-
-
List all available models for the authenticated user. Returns active (non-deprecated) models the user has access to, including any feature-flagged models enabled for their account.
-
-
-
from sync import Sync client = Sync( api_key="YOUR_API_KEY", ) client.models.list()
-
-
-
request_options:
typing.Optional[RequestOptions]β Request-specific configuration.
-
-