Flux 2 图像生成与编辑 API
简介
通过 PoYo API 调用 Flux 2 系列图像生成与编辑模型,支持 flux-2-pro、flux-2-flex 等变体,需 POYO_API_KEY 认证。
原始描述
Use PoYo AI Flux 2 through the `https://api.poyo.ai/api/generate/submit` endpoint. Use when a user wants to generate or edit media with this model family, pr...
通过你的 Agent 添加
安装目录:poyo-flux-2-api/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
PoYo Flux 2 技能封装了 PoYo AI 平台的 Flux 2 图像生成 API,提供标准化的作业提交与状态追踪能力。用户通过 https://api.poyo.ai/api/generate/submit 端点提交任务,支持四种模型变体:
- flux-2-pro:高质量商业级图像生成
- flux-2-pro-edit:基于参考图像的精细编辑
- flux-2-flex:平衡质量与成本的通用生成
- flux-2-flex-edit:轻量级图像编辑方案
请求需包含 model 顶层字段、input.prompt 文本描述,可选配置 input.size(画布比例)、input.resolution(质量档位)及 input.image_urls(参考图)。认证采用 Bearer Token 模式,依赖环境变量 POYO_API_KEY。
显著优点
- 模型覆盖完整:原生支持 Flux 2 全系模型,区分生成与编辑场景
- 工作流标准化:统一的任务提交-轮询-回调机制,降低集成复杂度
- 参数灵活:分辨率与尺寸独立配置,适应多样化输出需求
- 辅助工具完备:提供
references/api.md 文档与 scripts/submit_flux_2.sh 脚本
潜在局限
- 外部依赖单一:完全绑定 PoYo 平台可用性与定价策略
- 异步处理必需:需自行实现轮询或 webhook 接收逻辑
- 编辑场景受限:
image_urls 参数仅限编辑类模型,误用导致失败
- 成本控制隐含:pro/flex 档次差异显著,需用户主动权衡
适合人群
- 需要 Flux 2 模型能力的开发者与创意工作者
- 已采纳 PoYo AI 生态或愿意接受 vendor lock-in 的团队
- 具备异步任务处理经验、能管理 API 密钥安全的技术用户
常规风险
- 密钥泄露:
POYO_API_KEY 若硬编码或误提交至版本控制,可能导致额度盗刷
- 任务状态丢失:未妥善保存
task_id 或轮询逻辑缺陷将导致结果无法回收
- 内容合规:生成内容受 PoYo 平台审核策略约束,存在拒绝服务可能
- 成本累积:高分辨率 + pro 模型组合易产生意外费用,建议前置预算校验
references/api.md 文档与 scripts/submit_flux_2.sh 脚本- 外部依赖单一:完全绑定 PoYo 平台可用性与定价策略
- 异步处理必需:需自行实现轮询或 webhook 接收逻辑
- 编辑场景受限:
image_urls参数仅限编辑类模型,误用导致失败 - 成本控制隐含:pro/flex 档次差异显著,需用户主动权衡
适合人群
- 需要 Flux 2 模型能力的开发者与创意工作者
- 已采纳 PoYo AI 生态或愿意接受 vendor lock-in 的团队
- 具备异步任务处理经验、能管理 API 密钥安全的技术用户
常规风险
- 密钥泄露:
POYO_API_KEY 若硬编码或误提交至版本控制,可能导致额度盗刷
- 任务状态丢失:未妥善保存
task_id 或轮询逻辑缺陷将导致结果无法回收
- 内容合规:生成内容受 PoYo 平台审核策略约束,存在拒绝服务可能
- 成本累积:高分辨率 + pro 模型组合易产生意外费用,建议前置预算校验
- 密钥泄露:
POYO_API_KEY若硬编码或误提交至版本控制,可能导致额度盗刷 - 任务状态丢失:未妥善保存
task_id或轮询逻辑缺陷将导致结果无法回收 - 内容合规:生成内容受 PoYo 平台审核策略约束,存在拒绝服务可能
- 成本累积:高分辨率 + pro 模型组合易产生意外费用,建议前置预算校验
技能正文
---
name: poyo-flux-2
description: Use PoYo AI Flux 2 through the https://api.poyo.ai/api/generate/submit endpoint. Use when a user wants to generate or edit media with this model family, prepare PoYo-compatible payloads, submit jobs, or poll task status for flux-2-pro, flux-2-pro-edit, flux-2-flex, flux-2-flex-edit.
metadata: {"openclaw": {"homepage":"https://poyo.ai/models/flux-2", "requires": {"bins": ["curl"], "env": ["POYO_API_KEY"]}, "primaryEnv": "POYO_API_KEY"}}
PoYo Flux 2
PoYo Links
- Model page: https://poyo.ai/models/flux-2
- API docs: https://docs.poyo.ai/api-manual/image-series/flux-2
- API key page: https://poyo.ai/dashboard/api-key
PoYo Links
Use this skill to submit and track PoYo jobs for the Flux 2 family.
Quick workflow
- Choose the right model id for the requested output.
- Build the request body for
POST https://api.poyo.ai/api/generate/submit.
- Send Bearer-authenticated JSON with
Authorization: Bearer <POYO_API_KEY>.
- Save the returned
task_id.
- Poll unified task status or wait for
callback_url notifications.
Request rules
- Require top-level
model.
- Keep prompts concrete and outcome-focused.
- Require
input.prompt unless the user already supplied a full payload.
- Use
input.image_urls only when the task needs reference or source images.
- Use
input.size to match the intended aspect ratio or canvas.
- Use
input.resolution when quality/cost tradeoffs matter.
Model selection
flux-2-pro
POST https://api.poyo.ai/api/generate/submit.Authorization: Bearer <POYO_API_KEY>.task_id.callback_url notifications.- Require top-level
model. - Keep prompts concrete and outcome-focused.
- Require
input.promptunless the user already supplied a full payload. - Use
input.image_urlsonly when the task needs reference or source images. - Use
input.sizeto match the intended aspect ratio or canvas. - Use
input.resolutionwhen quality/cost tradeoffs matter.
Model selection
flux-2-pro
flux-2-proUse for higher-quality or premium jobs.
flux-2-pro-edit
Use for editing or modifying supplied images.
flux-2-flex
Use for general generation with this model variant.
flux-2-flex-edit
Use for editing or modifying supplied images.
Execution
- Read
references/api.md for endpoint details, model ids, key fields, example payloads, and polling notes.
- Use
scripts/submit_flux_2.sh to submit a raw JSON payload from the shell.
- If the user only needs a curl example, adapt the example from
references/api.md instead of rewriting from scratch.
- After submission, report the
task_id clearly so follow-up polling is easy.
Output expectations
references/api.md for endpoint details, model ids, key fields, example payloads, and polling notes.scripts/submit_flux_2.sh to submit a raw JSON payload from the shell.references/api.md instead of rewriting from scratch.task_id clearly so follow-up polling is easy.When helping with this model family, include:
- chosen model id
- final payload or a concise parameter summary
- whether reference images are involved
- returned
task_idif a request was actually submitted - next step: poll status or wait for webhook
Notes:
Needs POYO_API_KEY from https://poyo.ai
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。