Skip to content
cccskills
FreePublished on GitHub

arkcli-code-example

arkcli +code-example:为指定基础模型生成多语言(Python / Go / Java / Node / curl)调用示例代码并写入本地文件。数据源是火山方舟 OpenTOP OpenGetSampleCode。当用户需要拿某个基础模型的 SDK / curl 调用示例、保存为本地接入模板时使用。

反触发:TTS/ASR/语音模型没有 arkcli 示例代码路径,不能靠补版本解决,只能转 models search 说明当前不支持。

The English summary is being prepared. Showing the original description.

See how to install

Files included (6)

  • SKILL.md5.5 KB
  • assets/demo-code/examples.json236 B
  • assets/demo-code/go/main.go1.5 KB
  • assets/demo-code/python.py761 B
  • references/arkcli-code-example.md7.7 KB
  • references/evals.md1.0 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

arkcli +code-example

前置条件: 先阅读 ../arkcli-shared/SKILL.md 了解认证、全局参数和安全规则。

为指定基础模型生成多语言 SDK 调用示例代码,同时写入本地文件。数据源是火山方舟 OpenTOP OpenGetSampleCode。

什么时候用

  • 用户说"生成示例代码 / SDK 示例 / curl 命令 / 怎么调用这个模型",且已经知道模型名
  • 想把某个基础模型的多语言调用模板保存到本地
  • 教程或技术文档需要引用该基础模型的具体 SDK import、安装包、方法或请求格式:先取得对应版本示例并核对官方文档,不能从模型生成的草稿直接采信接口写法。

教程中的代码事实核对

以真实返回条目的 install、language、io_type 和 code 作为示例依据;明确目标模型/版本、语言及接口路径。更换 SDK 包或版本、图片/视频方法、响应字段、错误码时必须另核对该版本源码或官方文档正文;一个模型的文本示例不能证明所有媒体接口。服务端提供模板也不等于已在本轮执行成功,分别标明“官方示例/静态核对/实际运行”。检索片段或 AI 初稿不足时缩小教程到已查证内容,未验证片段标注或移除,不写成完整已验证接入指南。

示例命令可能将当前 Key 填入文件;遵守共享身份/授权协议,提交教程前将 Key、Token 和签名 URL 等真实凭证替换为占位符并检查附件。不得直接回显未脱敏的生成条目,不为拿示例切换账号或绕过 Access 门禁。

反路由(不要用本命令):

  • 只是想试模型效果 → ../arkcli-chat/SKILL.md(文本/多模态对话)或 ../arkcli-gen/SKILL.md(出图/视频)
  • 还不知道模型名 → 先 ../arkcli-models/SKILL.md models search/get
  • 需要先创建接入点 → ../arkcli-deploy/SKILL.md
  • 语音模型(TTS / ASR / 配音 / 朗读 / 播客 / 音色 / 实时语音交互,或 doubao-seed-tts-* / doubao-seed-asr-* / seedasr-*)→ 不使用 +code-example。models search 能搜到不代表 OpenGetSampleCode 有示例;不要把后端 ModelVersion required 理解成"补一个版本就能生成",应说明当前 arkcli 不支持语音模型示例代码。

快速开始

# 拿某基础模型的全部语言示例(写入 ./ark-examples/<model>/)
arkcli +code-example --model doubao-seedream-5-0

# 指定版本 + 只看 Python + 结构化输出
arkcli +code-example --model doubao-seedream-5-0 --version 260128 --language python --format json
  • --model 必填,可传基础模型名或合并 ID(doubao-seedream-5-0-260128)
  • --version 可选;不传时 CLI 自动推导(合并 ID 拆版本 → 找 ArkModels 匹配 → GetFoundationModel 取 PrimaryVersion 兜底),全都拿不到才报错要求显式传 --version
  • 内部机制:接口约束 ModelVersion 必填,缺失时 CLI 走上述回退链自动补齐;custom model 走 PrimaryVersion 兜底时 scenario 自动切 finetune_inference,foundation model 无论显式版本或 PrimaryVersion 兜底一律保持 quick_access
  • --language 可选:python / go / java / node / curl(shell 是 curl 别名),默认全部
  • --output-dir 可选,默认 ./ark-examples/<model>
  • --format json 输出结构化条目(含 language / io_type / install / code)
  • 语音模型没有 arkcli 示例代码路径;命中 TTS / ASR / 语音交互时停在 arkcli models search <keyword> 的发现说明,不要继续调用本命令

