Async-first Python SDK for Lamina video generation.
Project description
lamina-sdk
Async-first Python SDK for Lamina video generation.
Install
pip install lamina-sdk
Python 3.11 or newer is required.
Quick Start
from lamina import simi
async with simi(api_key="lamina_live_your_key") as client:
video = await client.generate("A blue sphere moving across white background", duration=10)
await video.save("out.mp4")
You can also set LAMINA_API_KEY and call simi() with no arguments. The SDK
defaults to https://api.laminalabs.ai; override base_url=... only for local
development or staging.
Submit And Stream Events
from lamina import simi
async with simi(api_key="lamina_live_your_key") as client:
job = await client.submit_async("A blue sphere moving across white background", duration=10)
async for event in client.stream_events(job):
print(event.type)
Callback Style
from lamina import simi
async with simi(api_key="lamina_live_your_key") as lamina:
job = await lamina.submit_async("A narrated lesson about derivatives")
job.onstream(lambda event: print(event.type))
job.oncompletion(lambda video: print(f"Ready: {video.job_id}"))
await job.wait()
Public API
job = lamina.submit(prompt, *, duration=20)job = await lamina.submit_async(prompt, *, duration=20)video = await lamina.generate(prompt, *, duration=20)await lamina.save(job, path)await lamina.aclose()orasync with simi()api_keyis required insimi(...)unlessLAMINA_API_KEYis set.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lamina_sdk-0.1.4.tar.gz.
File metadata
- Download URL: lamina_sdk-0.1.4.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a79ea81a619fc660a610c146939973ab4c9e46747a0d3f834b42cb6327969a8
|
|
| MD5 |
6145331db529366ea0c1bab586156bcd
|
|
| BLAKE2b-256 |
9c9243f141b660d68e326ee2f45b02c80a0b327420fb26311419c28c433432a3
|
File details
Details for the file lamina_sdk-0.1.4-py3-none-any.whl.
File metadata
- Download URL: lamina_sdk-0.1.4-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a19a121d1cf747ddbca21195022b0625b516ec0d1b393a8067afa7bd3be41855
|
|
| MD5 |
21e3e43bcad1927e07d4ceded0d6511d
|
|
| BLAKE2b-256 |
fd55434647a3b6b4cfb8a631263a219fc68c47ecc7ebf992df543e0e5b2a4e9a
|