Skip to content

Commit 0af32ce

Browse files
authored
Merge pull request #341 from yiyabo/feat/jimeng-video
Add Volcengine Jimeng (即梦 AI) video provider with V4 signing
2 parents e0bfcb4 + d4426f6 commit 0af32ce

4 files changed

Lines changed: 857 additions & 0 deletions

File tree

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ SUNO_API_KEY= # Suno AI music generation (full songs, instrumenta
5050
# --- Video Generation ---
5151
HEYGEN_API_KEY= # HeyGen API (VEO, Sora, Runway, Kling, Seedance via single key)
5252
RUNWAY_API_KEY= # Runway Gen-4 (direct API, alternative to fal.ai routing)
53+
VOLC_ACCESSKEY= # Volcengine Jimeng (即梦 AI) video generation via official API (HMAC-SHA256 V4 signing)
54+
VOLC_SECRETKEY= # Secret Access Key paired with VOLC_ACCESSKEY. Get both at https://console.volcengine.com/iam/keymanage
5355
VIDEO_GEN_LOCAL_ENABLED= # Set to "true" for local video gen (needs GPU + diffusers)
5456
VIDEO_GEN_LOCAL_MODEL= # Local model: wan2.1-1.3b, wan2.1-14b, hunyuan-1.5, ltx2-local, cogvideo-5b
5557
MODAL_LTX2_ENDPOINT_URL= # Modal self-hosted LTX-2 endpoint (optional)

docs/PROVIDERS.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,53 @@ OpenMontage now uses those published rates in the Grok tool estimators.
104104

105105
---
106106

107+
### Volcengine Jimeng — 即梦 AI Video Generation
108+
109+
> **Direct ByteDance API via V4 signing.** Calls the Volcengine visual API (visual.volcengineapi.com) with HMAC-SHA256 request signing using IAM AK/SK credentials. Supports text-to-video and image-to-video via Jimeng 3.0 Pro.
110+
111+
**Tools unlocked:** `jimeng_video`
112+
**Env vars:** `VOLC_ACCESSKEY` (Access Key ID) + `VOLC_SECRETKEY` (Secret Access Key)
113+
114+
#### Setup
115+
116+
1. Go to [console.volcengine.com/iam/keymanage](https://console.volcengine.com/iam/keymanage)
117+
2. Create a Volcengine account if you don't have one
118+
3. Create an Access Key pair (AK + SK)
119+
4. Ensure your account has access to Jimeng AI (即梦) video generation service
120+
5. Add to `.env`: `VOLC_ACCESSKEY=...` and `VOLC_SECRETKEY=...`
121+
122+
#### What it's best for
123+
124+
- Direct ByteDance/Volcengine API quota usage
125+
- Jimeng 3.0 Pro text-to-video and image-to-video
126+
- Chinese-language prompt understanding
127+
- Configurable frame count (121=5s, 241=10s) and aspect ratio
128+
129+
#### API notes
130+
131+
Authentication uses Volcengine IAM V4 signing (HMAC-SHA256), not a Bearer token. The signing process builds a canonical request, derives a signing key from SK → date → region → service, and signs the request.
132+
133+
API flow: `POST ?Action=CVSync2AsyncSubmitTask` → poll `POST ?Action=CVSync2AsyncGetResult` → download `video_url`.
134+
135+
The implementation uses the compatible generic `CVSync2Async*` route (API version `2022-08-31`) rather than the model-specific `2024-06-06` actions presented in the public API explorer. This is intentional — the generic route supports the same Jimeng 3.0 Pro model via `req_key` while remaining stable across model updates.
136+
137+
The `req_key` for video is `jimeng_ti2v_v30_pro`. Success code is `10000`. Task statuses: `in_queue`, `generating`, `done`, `not_found`, `expired`.
138+
139+
**Authoritative API reference:** [Jimeng TI2V V30 Pro SubmitTask](https://api.volcengine.com/api-docs/view?action=JimengTI2VV30PROSubmitTask&serviceCode=cv&version=2024-06-06)
140+
141+
**Schema constraints** (enforced by `input_schema` to prevent paid-call failures):
142+
- `prompt`: max 800 characters
143+
- `frames`: must be exactly `121` (5s) or `241` (10s) at 24fps
144+
- `seed`: `-1` for random, or any non-negative integer
145+
146+
#### Pricing
147+
148+
| Model | Price |
149+
|------|-------|
150+
| Jimeng 3.0 Pro (video) | ~$0.05/sec (check Volcengine console for actual rate) |
151+
152+
---
153+
107154
### Alibaba DashScope — Qwen Image + TTS + ASR
108155

109156
> **Best for Chinese-language production.** One key unlocks Qwen-Image generation, Qwen-TTS Mandarin narration, and Qwen-ASR with word-level timestamps — the only DashScope path that provides word-level granularity for subtitle alignment.

0 commit comments

Comments
 (0)