First-Time Setup Required
This is a generic public skill package. It does not include any API key by default.
- - API key status: INLINECODE0
- Registration page: INLINECODE1
- API key page: INLINECODE2
- Required runner:
pixelhub_api_runner.py (same folder as this SKILL.md) - Recommended Python version: INLINECODE5
When this skill is used for the first time, the AI should follow this setup flow:
- 1. Tell the user to register or log in at
https://www.pixellelabs.com/. - Tell the user to open Personal Center -> API Keys.
- Tell the user to copy their own Pixelle API key and send it in chat.
- After the user sends the key, replace
DEFAULT_API_KEY in pixelhub_api_runner.py. - After the key is written, change this file's status line from
PENDING_USER_API_KEY to API_KEY_ADDED. - After that, do not ask for the API key again unless the user wants to replace it.
Do not invent an API key. Do not switch to curl, manual HTTP requests, or any non-Python fallback.
After Setup
Once the user's API key has been added, use the Python runner directly.
Runner order:
- 1. Optional discovery:
-
python -X utf8 "pixelhub_api_runner.py" tools
-
python -X utf8 "pixelhub_api_runner.py" tools --tool "grok_generate_image"
-
python -X utf8 "pixelhub_api_runner.py" tools --tool "grok_generate_image" --tool "grok_video_i2v"
- 2. Submit and wait:
-
python -X utf8 "pixelhub_api_runner.py" execute --tool "<tool_name>" --params '{...}'
- 3. If needed, custom flow:
-
run to submit and get
task_id
-
poll --task-id <task_id> for custom timeout or interval
Prefer execute for one-shot tasks when using runner.
Environment Requirement
Before using this skill, make sure Python is available locally.
- - Check with: INLINECODE20
- If Python is not available, install Python INLINECODE21
- After installation, rerun the helper script commands below
Command Cheatsheet
CODEBLOCK0
Execution Rules
- - Different tools have different parameter schemas.
- INLINECODE22 without
--tool returns grouped tool names by category only. - INLINECODE24 returns detailed params for the specified tool.
- Repeat
--tool to inspect multiple tools in one command. - Do not reuse one tool's params for another tool.
- If a call fails with param error, run
tools and fix params. - For media input params, pass public URL values.
- Do not fabricate result URLs; trust task result only.
首次使用需配置
这是一个通用的公共技能包。默认情况下不包含任何API密钥。
- - API密钥状态:PENDINGUSERAPIKEY
- 注册页面:https://www.pixellelabs.com/
- API密钥页面:https://www.pixellelabs.com/user/api-keys
- 所需运行器:pixelhubapi_runner.py(与此SKILL.md文件位于同一文件夹)
- 推荐Python版本:3.11+
当首次使用此技能时,AI应遵循以下配置流程:
- 1. 告知用户在https://www.pixellelabs.com/注册或登录。
- 告知用户打开个人中心 -> API密钥。
- 告知用户复制自己的Pixelle API密钥并在聊天中发送。
- 用户发送密钥后,替换pixelhubapirunner.py中的DEFAULTAPIKEY。
- 密钥写入后,将此文件的状态行从PENDINGUSERAPIKEY更改为APIKEY_ADDED。
- 此后,除非用户想要更换密钥,否则不再询问API密钥。
不要自行编造API密钥。不要切换到curl、手动HTTP请求或任何非Python的备用方案。
配置完成后
一旦用户的API密钥已添加,直接使用Python运行器。
运行器顺序:
- 1. 可选发现:
- python -X utf8 pixelhub
apirunner.py tools
- python -X utf8 pixelhub
apirunner.py tools --tool grok
generateimage
- python -X utf8 pixelhub
apirunner.py tools --tool grok
generateimage --tool grok
videoi2v
- 2. 提交并等待:
- python -X utf8 pixelhub
apirunner.py execute --tool
--params {...}
- 3. 如需自定义流程:
- run 提交并获取task_id
- poll --task-id 用于自定义超时或轮询间隔
使用运行器时,对于一次性任务优先使用execute。
环境要求
使用此技能前,请确保本地已安装Python。
- - 检查方式:python --version
- 如果Python不可用,请安装Python 3.11+
- 安装完成后,重新运行以下辅助脚本命令
命令速查表
bash
按类别列出工具名称
python -X utf8 pixelhubapirunner.py tools
显示单个工具的详细参数
python -X utf8 pixelhubapirunner.py tools --tool grokgenerateimage
显示多个工具的详细参数
python -X utf8 pixelhubapirunner.py tools --tool grokgenerateimage --tool grokvideoi2v
执行并等待
python -X utf8 pixelhubapirunner.py execute --tool zimageturbo_mcp --params {text:cinematic portrait,width:1024,height:1024}
执行规则
- - 不同工具有不同的参数模式。
- 不带--tool的tools命令仅返回按类别分组的工具名称。
- tools --tool ... 返回指定工具的详细参数。
- 重复使用--tool可在一条命令中查看多个工具。
- 不要将一个工具的参数复用于另一个工具。
- 如果调用因参数错误失败,请运行tools并修正参数。
- 对于媒体输入参数,请传递公共URL值。
- 不要编造结果URL,仅信任任务结果。