Skip to content

Commit 10aa9d9

Browse files
AdirAmsalemclaude
andauthored
fix(examples): address PR #105 review comments (#106)
## Summary Addresses open review comments from #105 (deprecated model removal): - Increase `express.json()` body size limit to 50mb so base64 data URL payloads don't hit the default 100KB cap - Remove 3 duplicate example files (`text-to-image.ts`, `text-to-video.ts`, `image-to-video.ts`) that were repurposed during model removal but became identical to existing examples with misleading names - Update `examples/sdk-core/README.md` references accordingly ## Test plan - [ ] Verify express example starts without errors - [ ] Verify no broken references to deleted files remain 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: changes are confined to example code and documentation, mainly increasing request body size and deleting redundant example scripts. > > **Overview** > Updates the `examples/express-api` server to accept large base64 payloads by raising the `express.json()` body limit to `50mb`. > > Cleans up `examples/sdk-core` by removing three redundant/misleading example scripts (`image/text-to-image.ts`, `video/text-to-video.ts`, `video/image-to-video.ts`) and updating the README to point to the remaining `image-to-image` and `video-to-video` examples. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 993cd92. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4dca905 commit 10aa9d9

5 files changed

Lines changed: 5 additions & 92 deletions

File tree

examples/express-api/src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import express from "express";
33
import { createDecartClient, models } from "@decartai/sdk";
44

55
const app = express();
6-
app.use(express.json());
6+
app.use(express.json({ limit: "50mb" }));
77

88
const client = createDecartClient({
99
apiKey: process.env.DECART_API_KEY!,

examples/sdk-core/README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ pnpm build
2121

2222
```sh
2323
cd examples/sdk-core
24-
pnpm tsx video/text-to-video.ts
25-
pnpm tsx image/text-to-image.ts
24+
pnpm tsx video/video-to-video.ts
25+
pnpm tsx image/image-to-image.ts
2626
```
2727

2828
## Examples
@@ -31,16 +31,13 @@ pnpm tsx image/text-to-image.ts
3131

3232
Image models use the synchronous Process API - they return immediately with a Blob.
3333

34-
- `image/text-to-image.ts` - Edit image with a prompt (`lucy-pro-i2i`)
35-
- `image/image-to-image.ts` - Transform existing image
34+
- `image/image-to-image.ts` - Transform existing image with a prompt (`lucy-pro-i2i`)
3635

3736
### Video Generation
3837

3938
Video models use the asynchronous Queue API - jobs are submitted and polled for completion.
4039

41-
- `video/text-to-video.ts` - Edit video with a prompt (`lucy-pro-v2v`)
42-
- `video/image-to-video.ts` - Edit video with a prompt (`lucy-pro-v2v`)
43-
- `video/video-to-video.ts` - Transform existing video
40+
- `video/video-to-video.ts` - Transform existing video with a prompt (`lucy-pro-v2v`)
4441
- `video/video-editing.ts` - Edit video with prompt, reference image, or both (`lucy-2-v2v`)
4542
- `video/long-form-video-restyle.ts` - Transform existing video with `lucy-restyle-v2v`
4643
- `video/manual-polling.ts` - Manual job status polling

examples/sdk-core/image/text-to-image.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.

examples/sdk-core/video/image-to-video.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

examples/sdk-core/video/text-to-video.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)