From b18ccd57e3a8f6adefd71117cb6067b6a6304caf Mon Sep 17 00:00:00 2001 From: Dawid Wenderski Date: Fri, 30 Oct 2026 12:55:51 +0100 Subject: [PATCH 1/3] DEV-2200: use current models and Path file inputs in examples The examples and README referenced models that are no longer served (Ltx2_19B_Dist_FP8, ltx-audio2video, MusicGen) plus two placeholders. Switch to Ltx2_5_22B_Dist_INT8 for text, image and audio to video, AceStep_1_5_Turbo for music, FlashVSR_Tiny for video upscale and Nanonets_Ocr_S_F16 for OCR, and keep the parameters within those models' limits (24 fps, no steps/guidance for LTX 2.5; fixed steps and guidance for AceStep). Checked against the price endpoints. File arguments were shown as plain strings, which the SDK rejects; they now use Path(...), and the comments no longer claim a str path is accepted. Co-Authored-By: Claude Opus 5.5 --- README.md | 40 ++++++++++++++++++++++-------------- examples/basic_image.py | 8 +++++--- examples/transcription.py | 4 +++- examples/tts_and_audio.py | 12 ++++++----- examples/video_generation.py | 35 +++++++++++++++---------------- 5 files changed, 56 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 635dfc6..dc8fa95 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,8 @@ Disable with `DeapiClient(fill_model_defaults=False)` or `DEAPI_FILL_MODEL_DEFAU ### Image Generation ```python +from pathlib import Path + # Text-to-image job = client.images.generate( prompt="mountain landscape at sunset", @@ -149,29 +151,31 @@ print(result.results_alt_formats) # {"jpg": "...", "webp": "..."} # Image edits: image= for one source, images=[...] for several (not both) job = client.images.transform( prompt="make it look like a watercolor painting", - image="photo.jpg", # path, Path, bytes or file-like + image=Path("photo.jpg"), # Path, bytes or a binary file object (not a plain str) model="QwenImageEdit_Plus_NF4", ) -job = client.images.upscale(image="low_res.png", model="RealESRGAN_x4") -job = client.images.remove_background(image="photo.png", model="Ben2") +job = client.images.upscale(image=Path("low_res.png"), model="RealESRGAN_x4") +job = client.images.remove_background(image=Path("photo.png"), model="Ben2") ``` ### Video Generation ```python +from pathlib import Path + # Text-to-video job = client.video.generate( prompt="a rocket launching into space", - model="Ltx2_19B_Dist_FP8", + model="Ltx2_5_22B_Dist_INT8", width=768, height=512, frames=120, fps=24, ) # Image-to-video with keyframes job = client.video.animate( prompt="gentle camera pan across the scene", - first_frame_image="landscape.jpg", - model="Ltx2_19B_Dist_FP8", + first_frame_image=Path("landscape.jpg"), + model="Ltx2_5_22B_Dist_INT8", ) # Reference mode: list order binds files to /