0.1.17 变更:旧版 --endpoint-id 已移除——新数据源按基础模型取码,不再支持按已有接入点 ID 取码。如需指向某 endpoint,生成后把代码里的 model="..." 手动改成你的 ep-xxx。

命令一览

命令说明
arkcli +code-example --model <name> [--version <ver>] [--language <lang>] [--output-dir <dir>] [--format json]生成多语言示例代码并写入本地

输出形态

  • 本地文件:按"IO 任务类型"分子目录(对齐后端 IOType 维度),同类型下按语言分文件;带安装步骤的语言把安装命令写进文件头注释。
  • 结构化 JSON:--format json 时给出按 (语言 × IO 类型) 展开的条目。
  • 人类可读:默认按后端顺序打印各代码块。

详细参数、目录结构示例、常见链路与 FAQ 见 references/arkcli-code-example.md。

参考

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

arkcli agent:管理 ARK Managed Agents,包括 Agent / Skill / Env / Session / File / Memory Store / Vault / MCP OAuth。控制面优先走 ForTop/OpenTOP,Session 运行时和 Files 走数据面直联。

The English summary is being prepared. Showing the original description.

volcengine/ark-cli143Updated Oct 17, 2026

Inspect or invoke locally registered ArkCLI actions when product commands cannot cover a task. Use for registry errors or exact raw payloads. Not for public API catalogs or OpenAPI schemas.

The English summary is being prepared. Showing the original description.

volcengine/ark-cli143Updated Oct 17, 2026

arkcli 认证管理:交互式登录、Volc SSO 登录、查看状态、退出登录、生成 ARK API Key (apikey)、以及云开发机/CI 用 `arkcli init-volc` 从 VOLC_INIT_* 环境变量无交互引导 platform profile。0.1.16 起 SSO 登录走 Gate 1+2 自动绑定 Profile 切面 (type/region/project/owner_trn);AK/SK login 通道暂关。当用户需要初始化凭证、排查鉴权问题、切换认证方式、生成或重选 ARK API Key、或在已注入凭证的环境无交互引导时使用。反触发:用户问 TTS/ASR/语音模型能力、接入或调用时,不要引导 `auth apikey`,只转 models search 说明 arkcli 当前仅支持广场发现。

The English summary is being prepared. Showing the original description.

volcengine/ark-cli143Updated Oct 17, 2026

查询火山引擎 ARK 拆分账单明细(结算金额、Token 用量计费),支持按账期月、月范围、Endpoint、API Key、产品编码等维度过滤。当用户问账单、花了多少钱、对账、账期、按 EP / API Key 拆账、按产品拆账、月度账单、出账明细时使用。注意 billing 跟 usage stats 不同:stats 出推理量(近实时),billing 出结算金额(T+1 出账,财务口径)。

The English summary is being prepared. Showing the original description.

volcengine/ark-cli143Updated Oct 17, 2026

模型 API 用法、思考模式开关与强度、Chat/Responses 参数和 SDK 示例,以及 arkcli +chat 真实推理。询问如何配置时按具体模型版本与协议给最小示例;已有报错先核对原请求,不用新推理或新建凭证代替取证。明确要求真实模型输出时,支持多模态、流式、多轮与本地 dry-run;专项理解走 arkcli-understand。

The English summary is being prepared. Showing the original description.

volcengine/ark-cli143Updated Oct 17, 2026

arkcli 本地配置管理。处理 profile 配置归因、update.mode 的 automatic/disabled 策略、config reset 与历史 yaml 排障;profile 类操作优先使用 `arkcli profile <subcmd>`。

The English summary is being prepared. Showing the original description.

volcengine/ark-cli143Updated Oct 17, 2026

See all skills by volcengine

Report a problem with this skill