runapi-cli – skill Lập trình cho agent AI
Tạo ảnh, video và nhạc/âm thanh bằng AI từ agent sử dụng RunAPI CLI.
Cài skill runapi-cli bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/runapi-cli-7c580.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /runapi-cli – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/runapi-cli-7c580.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $runapi-cli – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/runapi-cli-7c580.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /runapi-cli – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/runapi-cli-7c580.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /runapi-cli – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
RunAPI CLI
Overview
The runapi CLI is the execution layer for RunAPI model tasks. Use it when an agent needs to generate AI images, videos, or music/audio, run a one-off model job, pass a JSON request body, wait for an async task, or script RunAPI from a terminal, server, or CI job.
Source repository: [github.com/runapi-ai/cli-skill](https://github.com/runapi-ai/cli-skill) (Apache-2.0)
When to Use This Skill
- Use when the user asks to run a RunAPI model from an agent.
- Use when the user needs to inspect RunAPI CLI auth or account status.
- Use when the user wants to pass JSON request bodies to RunAPI services.
- Use when the user wants to submit async RunAPI tasks and wait for completion.
- Use when the user wants to install the RunAPI CLI on a local machine, server, or CI runner.
Install
macOS / Linux
brew install runapi-ai/tap/runapiServer / CI
Download the installer, inspect it, then run it locally.
curl -fsSL https://runapi.ai/cli/install.sh -o runapi-install.sh
less runapi-install.sh
sh runapi-install.shTo pin a specific version:
sh runapi-install.sh --version v0.1.0The installer detects OS and architecture, verifies the SHA-256 checksum from https://runapi.ai/cli/latest.json, and refuses to write the binary if verification fails.
Authentication
Treat RunAPI authentication and generation as security-sensitive: commands can call remote services, consume credits, and expose account state. Review installer scripts before running them and keep API keys in environment variables or stdin, not shell history.
Check the current state first:
runapi auth status| Source | How |
|---|---|
| Environment | Read RUNAPI_API_KEY from the environment |
| Saved config | printf '%s' "$RUNAPI_API_KEY" \| runapi auth import-token --token - |
| Browser login | runapi login only when the user explicitly wants browser auth |
RUNAPI_BASE_URL overrides the default base URL. Verify its resolved HTTPS destination before sending account credentials or private prompts/media; do not inherit an unreviewed endpoint override. Generation requires authorization for the selected provider, input transfer and credit spend; inspect actual task status and output before claiming success.
Avoid passing secrets directly in command arguments. Prefer RUNAPI_API_KEY or stdin token import with --token -.
Discover Services, Commands, and Fields
The CLI is JSON-first. Every service exposes typed commands, and each command documents its request fields through --help. Inspect command help before composing a request.
runapi --help
runapi suno --help
runapi suno text-to-music --helpRun a Model
Pass the request body as JSON through --input-file, --input, or stdin. The default flow is synchronous and polls until the task completes.
runapi suno text-to-music --input-file request.json
runapi suno text-to-music --async --input-file request.json
runapi wait <task-id> --service suno --action text-to-music
runapi get <task-id> --service suno --action text-to-musicJSON responses go to stdout; progress lines go to stderr. Pipe to jq for downstream parsing.
Account
runapi account info
runapi account balanceInstall the Skill Into Another Agent Runtime
runapi agent install-skill --target claude
runapi agent install-skill --target codex
runapi agent install-skill --target gemini
runapi agent install-skill --target openclaw
runapi agent list-targets
runapi agent install-skill --target-dir <path>Limitations
- RunAPI model calls require a valid RunAPI account or API key.
- Some model tasks are long-running and should use
--asyncplusrunapi wait. - Browser login is interactive and should not be the default path for agents.
- This skill does not replace model-specific parameter validation; inspect command help before building request JSON.
Security & Safety Notes
- Never paste API keys into example commands or PR text.
- Prefer
RUNAPI_API_KEYor stdin token import instead of command-line secrets. - Do not run interactive
runapi loginby default from an agent. - Check the CLI exit code before assuming a task succeeded.
References
- RunAPI CLI skill: https://github.com/runapi-ai/cli-skill
- RunAPI CLI repository: https://github.com/runapi-ai/cli
- RunAPI model catalog: https://runapi.ai/models.md
Skill liên quan
- rust – Hướng dẫn mã nguồn chuyên sâu theo ngôn ngữ cho Rust.
- rust-async-patterns – Làm chủ lập trình bất đồng bộ trong Rust với Tokio, async trait, xử lý lỗi và các mẫu…
- rust-pro – Làm chủ Rust 1.75+ với các mẫu async hiện đại, tính năng hệ thống kiểu nâng cao và lập…
- salary-benchmarking – Sổ đăng ký benchmark lương: vai trò, phòng ban và cấp bậc so với mức tối thiểu, trung vị…
- scala – Hướng dẫn mã nguồn chuyên sâu theo ngôn ngữ cho Scala.
- screen-reader-testing – Hướng dẫn thực tiễn kiểm thử ứng dụng web với trình đọc màn hình để xác thực khả năng…
- sdk-dx – Thiết kế SDK mà lập trình viên yêu thích sử dụng: API có cảm giác tự nhiên, thông báo…
- selenium-skill – Tạo script và test tự động hóa Selenium WebDriver đạt chuẩn production bằng Java…