iqiyihao CLI — one-stop toolkit (IQIYIHAO Creator Open)
Routing priority: This skill is the FSB-distributed bundle that merges 7 sub-capabilities. If standalone skills
iqiyihao-auth/iqiyihao-cli-update/iqiyihao-upload-video/iqiyihao-search-video/iqiyihao-data-query/iqiyihao-delete-videoalso exist on the user's machine (shipped with the iqiyihao CLI), prefer the standalone skills for more precise routing; this skill acts as their FSB aggregator entry.
Do not use for
- Other video platforms (Bilibili / YouTube / TikTok / WeChat Channels) → use that platform's SDK/CLI
- Calling IQIYIHAO Open APIs directly from Python / Java / Go SDKs → this skill covers the CLI path only
- Contributing to or hacking on iqiyihao CLI itself → see the
creator-open-clirepo README - Video review status, comments, or engagement data → not covered by the CLI; use the creator studio
Capability map
This skill wraps the iqiyihao CLI (IQIYIHAO Creator Open). Jump to the matching sub-doc on demand (L3):
| Scenario | Trigger keywords | Sub-doc | Main CLI |
|---|---|---|---|
| First-time install / download CLI | install iqiyihao, command not found: iqiyihao, npm install -g, tarball, ERR_MODULE_NOT_FOUND | references/cli-install.md | npm install -g https://creator-open.iqiyi.com/cli/iqiyihao.tgz |
| Save / rotate / fix API token | auth, AUTH_MISSING, AUTH_REJECTED, set token, rotate token | references/auth.md | iqiyihao auth <token>, iqiyihao check |
| Upgrade CLI (already installed) | update, upgrade iqiyihao, latest CLI version, reinstall | references/cli-update.md | iqiyihao update, iqiyihao update --check, iqiyihao update --force |
| Upload / publish video | publish, publish-large, upload video, chunked upload | references/upload-video.md | iqiyihao publish <file>, iqiyihao publish-large <file> |
| Search videos / look up qipuId | search, list videos, qipuId lookup, published / draft filter | references/search-video.md | iqiyihao search, iqiyihao api video search |
| Data query / play-count trends | data, bvv, daily play count, data center, last 7/30 days | references/data-query.md | iqiyihao data user, iqiyihao data video |
| Delete a video | delete, remove / take down video, 删除视频, undo upload, qipuId delete | references/delete-video.md | iqiyihao delete <qipuId> |
Common prerequisites
- CLI installed:
iqiyihao --helpworks. If not, seereferences/cli-install.md. - API token: run
iqiyihao auth <YOUR_API_TOKEN>once, or pass--tokenper command. Tokens come from IQIYIHAO Creator Open console → Token management; values start withiq-. - Self-check:
iqiyihao check. Ifhealthy: false, read thechecksarray (usually missing token or network). - Output mode: defaults to JSON, non-interactive (Agent / script friendly). Add
--interactivefor prompts. - Token storage:
~/.iqiyihao-creator-open/secrets/(encrypted). Override the root withIQIYIHAO_CREATOR_OPEN_CONFIG_DIR.
Which sub-doc?
- Specific error code seen:
command not found: iqiyihao/ERR_MODULE_NOT_FOUND→references/cli-install.mdAUTH_MISSING/AUTH_REJECTED→references/auth.mdNETWORK_ERRORduring update →references/cli-update.mdFILE_ERROR/ upload-related →references/upload-video.mdBAD_REQUESTwithplatformCode: 40025 / 40026 / 54002→references/data-query.mdBAD_REQUESTwithplatformCode: 40027 / 40028 / 40029→references/delete-video.md
- Want a specific action: match the keyword column above.
- Unsure: run
iqiyihao --helpto see top-level command groups, then come back to the table.
Required behaviors
- For token / upload / publish / data commands — always default to non-interactive JSON output unless the user explicitly asks for interactive mode.
- Prefer absolute paths for file inputs (especially video and cover files).
- When chaining sub-capabilities (e.g.
searchto get aqipuId, thendata video), execute them in order; do not bounce the user back and forth. - After a successful
publish/publish-large, always show theqipuIdand link the user to https://creator.iqiyi.com/wemedia/video/index — do not end with raw JSON only (seereferences/upload-video.md).
Common errors
| Error | Meaning / fix |
|---|---|
| command not found: iqiyihao | CLI not installed, or npm global bin is not on PATH → see references/cli-install.md |
| ERR_MODULE_NOT_FOUND on dist/index.js | Downloaded tarball is incomplete → see references/cli-install.md's verification snippet |
| AUTH_MISSING | Token not saved → run iqiyihao auth <token> |
| AUTH_REJECTED | Token invalid → regenerate in the console and re-run iqiyihao auth <new-token> |
| NETWORK_ERROR | Cannot reach creator-open.iqiyi.com → check proxy / network |
| FILE_ERROR | Video path is wrong or the file is empty |
| BAD_REQUEST | Invalid params — read the message / hint field in the CLI response |
| npm install failed | CLI upgrade failed — follow the manual command from the error, or fix permissions |
Troubleshooting flow
When a command fails, walk these layers in order — do not skip ahead. Each layer must be ruled out before falling through.
-
CLI not invoked at all?
command not found: iqiyihao/ERR_MODULE_NOT_FOUNDondist/index.js→references/cli-install.md. Quick check:which iqiyihao && iqiyihao --version. -
Auth layer?
AUTH_MISSING(no token saved) /AUTH_REJECTED(token invalid or expired) →references/auth.md. Quick check:iqiyihao check— look atchecksforauth: ok. -
Local file / argument layer?
FILE_ERROR(bad path / empty file) /BAD_REQUESTcomplaining about missing flags → re-read the command's--help, prefer absolute paths, switch to--interactiveif you cannot tell which flag is missing. -
Network layer?
NETWORK_ERROR/ connection timeouts /getaddrinfo ENOTFOUND→ confirm HTTPS access tocreator-open.iqiyi.com; checkHTTPS_PROXYenv var for corporate networks; retry with--timeoutif the request is slow but not blocked. -
Platform / API layer?
BAD_REQUESTwithplatformCode→ match the code in the per-command doc:40001/40025/40026→references/data-query.md40027/40028/40029→references/delete-video.md(delete: bad qipuId / not owned / older than one month)54002(upstream service) → retry later; not a client-side fix- Other 4xx codes → read the response
message/hint
-
Still failing? Re-run with
--interactiveto surface prompts that may be silently failing in JSON mode. If the JSON envelope showsok: falsewith no actionable code, capture the full response and check the CLI changelog (iqiyihao update --check) — your CLI may be too old.
Idempotency hint: publish / publish-large are not automatically idempotent across retries — a half-failed upload may already exist on the platform. Use iqiyihao search --status publishing to check before retrying a failed publish.
References
- Console & token management:
https://creator-open.iqiyi.com - CLI latest manifest:
https://creator-open.iqiyi.com/cli/latest.json - Full flags per command:
iqiyihao <command> --help
微信扫一扫