Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async def main():
async with DecartClient(api_key=os.getenv("DECART_API_KEY")) as client:
# Edit an image
result = await client.process({
"model": models.image("lucy-pro-i2i"),
"model": models.image("lucy-image-2"),
"prompt": "Apply a painterly oil-on-canvas look while preserving the composition",
"data": open("input.png", "rb"),
})
Expand All @@ -53,7 +53,7 @@ For video editing jobs, use the queue API to submit jobs and poll for results:
async with DecartClient(api_key=os.getenv("DECART_API_KEY")) as client:
# Submit and poll automatically
result = await client.queue.submit_and_poll({
"model": models.video("lucy-pro-v2v"),
"model": models.video("lucy-clip"),
"prompt": "Restyle this footage with anime shading and vibrant neon highlights",
"data": open("input.mp4", "rb"),
"on_status_change": lambda job: print(f"Status: {job.status}"),
Expand All @@ -72,7 +72,7 @@ Or manage the polling manually:
async with DecartClient(api_key=os.getenv("DECART_API_KEY")) as client:
# Submit the job
job = await client.queue.submit({
"model": models.video("lucy-pro-v2v"),
"model": models.video("lucy-clip"),
"prompt": "Add cinematic teal-and-orange grading and gentle film grain",
"data": open("input.mp4", "rb"),
})
Expand Down
6 changes: 3 additions & 3 deletions decart/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ class DecartClient:

# Image editing (sync) - use process()
image = await client.process({
"model": models.image("lucy-pro-i2i"),
"model": models.image("lucy-image-2"),
"prompt": "Apply a painterly oil-on-canvas look while preserving the composition",
"data": open("input.png", "rb"),
})

# Video editing (async) - use queue
result = await client.queue.submit_and_poll({
"model": models.video("lucy-pro-v2v"),
"model": models.video("lucy-clip"),
"prompt": "Restyle this footage with anime shading and vibrant neon highlights",
"data": open("input.mp4", "rb"),
})
Expand Down Expand Up @@ -84,7 +84,7 @@ def queue(self) -> QueueClient:
```python
# Submit and poll automatically
result = await client.queue.submit_and_poll({
"model": models.video("lucy-pro-v2v"),
"model": models.video("lucy-clip"),
"prompt": "Restyle this footage with anime shading and vibrant neon highlights",
"data": open("input.mp4", "rb"),
})
Expand Down
Loading
Loading