feat: videos接口支持多图参考,修改video界面,参考图数量增加到7张,同时支持@,添加多图参考的功能#336
Merged
chenyme merged 3 commits intochenyme:mainfrom Mar 23, 2026
Merged
feat: videos接口支持多图参考,修改video界面,参考图数量增加到7张,同时支持@,添加多图参考的功能#336chenyme merged 3 commits intochenyme:mainfrom
chenyme merged 3 commits intochenyme:mainfrom
Conversation
|
牛啊大佬,希望尽快发布,迫切需要视频的多图参考功能 |
01bcad1 to
14c5c9f
Compare
piexian
added a commit
to piexian/grok2api
that referenced
this pull request
Mar 22, 2026
上游来源与合并方式: - chenyme#366 chenyme#366 :手工移植 usage 估算与 responses usage 映射,按当前主线重接 chat/responses 接口,没有直接套用原 patch。 - chenyme#374 chenyme#374 :参考原始思路改为 app-chat 单链路接入,移除已不存在的 ws 回退,并补齐 request_overrides。 - chenyme#375 chenyme#375 :参考原始思路重写视频续写与 token 清理,不使用 localhost 自调用,直接复用现有 app-chat 请求链路,并处理 email-domain-rejected。 - chenyme#336 chenyme#336 :手工合并多图参考视频支持,保持旧 image_reference/image_url 兼容,仅在多图或 @图N 场景启用新链路。
This was
linked to
issues
Mar 23, 2026
Closed
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
videos接口支持多图参考,修改video界面,参考图数量增加到7张,同时支持@,添加多图参考的功能
Changes
Related Issues
Auto
Verification
Breaking Changes
Origin Details:
主要改动:
核心逻辑:VideoService 支持上传多张参考图,并自动建立 assetId 映射。

占位符解析:支持在提示词中使用 @图1 到 @图7(及 @imagen),后端会自动将其替换为对应的真实 assetId 送往上游。
Web UI 升级:
/video 页面支持一次上传最多 7 张图片。
参考图输入框支持多行 URL 列表。
提示词区域增加占位符使用引导。
API 兼容性:/v1/chat/completions 和内置功能接口均已扩容为 image_urls 数组,同时保留对旧版单图字段的向下兼容。
文档同步:更新中英文 README,补充多图视频生成的请求示例。
API接口升级:
videos接口支持多图参考,同时支持通过@的方式指定参考图