Skip to content
Docs menu

SDK reference

Every argument of every function, in Python, TypeScript and Rust.

The three SDKs have the same shape and the same limits. Names differ only by language convention: Python and Rust use snake_case methods, TypeScript uses camelCase for SDK-only options and the API's own names (session_id, guidance_scale) for API fields. The README published with each SDK lists the same tables with more examples.

The client

Catalyst(api_key=None, *, client_id=None, base_url=None, timeout=None, max_retries=2, default_headers=None, http_client=None)
catalyst.session_id            # read or assign the default session
catalyst.update_session_id(id) # make id the default session, checked; returns it (also update_sessionId)
catalyst.client_id             # the default tool-set name, "sdk"
catalyst.new_session()
catalyst.copy(**overrides)
SettingDefaultWhat it does
api keyFALCORE_API_KEYfal_live_... or fal_test_.... A missing key fails at construction.
base URLhttps://api.falcorelabs.comStaging and self-hosting only. A trailing /v1 is accepted.
timeout30 s reads, 10 min generationOne timeout for every call; overridable per call.
max retries20 turns retries off.
default headersnoneSent on every request.
HTTP client / fetchthe defaultYour own for proxies, certificates or tests.

wave.generate

catalyst.wave.generate(prompt=None, *, model="wave-apex-v1", steps=None, guidance_scale=None, duration=None,
                       prompts=None, session_id=None, stream=False, async_=False, webhook_url=None,
                       webhook_secret=None, metadata=None, idempotency_key=None, timeout=None, extra_headers=None)
OptionLimitsNotes
prompt1 to 8000 charactersOne of prompt or prompts, not both.
prompts1 to 50 itemsOne file per prompt, in order.
modelwave-apex-v1wave-apex-1 and wave-apex are mapped to it.
stepsinteger, 10 to 50
guidance_scale1 to 10
durationabove 0, at most 300 seconds
session_id[A-Za-z0-9][A-Za-z0-9._:-]{0,159}Default: the client's session.
stream / async / webhookstream and async cannot be combined; a webhook needs asyncReturn a stream, or a Job.
webhook secret16 to 256 charactersSigns the delivery.
metadataJSON objectKept with the request.
idempotency keygeneratedReused across retries.
timeout10 minPer call.

composer.compose

catalyst.composer.compose(prompt, *, model="composer-omni-2.5", effort=None, duration=None, session_id=None,
                          stream=False, async_=False, webhook_url=None, webhook_secret=None, metadata=None,
                          idempotency_key=None, timeout=None, extra_headers=None)
OptionLimitsNotes
prompt1 to 8000 characters, required
modelcomposer-omni-2.5, composer-omni-2.0, wave-composer-omni-v1, wave-composer-pulse-v1composer-omni-2.0 is served by 2.5.
effortlow, medium (mid mapped)
durationabove 0, at most 300 seconds
session_id, stream, async, webhook, metadata, idempotency key, timeoutas in wave.generate

chat.create

catalyst.chat.create(message=None, *, video_id=None, session_id=None, plan_markdown=None, client_id=None, tools=False,
                     client_tool_result=None, editor_context=None, stream=False, async_=False, webhook_url=None,
                     webhook_secret=None, metadata=None, idempotency_key=None, timeout=None, extra_headers=None)
catalyst.chat.stream(message, **same_options)

tools=True (tools: true, .tools(true)) lets the agent use the tools registered for this session under the client's default name; client_id="name" picks a named set. In both cases the SDK sends <client>:<session>, so only this session's tools are visible. See Client tools.

tools

catalyst.tools.register(tools, *, client_id=None, session_id=None, mode="upsert", strict=True)   # -> ToolRegistration
catalyst.tools.list(*, client_id=None, session_id=None, all=False)                               # -> list[RegisteredTool]
catalyst.tools.delete(names, *, client_id=None, session_id=None)                                 # -> ToolRegistration
catalyst.tools.scope_id(client_id=None, session_id=None)                                         # -> "client:session"
Tool(name, description="", params=None, input_schema=None)      Param(name, type="string", description="", required=False, enum=None, items=None, default=None)
ClientToolRunner(catalyst, client_id)   .add(tool, fn)   @runner.tool(name, description=, input_schema=)   .register(session_id=None)   .run(session_id=None, message=None, ...)

The raw, session-less call stays available: client.tools.register(client_id, [dicts], mode=...) (Python and TypeScript, also through catalyst.tools.register("id", [...])) and catalyst.falcore().tools().register(client_id, defs, mode) in Rust. Every parameter, default and error is in Client tools reference.

download, url, download_all

catalyst.download(target=None, dest=None, *, file_id=None, session_id=None, format=None, to_bytes=False, overwrite=True,
                  expires_in=None, expiry_date=None, disposition=None, on_progress=None, timeout=None)  # Path | bytes
catalyst.url(target=None, *, file_id=None, session_id=None, format=None, expires_in=None, expiry_date=None, disposition=None, timeout=None)
catalyst.download_all(generation, dest=".", *, stems=True, format=None, stem_format=None, overwrite=True, **download_options)  # {name: Path}
OptionDefaultNotes
targetrequiredA file, a Generation (its main file), a file id, or file id plus session.
destcurrent folderFile path: used exactly. Folder: <file_id>.<format>. Written via .part.
formatmp3mp3 wav flac ogg mid midi mp4. Leading dot and capitals tolerated. A video keeps its own format.
session_idthe file's ownRequired for a bare file id the SDK has not returned. Never guessed.
to bytesnoReturn the bytes, write nothing.
overwriteyesfalse refuses to replace an existing file.
expires_in30 daysSeconds, above 0, at most one year.
expiry_datenoneISO 8601 or epoch seconds, instead of expires_in.
dispositionattachmentattachment or inline.
progressnoneCallback with bytes done and total (total 0 if unknown).
stems (download_all)yesInclude the stems.
stem format (download_all)midmp3 or wav for rendered stems.

upload

catalyst.upload(file, *, session_id=None, filename=None, content_type="video/mp4", auto_delete_days=None,
                on_progress=None, multipart=None, concurrency=3, timeout=None)

Up to about 90 MB goes in one request; bigger files go up in resumable 16 MiB parts (concurrency at a time), each verified by SHA-256. The result's data.video_id is what chat takes.

What you get back

MemberMeaning
request_idreq_.... Quote it to support.
session_id, status, data, files, usageThe server's answer. status is completed, needs_input, queued, running, failed or cancelled.
fileThe main file: a composition's master, otherwise the first file.
master, stems, stem(role)For music: the finished track, the instrument parts, one part by name.
track_id(id)The file behind a timeline track id (trk_...). One free call to read the timeline.
file fieldsfile_id, kind (audio, stem, video), role, format, duration, size_bytes, plumes, expires_at, session_id.

Everything else on the client

CallPurpose
usage.get()Balance, this month's use, limits and prices. Free.
sessions.fetch(session) / sessions.timeline(session)A session's contents; the timeline with stable trk_ / chk_ ids.
assets.regenerate(session, track_id, ...)Redo one sound. mode: improve_prompt, vary_params, custom_prompt.
tools.register(client_id, tools, mode)Tell the agent which editor tools you can run.
requests.get / list / cancel / eventsFollow any request.
tokens.create(ttl_seconds, scopes, origin)A 30 to 600 second token for a browser. Create it on your server.
webhooks.set(url) / get() / delete()The account-wide webhook.
realtime.connect(session)WebSocket chat.
sound_design.score_video(...)Upload, plan, approve, generate and download in one call.
Wave, ComposerClients for only sound or only music (Rust: WaveClient, ComposerClient).
CatalystMCPMCP setup text, tool list and tool calls (Rust: CatalystMcp).

Checks that run before a request

The SDKs check the API's own limits first, so a typo is a clear local error with the field named and nothing is sent or charged: prompt length, prompts count, model, effort, steps, guidance scale, duration, session and file id format, download format, expires_in and disposition.