Skip to content

docs: use image_file_paths in ai_image_editor generate examples - #172

Merged
davidhu2000 merged 1 commit into
mainfrom
docs/ai-image-editor-image-file-paths
Sep 24, 2026
Merged

davidhu2000 merged 1 commit into
mainfrom
docs/ai-image-editor-image-file-paths

Conversation

@davidhu2000

Copy link
Copy Markdown
Contributor

Why

The generate examples in the custom docs block of magic_hour/resources/v1/ai_image_editor/README.md still pass the deprecated image_file_path. #165 removed examples from deprecated fields in the generated docs, but the SDK generator preserves this hand-written block, so it kept the old field.

web-app's scripts/sync-code-samples.ts pulls these README snippets into code-samples.json, which feeds the API docs and the /api playground. So the Python sample for v1.ai_image_editor.create showed the deprecated field, while the Node, Go, Rust and cURL samples already use image_file_paths. Fixing it here means the next sync picks up the right field instead of a web-app fix getting overwritten.

What

Both the sync and async generate examples now pass assets={"image_file_paths": ["/path/to/1234.png"]}. generate() already uploads each local path in image_file_paths (client.py L105-109).

🤖 Generated with Claude Code

The sync and async generate examples in the custom docs block still used
the deprecated image_file_path. #165 removed deprecated-field examples from
the generated docs, but this hand-written block is preserved on regeneration,
so it kept the old field. web-app pulls these snippets into its API code
samples.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@davidhu2000
davidhu2000 merged commit 1918766 into main Sep 24, 2026
6 checks passed
@davidhu2000
davidhu2000 deleted the docs/ai-image-editor-image-file-paths branch September 24, 2026 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant