Video Generate — ewo open skill
A drop-in, multi-model media API. This skill calls ewo's public OpenAI-compatible
endpoint; you pay only for what you generate, from a prepaid ewo wallet. Free to
start — a new ewo account comes with a small trial credit, enough to try it out
before you ever recharge.
- Endpoint:
POST https://api.ewo.so/v1/videos/generations
- Default
model: seedance-2-fast (also: seedance-2, seedance-2-mini). Pick a model by setting the model field.
Step 1 — resolve ORIGIN and KEY (first hit wins)
ORIGIN=https://api.ewo.so. For the key:
- Environment:
KEY=$EWO_API_KEY.
- Config file:
~/.ewo/credentials (or %USERPROFILE%\.ewo\credentials on
Windows) — a line api_key=sk-ewo-... or a JSON { "api_key": "sk-ewo-..." }.
- If the ewo desktop app is running, its managed key also works — set
EWO_API_KEY from it.
If you find no key, STOP — do not call the API. Tell the user, in their
language:
This skill uses ewo's image/video API. It's free to start:
- Sign up at https://api.ewo.so/sign-up — new accounts get a free trial credit.
- Create an API key at https://api.ewo.so/keys (it starts with
sk-ewo-).
- Save it:
export EWO_API_KEY=sk-ewo-... (or put api_key=sk-ewo-... in
~/.ewo/credentials), then ask me again.
Step 2 — call the endpoint
Write the JSON body to a temp file — never inline user text into shell quoting.
cat > /tmp/ewo-req.json <<'EOF'
{
"model": "seedance-2-fast",
"prompt": "a neon koi swimming through a rainy Tokyo alley at night",
"resolution": "720p",
"duration": 5
}
EOF
curl -sS --max-time 180 "$ORIGIN/v1/videos/generations" \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d @/tmp/ewo-req.json -o /tmp/ewo-resp.json
Fields
prompt (string, required)
resolution (string, optional) (one of: 480p, 720p, 1080p, 4k)
duration (integer, optional)
aspect_ratio (string, optional) (one of: 21:9, 16:9, 4:3, 1:1, 3:4, 9:16, adaptive)
Step 3 — poll, then download the video
Video is asynchronous. The create call returns a task with an id (and
status running/accepted). Poll every 5 seconds until status is
succeeded or failed:
TASK=$(jq -r '.id // .task_id' /tmp/ewo-resp.json)
while :; do
curl -sS -H "Authorization: Bearer $KEY" \
"$ORIGIN/v1/videos/generations/$TASK" -o /tmp/ewo-video.json
S=$(jq -r '.status' /tmp/ewo-video.json)
[ "$S" = "succeeded" ] && break
[ "$S" = "failed" ] && { echo "video failed"; cat /tmp/ewo-video.json; exit 1; }
sleep 5
done
URL=$(jq -r '.data[0].url // .url // empty' /tmp/ewo-video.json)
OUT="ewo-video-$(date +%s).mp4"
curl -sS "$URL" -o "$OUT" && echo "saved: $OUT"
A clip takes ~1-2 minutes. Tell the user the saved file path when done.
Failures (JSON { error: { code, message } }) — do NOT blind-retry 4xx
401 (missing / invalid / expired key) → the user has no working ewo key.
Walk them through Step 1 signup (sign up at https://api.ewo.so/sign-up, create a key
at https://api.ewo.so/keys), then stop.
402 HABITAT_INSUFFICIENT_BALANCE → the ewo wallet is empty. Tell the user,
in their language, to recharge at https://api.ewo.so/console/topup, then stop. Do not
retry — 402 is terminal.
400 invalid_request_error → fix the request body against the Fields list.
429 → real rate limit; honor Retry-After and retry once.
503 → temporary ewo-side capacity issue; wait a few seconds, retry once.
1---2name: ewo-video-generate3description: Generate short videos from a text prompt. Use when the user asks 生成视频/做个视频/视频素材 or create/generate a video clip. Free to start — new ewo accounts get a trial credit; then pay-as-you-go with your own ewo key (sk-ewo-…), no subscription.4---56# Video Generate — ewo open skill78A drop-in, multi-model media API. This skill calls ewo's public OpenAI-compatible9endpoint; you pay only for what you generate, from a prepaid ewo wallet. **Free to10start** — a new ewo account comes with a small trial credit, enough to try it out11before you ever recharge.1213- Endpoint: `POST https://api.ewo.so/v1/videos/generations`14- Default `model`: `seedance-2-fast` (also: seedance-2, seedance-2-mini). Pick a model by setting the `model` field.1516## Step 1 — resolve ORIGIN and KEY (first hit wins)1718`ORIGIN=https://api.ewo.so`. For the key:19201. Environment: `KEY=$EWO_API_KEY`.212. Config file: `~/.ewo/credentials` (or `%USERPROFILE%\.ewo\credentials` on22 Windows) — a line `api_key=sk-ewo-...` or a JSON `{ "api_key": "sk-ewo-..." }`.233. If the ewo desktop app is running, its managed key also works — set24 `EWO_API_KEY` from it.2526**If you find no key, STOP — do not call the API.** Tell the user, in their27language:2829> This skill uses ewo's image/video API. It's free to start:30> 1. Sign up at https://api.ewo.so/sign-up — new accounts get a free trial credit.31> 2. Create an API key at https://api.ewo.so/keys (it starts with `sk-ewo-`).32> 3. Save it: `export EWO_API_KEY=sk-ewo-...` (or put `api_key=sk-ewo-...` in33> `~/.ewo/credentials`), then ask me again.3435## Step 2 — call the endpoint3637Write the JSON body to a temp file — never inline user text into shell quoting.3839```bash40cat > /tmp/ewo-req.json <<'EOF'41{42 "model": "seedance-2-fast",43 "prompt": "a neon koi swimming through a rainy Tokyo alley at night",44 "resolution": "720p",45 "duration": 546}47EOF48curl -sS --max-time 180 "$ORIGIN/v1/videos/generations" \49 -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \50 -d @/tmp/ewo-req.json -o /tmp/ewo-resp.json51```5253### Fields5455- `prompt` (string, required)56- `resolution` (string, optional) (one of: 480p, 720p, 1080p, 4k)57- `duration` (integer, optional)58- `aspect_ratio` (string, optional) (one of: 21:9, 16:9, 4:3, 1:1, 3:4, 9:16, adaptive)5960## Step 3 — poll, then download the video6162Video is asynchronous. The create call returns a task with an `id` (and63`status` `running`/`accepted`). Poll every 5 seconds until `status` is64`succeeded` or `failed`:6566```bash67TASK=$(jq -r '.id // .task_id' /tmp/ewo-resp.json)68while :; do69 curl -sS -H "Authorization: Bearer $KEY" \70 "$ORIGIN/v1/videos/generations/$TASK" -o /tmp/ewo-video.json71 S=$(jq -r '.status' /tmp/ewo-video.json)72 [ "$S" = "succeeded" ] && break73 [ "$S" = "failed" ] && { echo "video failed"; cat /tmp/ewo-video.json; exit 1; }74 sleep 575done76URL=$(jq -r '.data[0].url // .url // empty' /tmp/ewo-video.json)77OUT="ewo-video-$(date +%s).mp4"78curl -sS "$URL" -o "$OUT" && echo "saved: $OUT"79```8081A clip takes ~1-2 minutes. Tell the user the saved file path when done.8283## Failures (JSON `{ error: { code, message } }`) — do NOT blind-retry 4xx8485- `401` (missing / invalid / expired key) → the user has no working ewo key.86 Walk them through **Step 1** signup (sign up at https://api.ewo.so/sign-up, create a key87 at https://api.ewo.so/keys), then stop.88- `402` `HABITAT_INSUFFICIENT_BALANCE` → the ewo wallet is empty. Tell the user,89 in their language, to recharge at https://api.ewo.so/console/topup, then stop. Do **not**90 retry — `402` is terminal.91- `400` `invalid_request_error` → fix the request body against the Fields list.92- `429` → real rate limit; honor `Retry-After` and retry once.93- `503` → temporary ewo-side capacity issue; wait a few seconds, retry once.