Modellix Skill
Modellix is a Model-as-a-Service (MaaS) platform with async image/video generation APIs. The invariant flow is: submit task -> get task_id -> poll until success or failed.
Execution Policy (CLI-first)
Always choose execution path in this order:
- 1. Use CLI when
modellix-cli is available and authenticated. - Fall back to REST when CLI is unavailable, unsuitable, or missing capability.
- Prefer machine-readable outputs (
--json) in CLI flows.
Preflight and Deterministic Execution
Use bundled scripts before ad-hoc commands:
- 1. INLINECODE5
- Validates CLI availability and API key presence.
- Returns recommended mode (
cli or
rest).
- 2. INLINECODE8
- Executes CLI-first with REST fallback support.
- Handles exponential backoff polling and retryable submit errors.
- Emits normalized JSON result output.
Quick commands:
CODEBLOCK0
Core Workflow
1) Obtain API key
- - Create key in Modellix Console
- Save immediately (shown once)
- Store as INLINECODE9
2) Select model
Read references/REFERENCE.md to find model docs and parameters.
3) Run invocation and poll
- - Preferred: INLINECODE11
- Manual CLI flow: INLINECODE12
- Manual REST flow: INLINECODE13
4) Consume resources
Output media URLs are under result.resources. Persist assets promptly; results expire in 24 hours.
Progressive Reference Routing
Read only what the task needs:
- CLI install/auth/command flow and retry guidance
- REST endpoints, headers, status model, retry policy
- CLI command <-> REST endpoint mapping and fallback rules
Bundled Assets
- INLINECODE18
Credential and Data Egress
- - Required credential:
MODELLIX_API_KEY (this skill does not require any other secret). - Network egress: sends requests to
https://api.modellix.ai. - User payload handling: prompts and user-provided inputs (including media URLs or file-derived content) may be sent to Modellix endpoints during invocation.
- Result handling: generated resource URLs come from Modellix response payloads and should be downloaded before expiry (about 24 hours).
Error/Retry Policy
Unified non-success codes:
- - Non-retryable:
400, 401, 402, INLINECODE24 - Retryable:
429, 500, INLINECODE27
Retry behavior:
- - Exponential backoff (
1s -> 2s -> 4s, capped) - For
500/503, max 3 retries - For
429, respect X-RateLimit-Reset if present
Verification Checklist
- - [ ] Preflight executed and mode selected (
cli or rest) - [ ] API key configured (
MODELLIX_API_KEY or CLI --api-key) - [ ] Model parameters verified against model doc from INLINECODE37
- [ ] Task submit returns
task_id with success code - [ ] Polling handles
pending, processing, success, INLINECODE42 - [ ] Retry behavior implemented for INLINECODE43
- [ ] Result URLs persisted before 24-hour expiration
- [ ] REST fallback validated when CLI path is unavailable
Official Docs
- - API: https://docs.modellix.ai/ways-to-use/api
- CLI: https://docs.modellix.ai/ways-to-use/cli
- Pricing: https://docs.modellix.ai/get-started/pricing
- Full docs index: https://docs.modellix.ai/llms.txt
Modellix 技能
Modellix 是一个模型即服务平台,提供异步图像/视频生成API。不变的流程为:提交任务 -> 获取task_id -> 轮询直至success或failed。
执行策略(CLI优先)
始终按以下顺序选择执行路径:
- 1. 当modellix-cli可用且已验证身份时,使用CLI。
- 当CLI不可用、不适用或缺少功能时,回退到REST。
- 在CLI流程中优先使用机器可读输出(--json)。
预检与确定性执行
在临时命令之前使用捆绑脚本:
- 1. scripts/preflight.py
- 验证CLI可用性和API密钥是否存在。
- 返回推荐模式(cli或rest)。
- 2. scripts/invokeandpoll.py
- 优先执行CLI,支持REST回退。
- 处理指数退避轮询和可重试的提交错误。
- 输出标准化的JSON结果。
快速命令:
powershell
python scripts/preflight.py --json
python scripts/invokeandpoll.py --model-slug bytedance/seedream-4.5-t2i --body {prompt:A cinematic portrait of a fox in a misty forest at sunrise}
核心工作流
1) 获取API密钥
2) 选择模型
阅读references/REFERENCE.md以查找模型文档和参数。
3) 执行调用并轮询
- - 推荐:scripts/invokeandpoll.py
- 手动CLI流程:references/cli-playbook.md
- 手动REST流程:references/rest-playbook.md
4) 消费资源
输出媒体URL位于result.resources下。及时保存资源;结果在24小时后过期。
渐进式参考路由
仅读取任务所需的内容:
- - references/cli-playbook.md
- CLI安装/认证/命令流程及重试指南
- - references/rest-playbook.md
- REST端点、请求头、状态模型、重试策略
- - references/capability-matrix.md
- CLI命令与REST端点映射及回退规则
捆绑资源
- assets/output/task-result.schema.json
凭证与数据出口
- - 所需凭证:MODELLIXAPIKEY(此技能不需要任何其他密钥)。
- 网络出口:向https://api.modellix.ai发送请求。
- 用户负载处理:提示词和用户提供的输入(包括媒体URL或文件衍生内容)可能在调用期间发送到Modellix端点。
- 结果处理:生成的资源URL来自Modellix响应负载,应在过期前(约24小时)下载。
错误/重试策略
统一的非成功状态码:
- - 不可重试:400、401、402、404
- 可重试:429、500、503
重试行为:
- - 指数退避(1秒 -> 2秒 -> 4秒,有上限)
- 对于500/503,最多重试3次
- 对于429,如果存在X-RateLimit-Reset则遵循该值
验证清单
- - [ ] 已执行预检并选择模式(cli或rest)
- [ ] 已配置API密钥(MODELLIXAPIKEY或CLI的--api-key)
- [ ] 已根据references/REFERENCE.md中的模型文档验证模型参数
- [ ] 任务提交返回task_id及成功状态码
- [ ] 轮询处理pending、processing、success、failed状态
- [ ] 已为429/500/503实现重试行为
- [ ] 结果URL在24小时过期前已保存
- [ ] 当CLI路径不可用时已验证REST回退
官方文档
- - API:https://docs.modellix.ai/ways-to-use/api
- CLI:https://docs.modellix.ai/ways-to-use/cli
- 定价:https://docs.modellix.ai/get-started/pricing
- 完整文档索引:https://docs.modellix.ai/llms.txt