Upload Media logo

Upload Media

Community
BENZEMA216
upload-media

上传视频/音频/图片到即梦(Jimeng) VOD 平台并获取 Vid。支持 mp4/mp3/jpg/png 等格式,自动处理 STS 鉴权和分块上传。当需要上传媒体文件、获取视频ID、发布素材到字节跳动平台时使用。关键词:上传、即梦、VOD、视频ID、媒体文件

Overview

PublisherBENZEMA216
Repositoryai-ecommerce-agent-skills
Skill nameupload-media
Stars
82
Forks
11
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by BENZEMA216 on GitHub. Read the source before you install it.

Installation

Install the Upload Media AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/BENZEMA216/ai-ecommerce-agent-skills/tree/main/upload-media
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/BENZEMA216/ai-ecommerce-agent-skills.git /tmp/ai-ecommerce-agent-skills
mkdir -p .claude/skills
cp -r /tmp/ai-ecommerce-agent-skills/upload-media .claude/skills/upload-media
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Upload Media in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Upload Media on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Upload Media is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

上传媒体文件到即梦 VOD

将本地视频、音频或图片文件上传到字节跳动 VOD (Video On Demand) 平台,获取 Vid 标识符。

支持的文件类型

类型扩展名
videomp4, mov, avi, mkv, webm, flv, wmv, m4v
audiomp3, wav, aac, flac, ogg, m4a, wma
imagejpg, jpeg, png, gif, webp, bmp, svg

使用方法

执行上传脚本:

bash
python3 .claude/skills/upload-media/scripts/upload.py <文件路径> [--type video|audio|image]
  • <文件路径>: 必需,要上传的文件绝对路径
  • --type: 可选,强制指定文件类型。不指定时根据扩展名自动检测
  • --cookies: 可选,自定义 cookies.json 路径

输出格式

脚本输出两个流:

  • stderr: 人类可读的进度日志
  • stdout: 最终一行 JSON 结果

成功:

json
{
  "ok": true,
  "vid": "v03870g10004d6480qfog65tipnb6ah0",
  "uri": "tos-cn-v-148450/oxxxxxx",
  "meta": {
    "width": 1920,
    "height": 1080,
    "duration": 9.94,
    "format": "MP4",
    "codec": "h264",
    "size": 8517914,
    "md5": "52c5619242d245bd2d056ae7fe717d76",
    "file_type": "video"
  }
}

失败:

json
{
  "ok": false,
  "error": "获取凭证失败: session expired",
  "step": "get_token"
}

使用示例

bash
# 上传视频
python3 .claude/skills/upload-media/scripts/upload.py /path/to/video.mp4

# 上传音频
python3 .claude/skills/upload-media/scripts/upload.py /path/to/audio.mp3

# 强制指定类型
python3 .claude/skills/upload-media/scripts/upload.py /path/to/file.dat --type video

提取结果

只取 stdout 最后一行 JSON (过滤 stderr 日志):

bash
python3 .claude/skills/upload-media/scripts/upload.py /path/to/file.mp4 2>/dev/null

或解析 vid:

bash
VID=$(python3 .claude/skills/upload-media/scripts/upload.py /path/to/file.mp4 2>/dev/null | python3 -c "import sys,json; print(json.load(sys.stdin)['vid'])")

Cookie 过期处理

上传依赖即梦平台的登录 Cookie。如果上传失败且 step 为 get_token,说明 Cookie 已过期。

更新方法:

  1. 在浏览器中登录 https://jimeng.jianying.com
  2. 打开 DevTools → Network → 找任意一个请求 → 复制 Cookie
  3. 更新 .claude/skills/upload-media/cookies.json 中对应的 cookie 值

关键 Cookie 字段: sessionid, sid_tt, uid_tt, odin_tt

内部流程

1. getUploadToken     → 用 Cookie 从即梦获取 STS 临时凭证
2. ApplyUploadInner   → 用 AK/SK 签名调 VOD API,获取上传地址
3. TOS 分片上传        → 4MB 分片 + CRC32 校验,上传到 TOS 存储
4. CommitUploadInner  → 确认上传,VOD 注册视频,返回 Vid + 元数据

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Upload Media AI skill do?

上传视频/音频/图片到即梦(Jimeng) VOD 平台并获取 Vid。支持 mp4/mp3/jpg/png 等格式,自动处理 STS 鉴权和分块上传。当需要上传媒体文件、获取视频ID、发布素材到字节跳动平台时使用。关键词:上传、即梦、VOD、视频ID、媒体文件

Why use Upload Media on TypingMind?

Because you install it once and use it with any model. Upload Media is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Upload Media in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/BENZEMA216/ai-ecommerce-agent-skills/tree/main/upload-media. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Upload Media?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Upload Media?

As many as you like. As long as a model supports skills, you can use Upload Media with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Upload Media AI skill free?

It is published on GitHub by BENZEMA216. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