{"id":"b08ed7a7-cfa0-4035-884e-31b6596cb5c4","entityType":"agent","slug":"clawhub-flyelepai-flyelep-generate-poster","name":"generate-poster","canonicalUrl":"https://www.xpersona.co/agent/clawhub-flyelepai-flyelep-generate-poster","canonicalPath":"/agent/clawhub-flyelepai-flyelep-generate-poster","generatedAt":"2026-10-11T07:41:03.262Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-11T04:02:11.102Z","emptyReason":null},"description":"通过 Flyelep API 生成电商产品主图、详情图海报和白底主图，支持异步（提交后轮询）与同步（一次请求出图）两种模式。 当用户要求生成产品图、电商海报、Amazon 商品图、详情页图片、白底图、白底主图、纯白背景产品图时使用此技能。 Skill: generate-poster Owner: flyelepai Summary: 通过 Flyelep API 生成电商产品主图、详情图海报和白底主图，支持异步（提交后轮询）与同步（一次请求出图）两种模式。 当用户要求生成产品图、电商海报、Amazon 商品图、详情页图片、白底图、白底主图、纯白背景产品图时使用此技能。 Tags: latest:1.0.2 Version history: v1.0.2 | 2026-08-28T03:17:09.324Z | user **Summary: 支持同步出图模式，更新参数联动逻辑与默认值，推荐参数写法统一使用 Header 鉴权。** - 新增同步接口 /generate 和 /whiteBgMainImgGen 支持“一次请求出图”场景（连接可挂至15分钟返回图片 URL），参数与异步接口一致，选用由用户需求明确指定。 - 鉴权方式简化：所有接口均支持 secre","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s175rfkzzv81fcfhp65sjggxa984fmry:flyelep-generate-poster","sourceUrl":"https://clawhub.ai/flyelepai/flyelep-generate-poster","homepage":"https://clawhub.ai/flyelepai/skills/flyelep-generate-poster","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/flyelepai/flyelep-generate-poster","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/flyelepai/skills/flyelep-generate-poster","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":61,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"通过 Flyelep API 生成电商产品主图、详情图海报和白底主图，支持异步（提交后轮询）与同步（一次请求出图）两种模式。 当用户要求生成产品图、电商海报、Amazon 商品图、详情页图片、白底图、白底主图、纯白背景产品图时使用此技能。 Skill: generate-poster Owner: flyelepai "},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T04:02:11.102Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T04:02:11.102Z","emptyReason":null},"stars":null,"forks":null,"downloads":1166,"packageName":null,"latestVersion":"1.0.2","tractionLabel":"1.2K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T04:02:11.035Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T04:02:11.102Z","lastCrawledAt":"2026-10-11T04:02:11.035Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T04:02:11.035Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.2","createdAt":"2026-08-28T03:17:09.324Z","changelog":"**Summary: 支持同步出图模式，更新参数联动逻辑与默认值，推荐参数写法统一使用 Header 鉴权。** - 新增同步接口 /generate 和 /whiteBgMainImgGen 支持“一次请求出图”场景（连接可挂至15分钟返回图片 URL），参数与异步接口一致，选用由用户需求明确指定。 - 鉴权方式简化：所有接口均支持 secretKey 放 Header，无需区分 generateType，推荐统一写在 Header，去除了“101需双传”的旧规则。 - 参数联动新逻辑：platformType 自动推导 posterType、languageType，国内平台默认 posterType=6、languageType=中文简体，跨境平台为 posterType=5、languageType=英文；默认模型为 modelEdition=9，默认通道为 channel=promotion，均需显式传参。 - 同步接口响应格式变化：直接返回分号分隔的字符串，需按“是否 http 开头”过滤有效","fileCount":3,"zipByteSize":10585},{"version":"1.0.1","createdAt":"2026-08-07T06:14:14.236Z","changelog":"v1.0.1 - Migrated to Flyelep API的异步接口，生成流程采用任务提交与轮询查询，显著提升兼容性和生图成功率 - 新增对“白底主图”类型（generateType=101）的支持，适配纯白背景电商图等常用场景 - 认证与参数逻辑细化：白底主图需同时在 Header 与 Body 传递密钥，其他类型区分认证方式 - 更新请求和响应格式，明确异步任务管理方式与图片获取流程 - 调用流程和Shell示例详尽补充，涵盖 Windows/macOS/Linux 全平台最佳实践 - 技能说明内置参数表与适用场景列表，推荐在执行前由用户确认关键字段","fileCount":3,"zipByteSize":6407},{"version":"1.0.0","createdAt":"2026-04-20T09:58:19.376Z","changelog":"- Initial release of the \"generate-poster\" skill for creating e-commerce product posters and detail images via the Flyelep API. - Supports both cross-border and Chinese e-commerce platforms (e.g., Amazon, 淘宝) with multiple languages and poster types. - Allows detailed customization with various parameters, including reference images, text inclusion, aspect ratios, and platform-specific options. - Secure API key handling: keys are transmitted in the JSON body as required by the Flyelep API. - Comprehensive documentation included for API usage, parameter mapping, error handling, and usage examples.","fileCount":3,"zipByteSize":4197}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s175rfkzzv81fcfhp65sjggxa984fmry:flyelep-generate-poster","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-flyelepai-flyelep-generate-poster/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-flyelepai-flyelep-generate-poster/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-flyelepai-flyelep-generate-poster/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-flyelepai-flyelep-generate-poster/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-flyelepai-flyelep-generate-poster/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-flyelepai-flyelep-generate-poster/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-11T07:41:03.261Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-flyelepai-flyelep-generate-poster/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-flyelepai-flyelep-generate-poster/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-flyelepai-flyelep-generate-poster/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-flyelepai-flyelep-generate-poster/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-11T04:02:11.102Z","emptyReason":null},"readme":"Skill: generate-poster\n\nOwner: flyelepai\n\nSummary: 通过 Flyelep API 生成电商产品主图、详情图海报和白底主图，支持异步（提交后轮询）与同步（一次请求出图）两种模式。 当用户要求生成产品图、电商海报、Amazon 商品图、详情页图片、白底图、白底主图、纯白背景产品图时使用此技能。\n\nTags: latest:1.0.2\n\nVersion history:\n\nv1.0.2 | 2026-08-28T03:17:09.324Z | user\n\n**Summary: 支持同步出图模式，更新参数联动逻辑与默认值，推荐参数写法统一使用 Header 鉴权。**\n\n- 新增同步接口 /generate 和 /whiteBgMainImgGen 支持“一次请求出图”场景（连接可挂至15分钟返回图片 URL），参数与异步接口一致，选用由用户需求明确指定。\n- 鉴权方式简化：所有接口均支持 secretKey 放 Header，无需区分 generateType，推荐统一写在 Header，去除了“101需双传”的旧规则。\n- 参数联动新逻辑：platformType 自动推导 posterType、languageType，国内平台默认 posterType=6、languageType=中文简体，跨境平台为 posterType=5、languageType=英文；默认模型为 modelEdition=9，默认通道为 channel=promotion，均需显式传参。\n- 同步接口响应格式变化：直接返回分号分隔的字符串，需按“是否 http 开头”过滤有效\n\nv1.0.1 | 2026-08-07T06:14:14.236Z | user\n\nv1.0.1\n\n- Migrated to Flyelep API的异步接口，生成流程采用任务提交与轮询查询，显著提升兼容性和生图成功率\n- 新增对“白底主图”类型（generateType=101）的支持，适配纯白背景电商图等常用场景\n- 认证与参数逻辑细化：白底主图需同时在 Header 与 Body 传递密钥，其他类型区分认证方式\n- 更新请求和响应格式，明确异步任务管理方式与图片获取流程\n- 调用流程和Shell示例详尽补充，涵盖 Windows/macOS/Linux 全平台最佳实践\n- 技能说明内置参数表与适用场景列表，推荐在执行前由用户确认关键字段\n\nv1.0.0 | 2026-04-20T09:58:19.376Z | user\n\n- Initial release of the \"generate-poster\" skill for creating e-commerce product posters and detail images via the Flyelep API.\n- Supports both cross-border and Chinese e-commerce platforms (e.g., Amazon, 淘宝) with multiple languages and poster types.\n- Allows detailed customization with various parameters, including reference images, text inclusion, aspect ratios, and platform-specific options.\n- Secure API key handling: keys are transmitted in the JSON body as required by the Flyelep API.\n- Comprehensive documentation included for API usage, parameter mapping, error handling, and usage examples.\n\nArchive index:\n\nArchive v1.0.2: 3 files, 10585 bytes\n\nFiles: skill-card.md (2623b), SKILL.md (35351b), _meta.json (142b)\n\nFile v1.0.2:SKILL.md\n\n---\nname: generate-poster\ndescription: >-\n  通过 Flyelep API 生成电商产品主图、详情图海报和白底主图，支持异步（提交后轮询）与同步（一次请求出图）两种模式。\n  当用户要求生成产品图、电商海报、Amazon 商品图、详情页图片、白底图、白底主图、纯白背景产品图时使用此技能。\n---\n# Flyelep 电商海报生图\n通过 Flyelep AI API 生成电商产品主图、详情图海报和白底主图，支持异步与同步两种模式。\n\n**重要：这是一个 HTTP API 调用技能。必须通过 HTTP POST 请求调用 API 接口，禁止通过浏览器访问 Flyelep 网站。**\n\n## 两种调用模式\n\n| 模式 | 入口 | 返回 | 适用场景 |\n|------|------|------|----------|\n| 异步（推荐） | `/generateAsync` | 立即返回任务 ID，再轮询 `/queryTaskResult` | 绝大多数场景，尤其是多张详情图 |\n| 同步 | `/generate`、`/whiteBgMainImgGen` | 一次请求内挂住连接直到出图，直接返回图片结果 | 只出 1 张图、且调用方不方便实现轮询时 |\n\n两种模式的请求参数完全一致，共用同一套排队与计费逻辑，差别只在于结果怎么拿。\n\n**默认用异步模式**。同步模式的连接要挂最长 15 分钟，容易被中间的网关、代理或客户端超时切断，而且它**不返回任务 ID**，一旦连接断开就无法再查回这次生成的结果。只有用户明确要求\"一次请求拿到图\"时才用同步。\n\n## API 接口信息\n\n### 创建任务（异步，推荐）\n\n- **URL**: `POST https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync`\n- **Content-Type**: `application/json`\n- **认证方式**: `secretKey` 可放在请求 Header 或 Body 中，两者都传时以 **Header 为准**；所有 `generateType` 的规则一致\n- **超时时间**: 建议 120 秒（创建任务为瞬时操作）\n\n请求头示例：\n\n```http\nContent-Type: application/json\nsecretKey: 用户提供的API密钥\n```\n\n查询结果接口同样支持 Header 传 `secretKey`，推荐统一放在 Header 里。\n\n> **安全说明**：API 密钥仅在请求时传递给 Flyelep 服务器，不存储在技能代码中。请勿将真实的密钥直接写在示例代码中，运行时由用户动态提供。\n\n### 查询结果（仅异步模式需要）\n\n- **URL**: `POST https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult`\n- **Content-Type**: `application/json`\n- **认证方式**: 在请求 Header 中传入 `secretKey`\n- **说明**: 异步接口，需轮询获取最终图片 URL（生图耗时较长，可能需要数分钟）\n\n### 创建任务（同步）\n\n- **URL**: `POST https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generate`\n- **Content-Type**: `application/json`\n- **认证方式**: 与异步模式一致，`secretKey` 放 Header 或 Body 均可，Header 优先\n- **超时时间**: 服务端最长挂 **15 分钟**（900 秒）后返回超时失败，客户端 `--max-time` 要设到 900 秒以上，否则会自己先断开\n- **说明**: 请求会一直挂住直到生成完成，响应里直接带图片结果，**不返回任务 ID**\n\n白底主图另有一个语义化的同步入口：\n\n- **URL**: `POST https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/whiteBgMainImgGen`\n- **说明**: 等价于 `/generate` + `generateType=101`，服务端会强制把 `generateType` 置为 `101`，因此 body 里传不传 `generateType` 都一样。其余参数、鉴权、超时与 `/generate` 完全相同\n\n## 请求 Body\n\n以下 Body 结构对异步（`/generateAsync`）和同步（`/generate`、`/whiteBgMainImgGen`）都适用。\n\n### generateType=100/200（产品单图/详情图）\n\n```json\n{\n  \"query\": \"生图需求描述，最多1000个字符\",\n  \"generateType\": 200,\n  \"posterType\": 5,\n  \"platformType\": \"amazon\",\n  \"languageType\": \"英文\",\n  \"detailPictureNumber\": 10,\n  \"modelEdition\": 9,\n  \"channel\": \"promotion\",\n  \"needText\": true,\n  \"secretKey\": \"用户提供的API密钥\",\n  \"fileUrlList\": [\"https://example.com/product.png\"],\n  \"aspectRatio\": \"1:1\"\n}\n```\n\n### generateType=101（白底主图）\n\n> **注意**：白底主图不需要 `platformType`、`languageType`、`needText` 参数。\n\n```json\n{\n  \"query\": \"生成白底主图的需求描述，最多1000个字符\",\n  \"generateType\": 101,\n  \"posterType\": 5,\n  \"detailPictureNumber\": 1,\n  \"modelEdition\": 9,\n  \"channel\": \"promotion\",\n  \"secretKey\": \"用户提供的API密钥\",\n  \"fileUrlList\": [\"https://example.com/product.png\"],\n  \"aspectRatio\": \"1:1\"\n}\n```\n\n### 查询结果\n\n```json\n{\n  \"agentGenerateTaskId\": \"创建任务返回的任务ID\"\n}\n```\n\n## 响应格式\n\n### 创建任务响应（异步模式）\n\n```json\n{\n  \"code\": 200,\n  \"data\": \"20374084144913*****\"\n}\n```\n\n`data` 为异步任务 ID，用于后续轮询获取结果。\n\n### 创建任务响应（同步模式）\n\n```json\n{\n  \"code\": 200,\n  \"data\": \"https://xxx.com/image1.png;https://xxx.com/image2.png;\"\n}\n```\n\n- 同步模式的 `data` 是**一个字符串**，不是任务 ID，也不是数组\n- 服务端把工作流逐段输出的内容用英文分号 `;` 拼接后返回，末尾可能带一个多余的 `;`\n- 拿到后按 `;` 拆分、丢掉空片段，再从片段中取出图片 URL 展示给用户\n- 内容由工作流决定，可能夹带非 URL 的文本片段，因此要按\"是否以 `http` 开头\"过滤，不要假设每一段都是图片\n- 失败时 `code` 非 200，原因在 `msg` 里，例如 `当前并发请求过多，请稍后重试`、`任务执行超时，请稍后重试`、`任务执行失败: xxx`\n\n### 查询结果响应\n\n```json\n{\n  \"code\": 200,\n  \"data\": {\n    \"taskList\": [\n      {\n        \"taskStatus\": 2,\n        \"executeResult\": \"https://xxx.com/image1.png\"\n      },\n      {\n        \"taskStatus\": 2,\n        \"executeResult\": \"https://xxx.com/image2.png\"\n      }\n    ]\n  }\n}\n```\n\n- `taskStatus`: 0-待生成，1-生成中，2-生成成功，3-生成失败\n- `executeResult` 为生成的图片 URL\n- 将成功的图片逐个展示给用户，不要回读图片内容\n\n## 参数说明\n\n### 必传参数\n\n> **重要**：以下必传参数必须通过询问用户获取，agent 不可自行填写。调用本技能时，应先向用户列出必传参数与可选参数表格，由用户确认或提供后再执行。\n\n| 字段 | 默认值 | 说明 |\n|------|--------|------|\n| query | - | 生图需求描述，最多1000个字符 |\n| generateType | 200 | 100=产品单图，101=白底主图，200=产品详情图 |\n| posterType | 由平台推导 | 5=跨境电商，6=中文电商。见「平台联动规则」 |\n| platformType | amazon | 电商平台（见下方映射表）。**generateType=101 时不需要** |\n| languageType | 由平台推导 | 生成图片上的文案语种：中文平台默认 `中文简体`，跨境平台默认 `英文`。**generateType=101 时不需要** |\n| detailPictureNumber | 10 | 产品单图限1张；详情图可选5、10、15张 |\n| modelEdition | 9 | 模型类型：2=Flyelep 2.0，3=Flyelep 3.0，9=Flyelep Image 2（默认） |\n| needText | true | 图片上是否包含文案。**generateType=101 时不需要** |\n| secretKey | - | API 密钥，放在 Header 或 Body 中均可，Header 优先 |\n\n### 可选参数\n\n| 字段 | 默认值 | 说明 |\n|------|--------|------|\n| fileUrlList | - | 参考图片 URL 数组，最多6张 |\n| aspectRatio | 随机 | 图片比例：1:1、3:2、2:3、3:4、4:3、4:5、5:4、9:16、16:9、21:9 |\n| channel | `promotion` | 特惠通道（`promotion`，默认）/尊享通道（`premium`）。特惠通道仅支持 `modelEdition` 为 `3` 或 `9` |\n\n### 参数映射规则\n\n#### 平台联动规则（先定平台，再推导 posterType 和 languageType）\n\n用户提到平台名后，`posterType` 和 `languageType` 都由平台推导，不要再反过来问用户，也不要一律套用跨境的英文默认值：\n\n| 用户提到的平台 | platformType | posterType | languageType 默认值 |\n|----------------|--------------|------------|---------------------|\n| 淘宝、天猫、京东、拼多多、1688、小红书、抖音（国内） | 对应中文平台名 | 6 | `中文简体` |\n| Amazon、Temu、Shopee、TikTok Shop、AliExpress、OZON、eBay、Lazada、Wish 等 | 对应英文平台名 | 5 | `英文` |\n\n- 用户明确指定了语种（例如\"淘宝的图但文案用英文\"、\"Amazon 日语版\"）时，以用户指定的为准，`posterType` 仍按平台归属决定\n- 用户只说\"电商图\"没提平台时，才需要询问目标平台；询问时按中文电商 / 跨境电商两类给选项\n- 用户用中文描述需求但指定了跨境平台，不等于要中文文案，仍默认 `英文`\n\n#### platformType（电商平台）\n- 跨境电商：`amazon`、`Temu`、`Shopee`、`TikTok Shop`、`AliExpress`、`OZON`\n- 中文电商：`淘宝`、`京东`、`拼多多`、`1688`、`小红书`\n\n#### languageType（文案语种）\n- 跨境：英文（默认）、俄语、日语、韩语、阿拉伯语、德语、西班牙语、法语、泰语、马来语、越南语、葡萄牙语、菲律宾语、印尼语、意大利语、荷兰语、波兰语、中文繁体\n- 中文：中文简体（中文平台默认）\n\n#### posterType（海报类型）\n根据市场区域选择：\n- 跨境电商 → `posterType=5`，语种默认 `英文`\n- 中文电商 → `posterType=6`，语种默认 `中文简体`\n\n#### aspectRatio（图片比例）\n- 正方形：`1:1`\n- 横版：`3:2`、`4:3`、`16:9`、`21:9`\n- 竖版：`2:3`、`3:4`、`4:5`、`5:4`、`9:16`\n- 未提及比例 → 不传此字段（API 自动随机选择）\n\n#### detailPictureNumber（图片数量）\n- 产品单图（`generateType=100`）：固定为 `1`\n- 白底主图（`generateType=101`）：白底单图固定为 `1`，白底详情图可选 `5`、`10` 或 `15`\n- 产品详情图（`generateType=200`）：`5`、`10` 或 `15`\n\n#### fileUrlList（参考图片）\n- 数组格式，最多6张\n- 每个链接都应为公网可访问的图片直链\n- 如果用户提供本地文件路径，先按「本地文件上传」章节换取公网直链，再填入此参数\n\n#### modelEdition（模型类型）\n- `2`：Flyelep 2.0（`posterType=5` 时为 gemini-2.5，`posterType=6` 时为 doubao-seedream）\n- `3`：Flyelep 3.0（gemini-3.1），服务端在不传此字段时的兜底值\n- `9`：Flyelep Image 2，**本技能的默认模型**\n- 用户未指定模型时一律显式传 `\"modelEdition\": 9`，不要省略该字段——省略会被服务端按 `3` 处理，与本技能的默认不一致\n\n#### channel（通道）\n- `promotion`：特惠通道，**本技能的默认通道**，线路更经济，**仅支持 `modelEdition` 为 `3`（Flyelep 3.0）或 `9`（Flyelep Image 2）**\n- `premium`：尊享通道，官方专线，支持全部模型\n\n**默认规则：用户没有指定通道时，一律显式传 `\"channel\": \"promotion\"`。** 默认模型 `modelEdition=9`（Flyelep Image 2）在特惠通道的支持范围内，两者可以直接组合。\n\n只有这两种情况才传 `premium`：\n\n- 用户明确要求走尊享通道\n- 本次要用 `modelEdition=2`（Flyelep 2.0），特惠通道不支持该模型\n\n**显式传 `promotion` 又搭配 `modelEdition=2` 时，接口会直接报错拒绝，不会自动降级**，所以选模型和选通道必须一起决定：一旦用户要求 Flyelep 2.0，通道就要跟着改成 `premium`。\n\n> 完全不传 `channel` 时，服务端也是按特惠通道处理，并且在模型不支持特惠时自动回落尊享。但显式传值能让通道和计费可预期，因此按上面的规则明确传入，不要依赖服务端兜底。\n\n## 异步任务流程\n\n> **重要**：走 `generateAsync` 时必须**先调用主接口获取 `agentGenerateTaskId`，然后调用 `queryTaskResult` 接口轮询任务结果**，不能省略轮询步骤。\n\n1. 调用主接口（`generateAsync`）提交任务，从响应中获取 `agentGenerateTaskId`\n2. 使用 `agentGenerateTaskId` 调用 `queryTaskResult` 接口轮询任务结果（建议每 5-10 秒查询一次）\n3. 当 `taskStatus=2` 时，表示生成成功，获取 `executeResult` 结果\n4. 当 `taskStatus=3` 时，表示生成失败\n\n## 同步任务流程\n\n1. 调用 `/generate`（白底主图可用 `/whiteBgMainImgGen`），Body 与异步模式完全一致\n2. 把客户端超时设到 900 秒以上，请求会一直挂住等出图，中途没有任何进度反馈\n3. 响应返回后先看 `code`：非 200 时按 `msg` 处理，不要把 `msg` 当成图片结果\n4. `code=200` 时把 `data` 按英文分号 `;` 拆分，过滤掉空片段和非 `http` 开头的片段，剩下的就是图片 URL\n5. 逐个展示图片 URL 给用户\n\n> **连接断开就拿不回结果**：同步接口不返回任务 ID，客户端超时、网关断连或进程退出后，这次生成的结果无法再查询（算力照常扣除）。需要可靠拿到结果时改用异步模式。\n\n## 本地文件上传\n\n用户提供的是本地文件路径而不是公网直链时，先把文件上传换取直链，再调用本接口。已安装 `file-upload` 技能时以该技能为准；未安装时按下面的说明直接调用上传接口。\n\n- **URL**: `POST https://www.flyelep.cn/prod-api/poster-design/api/v1/file/upload`\n- **请求方式**: `multipart/form-data`，文件字段名固定为 `file`，单次只能上传一个文件，多个文件并发调用多次\n- **认证方式**: 请求头传 `secretKey`，与本技能使用同一个密钥\n- **超时时间**: 图片建议 60-120 秒\n- **不要手动设置 `Content-Type` 请求头**，让 HTTP 客户端自动生成带 boundary 的值，手写会导致服务端解析失败\n- 图片仅支持 `bmp`、`gif`、`jpg`、`jpeg`、`png`，`webp` 需先转成 `png` 或 `jpg`；文件名必须带正确后缀，服务端靠它判断格式\n- 原文件名不会出现在 URL 里，中文名、空格、特殊字符都能直接上传，不需要提前改名\n- 上传不消耗算力，但服务端不做去重：同一个文件在一次任务里只上传一次，记下 `fullPath` 复用\n\n成功响应取 `data.fullPath` 作为公网直链，永久有效、不带签名：\n\n```json\n{\n  \"code\": 200,\n  \"msg\": null,\n  \"data\": {\n    \"relativePath\": \"cos_ai_agent/2026-08-11/3f2a9c1b7d84e6f5a012.png\",\n    \"fullPath\": \"https://agent-1404002717.cos.ap-guangzhou.myqcloud.com/cos_ai_agent/2026-08-11/3f2a9c1b7d84e6f5a012.png\",\n    \"serviceProvider\": null\n  }\n}\n```\n\n判断成功只看 `code`，业务失败时 HTTP 状态码仍是 200，`code` 为 500 或 9999，原因在 `msg` 里。\n\n```bash\n# Windows/PowerShell（用 curl.exe，PowerShell 里的 curl 是 Invoke-WebRequest 的别名）\ncurl.exe -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/file/upload\" -H \"secretKey: 你的密钥\" --max-time 120 -F \"file=@C:/path/to/product.png\"\n\n# macOS/Linux\ncurl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/file/upload\" -H \"secretKey: 你的密钥\" --max-time 120 -F \"file=@./product.png\"\n```\n\n图片入桶前会先过内容审核，审核不通过整个请求失败，需换图重试。拿到 `code=9999`、`msg` 为 `服务繁忙，请稍后再试` 时，先自查三项：是否漏了 `secretKey` 请求头、表单字段名是否为 `file`、文件是否超出服务端体积上限。密钥、格式、审核、体积类错误重试无效，只有网络超时、5xx 和存储类异常值得重试。\n\n## 调用示例\n\n> **跨平台调用说明**：\n> - 请求头必须包含 `Content-Type: application/json; charset=utf-8` 和 `secretKey`\n> - **Windows/PowerShell**：因 GBK 编码问题，必须先将 JSON 写入临时文件 `payload_temp.json`（UTF-8 无 BOM），再用 `curl.exe --% --data-binary @payload_temp.json` 发送请求。使用 Write 工具创建文件，或用 .NET API `[System.IO.File]::WriteAllText(\"payload_temp.json\", $json, [System.Text.UTF8Encoding]::new($false))`。调用后用 `rm payload_temp.json` 清理。\n> - **macOS/Linux**：bash/zsh 默认 UTF-8，可直接内联 JSON：`curl -X POST URL -H \"Content-Type: application/json; charset=utf-8\" --data-binary 'JSON单行内容'`（按需追加 `-H \"secretKey: 你的密钥\"`）\n\n### 示例 1：生成产品主图（跨境电商，Amazon）\n\n#### 步骤 1：创建任务\n\n**Windows/PowerShell**：\n\n创建 `payload_temp.json`（两种方式任选其一）：\n\n方式 A（使用 Write 工具）：\n```json\n{\n  \"query\": \"为这个蓝牙耳机生成一张产品主图\",\n  \"generateType\": 100,\n  \"posterType\": 5,\n  \"platformType\": \"Amazon\",\n  \"languageType\": \"英文\",\n  \"detailPictureNumber\": 1,\n  \"modelEdition\": 9,\n  \"channel\": \"promotion\",\n  \"needText\": true,\n  \"secretKey\": \"你的密钥\"\n}\n```\n\n方式 B（无 Write 工具，PowerShell 执行）：\n```powershell\n[System.IO.File]::WriteAllText(\"payload_temp.json\", '{\"query\":\"为这个蓝牙耳机生成一张白底产品主图\",\"generateType\":100,\"posterType\":5,\"platformType\":\"Amazon\",\"languageType\":\"英文\",\"detailPictureNumber\":1,\"modelEdition\":9,\"channel\":\"promotion\",\"needText\":true,\"secretKey\":\"你的密钥\"}', [System.Text.UTF8Encoding]::new($false))\n```\n\n执行请求：\n```bash\ncurl.exe --% -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync\" -H \"Content-Type: application/json; charset=utf-8\" --max-time 120 --data-binary @payload_temp.json\n```\n\n清理临时文件：\n```bash\nrm payload_temp.json\n```\n\n**macOS/Linux**：\n```bash\ncurl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync\" -H \"Content-Type: application/json; charset=utf-8\" --max-time 120 --data-binary '{\"query\":\"为这个蓝牙耳机生成一张白底产品主图\",\"generateType\":100,\"posterType\":5,\"platformType\":\"Amazon\",\"languageType\":\"英文\",\"detailPictureNumber\":1,\"modelEdition\":9,\"channel\":\"promotion\",\"needText\":true,\"secretKey\":\"你的密钥\"}'\n```\n\n#### 步骤 2：查询任务结果\n\n**Windows/PowerShell**：\n\n创建 `payload_temp.json`（两种方式任选其一）：\n\n方式 A（使用 Write 工具）：\n```json\n{\n  \"agentGenerateTaskId\": \"上一步返回的任务ID\"\n}\n```\n\n方式 B（无 Write 工具，PowerShell 执行）：\n```powershell\n[System.IO.File]::WriteAllText(\"payload_temp.json\", '{\"agentGenerateTaskId\":\"上一步返回的任务ID\"}', [System.Text.UTF8Encoding]::new($false))\n```\n\n执行请求：\n```bash\ncurl.exe --% -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 30 --data-binary @payload_temp.json\n```\n\n清理临时文件：\n```bash\nrm payload_temp.json\n```\n\n**macOS/Linux**：\n```bash\ncurl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 30 --data-binary '{\"agentGenerateTaskId\":\"上一步返回的任务ID\"}'\n```\n\n#### 步骤 3：处理结果\n\n轮询查询直到 `taskStatus=2`（生成成功），提取 `executeResult` 中的图片 URL 展示给用户。\n\n### 示例 2：生成产品详情图（带参考图）\n\n**前置步骤**：向用户索取图片路径或 URL。如用户提供本地文件，先按「本地文件上传」章节换取公网直链。\n\n#### 步骤 1：创建任务\n\n**Windows/PowerShell**：\n\n创建 `payload_temp.json`（两种方式任选其一）：\n\n方式 A（使用 Write 工具）：\n```json\n{\n  \"query\": \"根据上传的图片生成对应的产品图\",\n  \"generateType\": 200,\n  \"posterType\": 5,\n  \"platformType\": \"Amazon\",\n  \"languageType\": \"英文\",\n  \"detailPictureNumber\": 5,\n  \"modelEdition\": 9,\n  \"channel\": \"promotion\",\n  \"needText\": true,\n  \"secretKey\": \"你的密钥\",\n  \"fileUrlList\": [\"https://example.com/product1.png\", \"https://example.com/product2.png\"],\n  \"aspectRatio\": \"1:1\"\n}\n```\n\n方式 B（无 Write 工具，PowerShell 执行）：\n```powershell\n[System.IO.File]::WriteAllText(\"payload_temp.json\", '{\"query\":\"根据上传的图片生成对应的产品图\",\"generateType\":200,\"posterType\":5,\"platformType\":\"Amazon\",\"languageType\":\"英文\",\"detailPictureNumber\":5,\"modelEdition\":9,\"channel\":\"promotion\",\"needText\":true,\"secretKey\":\"你的密钥\",\"fileUrlList\":[\"https://example.com/product1.png\",\"https://example.com/product2.png\"],\"aspectRatio\":\"1:1\"}', [System.Text.UTF8Encoding]::new($false))\n```\n\n执行请求：\n```bash\ncurl.exe --% -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync\" -H \"Content-Type: application/json; charset=utf-8\" --max-time 120 --data-binary @payload_temp.json\n```\n\n清理临时文件：\n```bash\nrm payload_temp.json\n```\n\n**macOS/Linux**：\n```bash\ncurl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync\" -H \"Content-Type: application/json; charset=utf-8\" --max-time 120 --data-binary '{\"query\":\"根据上传的图片生成对应的产品图\",\"generateType\":200,\"posterType\":5,\"platformType\":\"Amazon\",\"languageType\":\"英文\",\"detailPictureNumber\":5,\"modelEdition\":9,\"channel\":\"promotion\",\"needText\":true,\"secretKey\":\"你的密钥\",\"fileUrlList\":[\"https://example.com/product1.png\",\"https://example.com/product2.png\"],\"aspectRatio\":\"1:1\"}'\n```\n\n#### 步骤 2：查询任务结果\n\n**Windows/PowerShell**：\n\n创建 `payload_temp.json`（两种方式任选其一）：\n\n方式 A（使用 Write 工具）：\n```json\n{\n  \"agentGenerateTaskId\": \"上一步返回的任务ID\"\n}\n```\n\n方式 B（无 Write 工具，PowerShell 执行）：\n```powershell\n[System.IO.File]::WriteAllText(\"payload_temp.json\", '{\"agentGenerateTaskId\":\"上一步返回的任务ID\"}', [System.Text.UTF8Encoding]::new($false))\n```\n\n执行请求：\n```bash\ncurl.exe --% -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 30 --data-binary @payload_temp.json\n```\n\n清理临时文件：\n```bash\nrm payload_temp.json\n```\n\n**macOS/Linux**：\n```bash\ncurl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 30 --data-binary '{\"agentGenerateTaskId\":\"上一步返回的任务ID\"}'\n```\n\n#### 步骤 3：处理结果\n\n轮询查询直到 `taskStatus=2`（生成成功），提取 `executeResult` 中的图片 URL 展示给用户。\n\n### 示例 3：中文电商主图（淘宝，中文简体）\n\n#### 步骤 1：创建任务\n\n**Windows/PowerShell**：\n\n创建 `payload_temp.json`（两种方式任选其一）：\n\n方式 A（使用 Write 工具）：\n```json\n{\n  \"query\": \"为这款智能手表生成一张电商主图，突出科技感\",\n  \"generateType\": 100,\n  \"posterType\": 6,\n  \"platformType\": \"淘宝\",\n  \"languageType\": \"中文简体\",\n  \"detailPictureNumber\": 1,\n  \"modelEdition\": 9,\n  \"channel\": \"promotion\",\n  \"needText\": true,\n  \"secretKey\": \"你的密钥\",\n  \"aspectRatio\": \"1:1\"\n}\n```\n\n方式 B（无 Write 工具，PowerShell 执行）：\n```powershell\n[System.IO.File]::WriteAllText(\"payload_temp.json\", '{\"query\":\"为这款智能手表生成一张电商主图，突出科技感\",\"generateType\":100,\"posterType\":6,\"platformType\":\"淘宝\",\"languageType\":\"中文简体\",\"detailPictureNumber\":1,\"modelEdition\":9,\"channel\":\"promotion\",\"needText\":true,\"secretKey\":\"你的密钥\",\"aspectRatio\":\"1:1\"}', [System.Text.UTF8Encoding]::new($false))\n```\n\n执行请求：\n```bash\ncurl.exe --% -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync\" -H \"Content-Type: application/json; charset=utf-8\" --max-time 120 --data-binary @payload_temp.json\n```\n\n清理临时文件：\n```bash\nrm payload_temp.json\n```\n\n**macOS/Linux**：\n```bash\ncurl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync\" -H \"Content-Type: application/json; charset=utf-8\" --max-time 120 --data-binary '{\"query\":\"为这款智能手表生成一张电商主图，突出科技感\",\"generateType\":100,\"posterType\":6,\"platformType\":\"淘宝\",\"languageType\":\"中文简体\",\"detailPictureNumber\":1,\"modelEdition\":9,\"channel\":\"promotion\",\"needText\":true,\"secretKey\":\"你的密钥\",\"aspectRatio\":\"1:1\"}'\n```\n\n#### 步骤 2：查询任务结果\n\n**Windows/PowerShell**：\n\n创建 `payload_temp.json`（两种方式任选其一）：\n\n方式 A（使用 Write 工具）：\n```json\n{\n  \"agentGenerateTaskId\": \"上一步返回的任务ID\"\n}\n```\n\n方式 B（无 Write 工具，PowerShell 执行）：\n```powershell\n[System.IO.File]::WriteAllText(\"payload_temp.json\", '{\"agentGenerateTaskId\":\"上一步返回的任务ID\"}', [System.Text.UTF8Encoding]::new($false))\n```\n\n执行请求：\n```bash\ncurl.exe --% -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 30 --data-binary @payload_temp.json\n```\n\n清理临时文件：\n```bash\nrm payload_temp.json\n```\n\n**macOS/Linux**：\n```bash\ncurl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 30 --data-binary '{\"agentGenerateTaskId\":\"上一步返回的任务ID\"}'\n```\n\n#### 步骤 3：处理结果\n\n轮询查询直到 `taskStatus=2`（生成成功），提取 `executeResult` 中的图片 URL 展示给用户。\n\n### 示例 4：生成白底主图（generateType=101）\n\n> **注意**：白底主图不需要 `platformType`、`languageType`、`needText` 参数。\n\n**前置步骤**：向用户索取图片路径或 URL。如用户提供本地文件，先按「本地文件上传」章节换取公网直链。\n\n#### 步骤 1：创建任务\n\n**Windows/PowerShell**：\n\n创建 `payload_temp.json`（无 platformType/languageType/needText，两种方式任选其一）：\n\n方式 A（使用 Write 工具）：\n```json\n{\n  \"query\": \"生成一张蓝牙耳机白底产品主图，产品居中，背景纯白\",\n  \"generateType\": 101,\n  \"posterType\": 5,\n  \"detailPictureNumber\": 1,\n  \"modelEdition\": 9,\n  \"channel\": \"promotion\",\n  \"secretKey\": \"你的密钥\",\n  \"aspectRatio\": \"1:1\"\n}\n```\n\n方式 B（无 Write 工具，PowerShell 执行）：\n```powershell\n[System.IO.File]::WriteAllText(\"payload_temp.json\", '{\"query\":\"生成一张蓝牙耳机白底产品主图，产品居中，背景纯白\",\"generateType\":101,\"posterType\":5,\"detailPictureNumber\":1,\"modelEdition\":9,\"channel\":\"promotion\",\"secretKey\":\"你的密钥\",\"aspectRatio\":\"1:1\"}', [System.Text.UTF8Encoding]::new($false))\n```\n\n执行请求：\n```bash\ncurl.exe --% -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 120 --data-binary @payload_temp.json\n```\n\n清理临时文件：\n```bash\nrm payload_temp.json\n```\n\n**macOS/Linux**：\n```bash\ncurl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 120 --data-binary '{\"query\":\"生成一张蓝牙耳机白底产品主图，产品居中，背景纯白\",\"generateType\":101,\"posterType\":5,\"detailPictureNumber\":1,\"modelEdition\":9,\"channel\":\"promotion\",\"secretKey\":\"你的密钥\",\"aspectRatio\":\"1:1\"}'\n```\n\n#### 步骤 2：查询任务结果\n\n**Windows/PowerShell**：\n\n创建 `payload_temp.json`（两种方式任选其一）：\n\n方式 A（使用 Write 工具）：\n```json\n{\n  \"agentGenerateTaskId\": \"上一步返回的任务ID\"\n}\n```\n\n方式 B（无 Write 工具，PowerShell 执行）：\n```powershell\n[System.IO.File]::WriteAllText(\"payload_temp.json\", '{\"agentGenerateTaskId\":\"上一步返回的任务ID\"}', [System.Text.UTF8Encoding]::new($false))\n```\n\n执行请求（secretKey 在 Header 中）：\n```bash\ncurl.exe --% -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 30 --data-binary @payload_temp.json\n```\n\n清理临时文件：\n```bash\nrm payload_temp.json\n```\n\n**macOS/Linux**：\n```bash\ncurl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 30 --data-binary '{\"agentGenerateTaskId\":\"上一步返回的任务ID\"}'\n```\n\n#### 步骤 3：处理结果\n\n轮询查询直到 `taskStatus=2`（生成成功），提取 `executeResult` 中的图片 URL 展示给用户。\n\n### 示例 5：同步模式生成产品主图（一次请求拿到图）\n\n> **注意**：同步模式一个请求就返回图片，不需要查询步骤，但必须把超时设到 900 秒以上。\n\n**Windows/PowerShell**：\n\n创建 `payload_temp.json`（两种方式任选其一）：\n\n方式 A（使用 Write 工具）：\n```json\n{\n  \"query\": \"为这个蓝牙耳机生成一张产品主图\",\n  \"generateType\": 100,\n  \"posterType\": 5,\n  \"platformType\": \"Amazon\",\n  \"languageType\": \"英文\",\n  \"detailPictureNumber\": 1,\n  \"modelEdition\": 9,\n  \"channel\": \"promotion\",\n  \"needText\": true,\n  \"secretKey\": \"你的密钥\"\n}\n```\n\n方式 B（无 Write 工具，PowerShell 执行）：\n```powershell\n[System.IO.File]::WriteAllText(\"payload_temp.json\", '{\"query\":\"为这个蓝牙耳机生成一张产品主图\",\"generateType\":100,\"posterType\":5,\"platformType\":\"Amazon\",\"languageType\":\"英文\",\"detailPictureNumber\":1,\"modelEdition\":9,\"channel\":\"promotion\",\"needText\":true,\"secretKey\":\"你的密钥\"}', [System.Text.UTF8Encoding]::new($false))\n```\n\n执行请求（`--max-time 960` 留出比服务端 900 秒更长的余量）：\n```bash\ncurl.exe --% -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generate\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 960 --data-binary @payload_temp.json\n```\n\n清理临时文件：\n```bash\nrm payload_temp.json\n```\n\n**macOS/Linux**：\n```bash\ncurl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generate\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 960 --data-binary '{\"query\":\"为这个蓝牙耳机生成一张产品主图\",\"generateType\":100,\"posterType\":5,\"platformType\":\"Amazon\",\"languageType\":\"英文\",\"detailPictureNumber\":1,\"modelEdition\":9,\"channel\":\"promotion\",\"needText\":true,\"secretKey\":\"你的密钥\"}'\n```\n\n处理结果：把 `data` 按 `;` 拆分，取出以 `http` 开头的片段作为图片 URL 展示给用户。\n\n### 示例 6：同步模式生成白底主图（whiteBgMainImgGen）\n\n> **注意**：该入口会强制 `generateType=101`，Body 中不必再传；同样不需要 `platformType`、`languageType`、`needText`。\n\n**Windows/PowerShell**：\n\n创建 `payload_temp.json`（两种方式任选其一）：\n\n方式 A（使用 Write 工具）：\n```json\n{\n  \"query\": \"生成一张蓝牙耳机白底产品主图，产品居中，背景纯白\",\n  \"posterType\": 5,\n  \"detailPictureNumber\": 1,\n  \"modelEdition\": 9,\n  \"channel\": \"promotion\",\n  \"secretKey\": \"你的密钥\",\n  \"aspectRatio\": \"1:1\"\n}\n```\n\n方式 B（无 Write 工具，PowerShell 执行）：\n```powershell\n[System.IO.File]::WriteAllText(\"payload_temp.json\", '{\"query\":\"生成一张蓝牙耳机白底产品主图，产品居中，背景纯白\",\"posterType\":5,\"detailPictureNumber\":1,\"modelEdition\":9,\"channel\":\"promotion\",\"secretKey\":\"你的密钥\",\"aspectRatio\":\"1:1\"}', [System.Text.UTF8Encoding]::new($false))\n```\n\n执行请求：\n```bash\ncurl.exe --% -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/whiteBgMainImgGen\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 960 --data-binary @payload_temp.json\n```\n\n清理临时文件：\n```bash\nrm payload_temp.json\n```\n\n**macOS/Linux**：\n```bash\ncurl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/whiteBgMainImgGen\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 960 --data-binary '{\"query\":\"生成一张蓝牙耳机白底产品主图，产品居中，背景纯白\",\"posterType\":5,\"detailPictureNumber\":1,\"modelEdition\":9,\"channel\":\"promotion\",\"secretKey\":\"你的密钥\",\"aspectRatio\":\"1:1\"}'\n```\n\n## 常见错误及解决方案\n\n| 错误 | 原因与解决 |\n|------|-----------|\n| HTTP 405 Not Allowed | URL 路径错误，确保包含 `/prod-api` 前缀 |\n| code 500 \"当前并发请求过多\" | 服务繁忙，稍后重试 |\n| HTTP 401 | 密钥无效或已过期，在 Flyelep 平台重新生成 |\n| 查询结果 taskStatus 一直为 1 | 生图任务仍在进行中，继续轮询或稍后重试 |\n| 查询结果 taskStatus 为 3 | 生图失败，检查参数是否正确或稍后重试 |\n| 描述超过1000字符 | 缩短 query 内容 |\n| 同步模式 `msg` 为 `任务执行超时，请稍后重试` | 生成超过服务端 15 分钟上限，改用异步模式或减少 `detailPictureNumber` |\n| 同步模式 `msg` 为 `任务执行失败: xxx` | 工作流执行报错，按 `xxx` 排查参数或稍后重试 |\n| 同步模式客户端先超时断开 | `--max-time` 小于服务端 900 秒上限，调大超时；结果无法找回，需重新生成 |\n| 同步模式 `data` 拆分后没有图片 URL | 工作流本次未输出图片，改用异步模式提交并用 `queryTaskResult` 确认任务状态 |\n| `生图类型不能为空` | `/generate` 与 `/generateAsync` 必须传 `generateType`；用 `/whiteBgMainImgGen` 时可不传 |\n\n## 执行流程\n\n1. **向用户询问 `secretKey`**（API 密钥必须由用户提供，agent 不可自行填写）\n2. 收集用户的生成需求并写入 `query`\n3. 确定目标平台 `platformType`，再按「平台联动规则」推导 `posterType` 与 `languageType`：中文平台（淘宝、拼多多、京东、1688、小红书等）→ `posterType=6` + `languageType=中文简体`；跨境平台（Amazon、Temu、Shopee、TikTok Shop 等）→ `posterType=5` + `languageType=英文`。用户显式指定语种时以用户为准\n4. 选择 `generateType`：100=产品单图，101=白底主图，200=产品详情图\n5. 设置参数：`detailPictureNumber`、`needText`、`aspectRatio` 等；`modelEdition` 用户未指定时显式传 `9`（Flyelep Image 2）\n6. 设置通道 `channel`：默认传 `promotion`（特惠通道）；用户要求尊享通道或需要 `modelEdition=2` 时才传 `premium`\n7. 如用户提供参考图，收集图片 URL 写入 `fileUrlList`（本地文件先按「本地文件上传」章节换取公网直链）\n8. 在请求头中传入 `secretKey`\n9. 选择调用模式：默认异步；用户明确要求\"一次请求出图\"时才用同步\n10. 异步模式：调用 `/generateAsync` 读取任务 ID → 轮询 `/queryTaskResult` 直到 `taskStatus=2` → 取 `executeResult`\n11. 同步模式：调用 `/generate`（白底主图可用 `/whiteBgMainImgGen`），超时设 900 秒以上 → 把 `data` 按 `;` 拆分取出图片 URL\n12. 将生成的图片逐个展示给用户\n\n**提示词处理：**\n- 基于参考图生成：将用户的产品描述传入 `query`，通过 `fileUrlList` 附上参考图片 URL。仅在描述明显不足时才优化\n- 无参考图生成：在 `query` 中描述产品、风格和构图\n- 保留用户的创意意图。当用户描述模糊时，根据上下文（平台、语言等）推断合理的默认值\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn7fp1zsg4nwdq826y0awapkks84fkq1\",\n  \"slug\": \"flyelep-generate-poster\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1787887029324\n}\n\nFile v1.0.2:skill-card.md\n\n## Description:\n\nUses the Flyelep API to generate ecommerce product hero images, detail-page posters, and white-background product images through asynchronous polling or synchronous image-generation requests.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[flyelepai](https://clawhub.ai/user/flyelepai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agents use this skill to collect ecommerce image-generation requirements, call Flyelep poster-generation endpoints, upload local reference images when needed, poll asynchronous jobs, and return generated image URLs to users.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Product images and API keys are sent to Flyelep.\n\nMitigation: Use this skill only with assets and credentials that are approved for disclosure to Flyelep, and provide API keys through safer header or secret handling.\n\nRisk: Local image uploads can become permanent public URLs.\n\nMitigation: Do not upload confidential, regulated, personal, unreleased, or otherwise sensitive images.\n\nRisk: Example commands may expose API keys in request bodies, shell history, or temporary files.\n\nMitigation: Prefer header-based secret handling and avoid storing real keys in plaintext payload files or command history.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/flyelepai/skills/flyelep-generate-poster)\n- [Flyelep asynchronous poster generation endpoint](https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync)\n- [Flyelep task-result query endpoint](https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult)\n- [Flyelep synchronous poster generation endpoint](https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generate)\n- [Flyelep file upload endpoint](https://www.flyelep.cn/prod-api/poster-design/api/v1/file/upload)\n\n## Skill Output:\n\n**Output Type(s):** [API Calls, Shell commands, Markdown, Configuration, Guidance]\n\n**Output Format:** [Markdown guidance with JSON payloads, HTTP requests, shell commands, and generated image URLs]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May return asynchronous task IDs, polling status, semicolon-delimited synchronous image URL strings, or uploaded public image URLs.]\n\n## Skill Version(s):\n\n1.0.2 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.1: 3 files, 6407 bytes\n\nFiles: skill-card.md (2313b), SKILL.md (20341b), _meta.json (142b)\n\nFile v1.0.1:SKILL.md\n\n---\r\nname: generate-poster\r\ndescription: >-\r\n  通过 Flyelep API 生成电商产品主图、详情图海报和白底主图。\r\n  当用户要求生成产品图、电商海报、Amazon 商品图、详情页图片、白底图、白底主图、纯白背景产品图时使用此技能。\r\n---\r\n# Flyelep 电商海报生图\r\n通过 Flyelep AI API 异步生成电商产品主图、详情图海报和白底主图。\r\n\r\n**重要：这是一个 HTTP API 调用技能。必须通过 HTTP POST 请求调用 API 接口，禁止通过浏览器访问 Flyelep 网站。**\r\n\r\n## API 接口信息\r\n\r\n### 创建任务\r\n\r\n- **URL**: `POST https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync`\r\n- **Content-Type**: `application/json`\r\n- **认证方式**:\r\n  - `generateType=100/200`（产品单图/详情图）：`secretKey` 仅在请求 Body 中传递\r\n  - `generateType=101`（白底主图）：`secretKey` 同时在 **Header** 和 **Body** 中传递\r\n- **超时时间**: 建议 120 秒（创建任务为瞬时操作）\r\n\r\n### 查询结果\r\n\r\n- **URL**: `POST https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult`\r\n- **Content-Type**: `application/json`\r\n- **认证方式**: 在请求 Header 中传入 `secretKey`\r\n- **说明**: 异步接口，需轮询获取最终图片 URL（生图耗时较长，可能需要数分钟）\r\n\r\n## 认证方式\r\n\r\n- `generateType=100/200`（产品单图/详情图）：在请求 JSON body 的 `secretKey` 字段中传入 API 密钥\r\n- `generateType=101`（白底主图）：`secretKey` 同时在 **Header** 和 **Body** 中传递\r\n\r\n查询结果时，`secretKey` 统一在 Header 中传递。用户需在 Flyelep 平台（https://www.flyelep.cn）获取密钥。\r\n\r\n> **安全说明**：API 密钥仅在请求时传递给 Flyelep 服务器，不存储在技能代码中。请勿将真实的密钥直接写在示例代码中，运行时由用户动态提供。\r\n\r\n## 请求 Body\r\n\r\n### generateType=100/200（产品单图/详情图）\r\n\r\n```json\r\n{\r\n  \"query\": \"生图需求描述，最多1000个字符\",\r\n  \"generateType\": 200,\r\n  \"posterType\": 5,\r\n  \"platformType\": \"amazon\",\r\n  \"languageType\": \"英文\",\r\n  \"detailPictureNumber\": 10,\r\n  \"modelEdition\": 3,\r\n  \"needText\": true,\r\n  \"secretKey\": \"用户提供的API密钥\",\r\n  \"fileUrlList\": [\"https://example.com/product.png\"],\r\n  \"aspectRatio\": \"1:1\"\r\n}\r\n```\r\n\r\n### generateType=101（白底主图）\r\n\r\n> **注意**：白底主图不需要 `platformType`、`languageType`、`needText` 参数，且 `secretKey` 需要同时在 Header 和 Body 中传递。\r\n\r\n```json\r\n{\r\n  \"query\": \"生成白底主图的需求描述，最多1000个字符\",\r\n  \"generateType\": 101,\r\n  \"posterType\": 5,\r\n  \"detailPictureNumber\": 1,\r\n  \"modelEdition\": 3,\r\n  \"secretKey\": \"用户提供的API密钥\",\r\n  \"fileUrlList\": [\"https://example.com/product.png\"],\r\n  \"aspectRatio\": \"1:1\"\r\n}\r\n```\r\n\r\n## 响应格式\r\n\r\n### 创建任务响应\r\n\r\n```json\r\n{\r\n  \"code\": 200,\r\n  \"data\": \"20374084144913*****\"\r\n}\r\n```\r\n\r\n`data` 为异步任务 ID，用于后续轮询获取结果。\r\n\r\n### 查询结果响应\r\n\r\n```json\r\n{\r\n  \"code\": 200,\r\n  \"data\": {\r\n    \"taskList\": [\r\n      {\r\n        \"taskStatus\": 2,\r\n        \"executeResult\": \"https://xxx.com/image1.png\"\r\n      },\r\n      {\r\n        \"taskStatus\": 2,\r\n        \"executeResult\": \"https://xxx.com/image2.png\"\r\n      }\r\n    ]\r\n  }\r\n}\r\n```\r\n\r\n- `taskStatus`: 0-待生成，1-生成中，2-生成成功，3-生成失败\r\n- `executeResult` 为生成的图片 URL\r\n- 将成功的图片逐个展示给用户，不要回读图片内容\r\n\r\n## 参数说明\r\n\r\n### 必传参数\r\n\r\n> **重要**：以下必传参数必须通过询问用户获取，agent 不可自行填写。调用本技能时，应先向用户列出必传参数与可选参数表格，由用户确认或提供后再执行。\r\n\r\n| 字段 | 默认值 | 说明 |\r\n|------|--------|------|\r\n| query | - | 生图需求描述，最多1000个字符 |\r\n| generateType | 200 | 100=产品单图，101=白底主图，200=产品详情图 |\r\n| posterType | 5 | 5=跨境电商，6=中文电商 |\r\n| platformType | amazon | 电商平台（见下方映射表）。**generateType=101 时不需要** |\r\n| languageType | 英文 | 生成图片上的文案语种。**generateType=101 时不需要** |\r\n| detailPictureNumber | 10 | 产品单图限1张；详情图可选5、10、15张 |\r\n| modelEdition | 3 | 2=Flyelep 2.0，3=Flyelep 3.0，9=Flyelep Image 2 |\r\n| needText | true | 图片上是否包含文案。**generateType=101 时不需要** |\r\n| secretKey | - | API 密钥（generateType=101 时同时在 Header 和 Body 中传递） |\r\n\r\n### 可选参数\r\n\r\n| 字段 | 默认值 | 说明 |\r\n|------|--------|------|\r\n| fileUrlList | - | 参考图片 URL 数组，最多6张 |\r\n| aspectRatio | 随机 | 图片比例：1:1、3:2、2:3、3:4、4:3、4:5、5:4、9:16、16:9、21:9 |\r\n\r\n## 参数映射规则\r\n\r\n### platformType（电商平台）\r\n- 跨境电商：`amazon`、`Temu`、`Shopee`、`TikTok Shop`、`AliExpress`、`OZON`\r\n- 中文电商：`淘宝`、`京东`、`拼多多`、`1688`、`小红书`\r\n\r\n### languageType（文案语种）\r\n- 跨境：英文、俄语、日语、韩语、阿拉伯语、德语、西班牙语、法语、泰语、马来语、越南语、葡萄牙语、菲律宾语、印尼语、意大利语、荷兰语、波兰语、中文繁体\r\n- 中文：中文简体\r\n\r\n### posterType（海报类型）\r\n根据市场区域选择，再搭配 modelEdition：\r\n- 跨境电商 → `posterType=5`\r\n- 中文电商 → `posterType=6`\r\n\r\n### aspectRatio（图片比例）\r\n- 正方形：`1:1`\r\n- 横版：`3:2`、`4:3`、`16:9`、`21:9`\r\n- 竖版：`2:3`、`3:4`、`4:5`、`5:4`、`9:16`\r\n- 未提及比例 → 不传此字段（API 自动随机选择）\r\n\r\n### detailPictureNumber（图片数量）\r\n- 产品单图（`generateType=100`）：固定为 `1`\r\n- 白底主图（`generateType=101`）：白底单图固定为 `1`，白底详情图可选 `5`、`10` 或 `15`\r\n- 产品详情图（`generateType=200`）：`5`、`10` 或 `15`\r\n\r\n## 异步任务流程\r\n\r\n生成图片为异步流程，需要：\r\n1. 调用 `generateAsync` 提交任务，获取任务 ID\r\n2. 轮询调用 `queryTaskResult` 查询任务状态（建议每 10 秒查询一次）\r\n3. 当 `taskStatus=2` 时，表示生成成功，获取结果图片 URL\r\n\r\n### 查询任务结果接口\r\n- **URL**: `POST https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult`\r\n- **Header**: `secretKey: 用户提供的API密钥`\r\n- **请求体**:\r\n```json\r\n{\r\n  \"agentGenerateTaskId\": \"任务ID\"\r\n}\r\n```\r\n\r\n- **轮询策略**：建议每5-10秒查询一次，视频生成耗时较长，超时时间建议设置为20分钟\r\n\r\n## 调用示例\r\n\r\n- **重要**：调用 API 时，必须设置 `Content-Type: application/json; charset=utf-8` 请求头。以下分平台说明：\r\n- **Windows/PowerShell 环境**：\r\n  - 必须采用以下流程：**先将请求体 JSON 写入当前工作目录下的临时文件 `payload_temp.json`，再通过 Shell 工具调用 `curl.exe --data-binary @payload_temp.json` 发送请求**。这是因为 PowerShell 使用 GBK 编码，而服务端使用 UTF-8 解析，直接在命令行中嵌入中文 JSON 会导致乱码。\r\n  - 使用 `curl.exe`（而非 `curl`，后者在 PowerShell 中是 `Invoke-WebRequest` 的别名）。必须在 `curl.exe` 后加 `--%` 停止 PowerShell 解析，否则 `@` 会被误判为 splatting 操作符导致报错。\r\n  - **文件创建方式**：根据可用工具选择其一（均需确保 UTF-8 **无 BOM** 编码，否则服务端 JSON 解析会在 position 0 报错）：\r\n    - **方式 A（有 Write 工具）**：使用 Write 工具创建 `payload_temp.json`\r\n    - **方式 B（无 Write 工具）**：使用 Shell 的 .NET API 创建文件（`Set-Content -Encoding UTF8` 会带 BOM，不可用）\r\n- **macOS/Linux 环境**：\r\n  - bash/zsh 默认使用 UTF-8 编码，可直接内联中文 JSON，无需临时文件。命令中使用 `curl`（无需 `.exe`，无需 `--%`）。\r\n  - 推荐内联写法：`curl -X POST URL -H \"...\" -H \"...\" --data-binary 'JSON单行内容'`，一步完成。\r\n  - 也可使用临时文件方式：`curl --data-binary @payload_temp.json`。\r\n- **清理**：API 返回结果后，务必删除 `payload_temp.json` 临时文件（如使用了临时文件）。\r\n\r\n### 示例 1：生成产品主图（跨境电商，Amazon）\r\n\r\n#### 步骤 1：创建任务\r\n\r\n步骤 1：创建 `payload_temp.json`，内容如下：\r\n```json\r\n{\r\n  \"query\": \"为这个蓝牙耳机生成一张白底产品主图\",\r\n  \"generateType\": 100,\r\n  \"posterType\": 5,\r\n  \"platformType\": \"Amazon\",\r\n  \"languageType\": \"英文\",\r\n  \"detailPictureNumber\": 1,\r\n  \"modelEdition\": 3,\r\n  \"needText\": true,\r\n  \"secretKey\": \"你的密钥\"\r\n}\r\n```\r\n> 方式 B（无 Write 工具）：\r\n> ```powershell\r\n> $json = '{\"query\":\"为这个蓝牙耳机生成一张白底产品主图\",\"generateType\":100,\"posterType\":5,\"platformType\":\"Amazon\",\"languageType\":\"英文\",\"detailPictureNumber\":1,\"modelEdition\":3,\"needText\":true,\"secretKey\":\"你的密钥\"}'\r\n> [System.IO.File]::WriteAllText(\"payload_temp.json\", $json, [System.Text.UTF8Encoding]::new($false))\r\n> ```\r\n\r\n步骤 2：使用 Shell 工具执行：\r\n```bash\r\ncurl.exe --% -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync\" -H \"Content-Type: application/json; charset=utf-8\" --max-time 120 --data-binary @payload_temp.json\r\n```\r\n\r\n> **macOS/Linux 内联写法**（无需临时文件）：\r\n> ```bash\r\n> curl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync\" -H \"Content-Type: application/json; charset=utf-8\" --max-time 120 --data-binary '{\"query\":\"为这个蓝牙耳机生成一张白底产品主图\",\"generateType\":100,\"posterType\":5,\"platformType\":\"Amazon\",\"languageType\":\"英文\",\"detailPictureNumber\":1,\"modelEdition\":3,\"needText\":true,\"secretKey\":\"你的密钥\"}'\r\n> ```\r\n\r\n步骤 3：清理临时文件：\r\n```bash\r\nrm payload_temp.json\r\n```\r\n\r\n#### 步骤 2：查询任务结果（轮询）\r\n\r\n步骤 1：创建 `payload_temp.json`，内容如下：\r\n```json\r\n{\r\n  \"agentGenerateTaskId\": \"上一步返回的任务ID\"\r\n}\r\n```\r\n\r\n步骤 2：使用 Shell 工具执行：\r\n```bash\r\ncurl.exe --% -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 30 --data-binary @payload_temp.json\r\n```\r\n\r\n> **macOS/Linux 内联写法**：\r\n> ```bash\r\n> curl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 30 --data-binary '{\"agentGenerateTaskId\":\"上一步返回的任务ID\"}'\r\n> ```\r\n\r\n步骤 3：清理临时文件：\r\n```bash\r\nrm payload_temp.json\r\n```\r\n\r\n#### 步骤 3：处理结果\r\n\r\n轮询查询直到 `taskStatus=2`（生成成功），提取 `executeResult` 中的图片 URL 展示给用户。\r\n\r\n### 示例 2：生成产品详情图（带参考图）\r\n\r\n#### 步骤 1：创建任务\r\n\r\n步骤 1：创建 `payload_temp.json`，内容如下：\r\n```json\r\n{\r\n  \"query\": \"根据上传的图片生成对应的产品图\",\r\n  \"generateType\": 200,\r\n  \"posterType\": 5,\r\n  \"platformType\": \"Amazon\",\r\n  \"languageType\": \"英文\",\r\n  \"detailPictureNumber\": 5,\r\n  \"modelEdition\": 3,\r\n  \"needText\": true,\r\n  \"secretKey\": \"你的密钥\",\r\n  \"fileUrlList\": [\"https://example.com/product1.png\", \"https://example.com/product2.png\"],\r\n  \"aspectRatio\": \"1:1\"\r\n}\r\n```\r\n> 方式 B（无 Write 工具）：\r\n> ```powershell\r\n> $json = '{\"query\":\"根据上传的图片生成对应的产品图\",\"generateType\":200,\"posterType\":5,\"platformType\":\"Amazon\",\"languageType\":\"英文\",\"detailPictureNumber\":5,\"modelEdition\":3,\"needText\":true,\"secretKey\":\"你的密钥\",\"fileUrlList\":[\"https://example.com/product1.png\",\"https://example.com/product2.png\"],\"aspectRatio\":\"1:1\"}'\r\n> [System.IO.File]::WriteAllText(\"payload_temp.json\", $json, [System.Text.UTF8Encoding]::new($false))\r\n> ```\r\n\r\n步骤 2：使用 Shell 工具执行：\r\n```bash\r\ncurl.exe --% -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync\" -H \"Content-Type: application/json; charset=utf-8\" --max-time 120 --data-binary @payload_temp.json\r\n```\r\n\r\n> **macOS/Linux 内联写法**（无需临时文件）：\r\n> ```bash\r\n> curl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync\" -H \"Content-Type: application/json; charset=utf-8\" --max-time 120 --data-binary '{\"query\":\"根据上传的图片生成对应的产品图\",\"generateType\":200,\"posterType\":5,\"platformType\":\"Amazon\",\"languageType\":\"英文\",\"detailPictureNumber\":5,\"modelEdition\":3,\"needText\":true,\"secretKey\":\"你的密钥\",\"fileUrlList\":[\"https://example.com/product1.png\",\"https://example.com/product2.png\"],\"aspectRatio\":\"1:1\"}'\r\n> ```\r\n\r\n步骤 3：清理临时文件：\r\n```bash\r\nrm payload_temp.json\r\n```\r\n\r\n#### 步骤 2：查询任务结果（轮询）\r\n\r\n步骤 1：创建 `payload_temp.json`，内容如下：\r\n```json\r\n{\r\n  \"agentGenerateTaskId\": \"上一步返回的任务ID\"\r\n}\r\n```\r\n\r\n步骤 2：使用 Shell 工具执行：\r\n```bash\r\ncurl.exe --% -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 30 --data-binary @payload_temp.json\r\n```\r\n\r\n> **macOS/Linux 内联写法**：\r\n> ```bash\r\n> curl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 30 --data-binary '{\"agentGenerateTaskId\":\"上一步返回的任务ID\"}'\r\n> ```\r\n\r\n步骤 3：清理临时文件：\r\n```bash\r\nrm payload_temp.json\r\n```\r\n\r\n### 示例 3：中文电商主图（淘宝，中文简体）\r\n\r\n#### 步骤 1：创建任务\r\n\r\n步骤 1：创建 `payload_temp.json`，内容如下：\r\n```json\r\n{\r\n  \"query\": \"为这款智能手表生成一张电商主图，突出科技感\",\r\n  \"generateType\": 100,\r\n  \"posterType\": 6,\r\n  \"platformType\": \"淘宝\",\r\n  \"languageType\": \"中文简体\",\r\n  \"detailPictureNumber\": 1,\r\n  \"modelEdition\": 3,\r\n  \"needText\": true,\r\n  \"secretKey\": \"你的密钥\",\r\n  \"aspectRatio\": \"1:1\"\r\n}\r\n```\r\n> 方式 B（无 Write 工具）：\r\n> ```powershell\r\n> $json = '{\"query\":\"为这款智能手表生成一张电商主图，突出科技感\",\"generateType\":100,\"posterType\":6,\"platformType\":\"淘宝\",\"languageType\":\"中文简体\",\"detailPictureNumber\":1,\"modelEdition\":3,\"needText\":true,\"secretKey\":\"你的密钥\",\"aspectRatio\":\"1:1\"}'\r\n> [System.IO.File]::WriteAllText(\"payload_temp.json\", $json, [System.Text.UTF8Encoding]::new($false))\r\n> ```\r\n\r\n步骤 2：使用 Shell 工具执行：\r\n```bash\r\ncurl.exe --% -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync\" -H \"Content-Type: application/json; charset=utf-8\" --max-time 120 --data-binary @payload_temp.json\r\n```\r\n\r\n> **macOS/Linux 内联写法**（无需临时文件）：\r\n> ```bash\r\n> curl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync\" -H \"Content-Type: application/json; charset=utf-8\" --max-time 120 --data-binary '{\"query\":\"为这款智能手表生成一张电商主图，突出科技感\",\"generateType\":100,\"posterType\":6,\"platformType\":\"淘宝\",\"languageType\":\"中文简体\",\"detailPictureNumber\":1,\"modelEdition\":3,\"needText\":true,\"secretKey\":\"你的密钥\",\"aspectRatio\":\"1:1\"}'\r\n> ```\r\n\r\n步骤 3：清理临时文件：\r\n```bash\r\nrm payload_temp.json\r\n```\r\n\r\n#### 步骤 2：查询任务结果（轮询）\r\n\r\n步骤 1：创建 `payload_temp.json`，内容如下：\r\n```json\r\n{\r\n  \"agentGenerateTaskId\": \"上一步返回的任务ID\"\r\n}\r\n```\r\n\r\n步骤 2：使用 Shell 工具执行：\r\n```bash\r\ncurl.exe --% -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 30 --data-binary @payload_temp.json\r\n```\r\n\r\n> **macOS/Linux 内联写法**：\r\n> ```bash\r\n> curl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 30 --data-binary '{\"agentGenerateTaskId\":\"上一步返回的任务ID\"}'\r\n> ```\r\n\r\n步骤 3：清理临时文件：\r\n```bash\r\nrm payload_temp.json\r\n```\r\n\r\n### 示例 4：生成白底主图（generateType=101）\r\n\r\n> **注意**：白底主图不需要 `platformType`、`languageType`、`needText` 参数，且 `secretKey` 需要同时在 **Header** 和 **Body** 中传递。\r\n\r\n#### 步骤 1：创建任务\r\n\r\n步骤 1：创建 `payload_temp.json`，内容如下（Body 中包含 secretKey，无 platformType/languageType/needText）：\r\n```json\r\n{\r\n  \"query\": \"生成一张蓝牙耳机白底产品主图，产品居中，背景纯白\",\r\n  \"generateType\": 101,\r\n  \"posterType\": 5,\r\n  \"detailPictureNumber\": 1,\r\n  \"modelEdition\": 3,\r\n  \"secretKey\": \"你的密钥\",\r\n  \"aspectRatio\": \"1:1\"\r\n}\r\n```\r\n> 方式 B（无 Write 工具）：\r\n> ```powershell\r\n> $json = '{\"query\":\"生成一张蓝牙耳机白底产品主图，产品居中，背景纯白\",\"generateType\":101,\"posterType\":5,\"detailPictureNumber\":1,\"modelEdition\":3,\"secretKey\":\"你的密钥\",\"aspectRatio\":\"1:1\"}'\r\n> [System.IO.File]::WriteAllText(\"payload_temp.json\", $json, [System.Text.UTF8Encoding]::new($false))\r\n> ```\r\n\r\n步骤 2：使用 Shell 工具执行（secretKey 同时在 Header 和 Body 中）：\r\n```bash\r\ncurl.exe --% -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 120 --data-binary @payload_temp.json\r\n```\r\n\r\n> **macOS/Linux 内联写法**（secretKey 同时在 Header 和 Body 中）：\r\n> ```bash\r\n> curl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 120 --data-binary '{\"query\":\"生成一张蓝牙耳机白底产品主图，产品居中，背景纯白\",\"generateType\":101,\"posterType\":5,\"detailPictureNumber\":1,\"modelEdition\":3,\"secretKey\":\"你的密钥\",\"aspectRatio\":\"1:1\"}'\r\n> ```\r\n\r\n步骤 3：清理临时文件：\r\n```bash\r\nrm payload_temp.json\r\n```\r\n\r\n#### 步骤 2：查询任务结果（轮询）\r\n\r\n步骤 1：创建 `payload_temp.json`，内容如下：\r\n```json\r\n{\r\n  \"agentGenerateTaskId\": \"上一步返回的任务ID\"\r\n}\r\n```\r\n\r\n步骤 2：使用 Shell 工具执行（secretKey 在 Header 中）：\r\n```bash\r\ncurl.exe --% -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 30 --data-binary @payload_temp.json\r\n```\r\n\r\n> **macOS/Linux 内联写法**：\r\n> ```bash\r\n> curl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult\" -H \"Content-Type: application/json; charset=utf-8\" -H \"secretKey: 你的密钥\" --max-time 30 --data-binary '{\"agentGenerateTaskId\":\"上一步返回的任务ID\"}'\r\n> ```\r\n\r\n步骤 3：清理临时文件：\r\n```bash\r\nrm payload_temp.json\r\n```\r\n\r\n#### 步骤 3：处理结果\r\n\r\n轮询查询直到 `taskStatus=2`（生成成功），提取 `executeResult` 中的图片 URL 展示给用户。\r\n\r\n## 常见错误及解决方案\r\n\r\n| 错误 | 原因与解决 |\r\n|------|-----------|\r\n| HTTP 405 Not Allowed | URL 路径错误，确保包含 `/prod-api` 前缀 |\r\n| code 500 \"当前并发请求过多\" | 服务繁忙，稍后重试 |\r\n| HTTP 401 | 密钥无效或已过期，在 Flyelep 平台重新生成 |\r\n| 查询结果 taskStatus 一直为 1 | 生图任务仍在进行中，继续轮询或稍后重试 |\r\n| 查询结果 taskStatus 为 3 | 生图失败，检查参数是否正确或稍后重试 |\r\n| 描述超过1000字符 | 缩短 query 内容 |\r\n\r\n## 提示词处理\r\n\r\n**基于参考图生成：** 将用户的产品描述传入 `query`，通过 `fileUrlList` 附上参考图片 URL。仅在描述明显不足时才优化。\r\n**无参考图生成：** 在 `query` 中描述产品、风格和构图。\r\n保留用户的创意意图。当用户描述模糊时，根据上下文（平台、语言等）推断合理的默认值。\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7fp1zsg4nwdq826y0awapkks84fkq1\",\n  \"slug\": \"flyelep-generate-poster\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1786083254236\n}\n\nFile v1.0.1:skill-card.md\n\n## Description:\n\nGenerates e-commerce product hero images, detail-page posters, and white-background product images through the Flyelep API.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[flyelepai](https://clawhub.ai/user/flyelepai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to collect product-generation parameters, call Flyelep's asynchronous poster-generation API, poll for task completion, and return generated image URLs for e-commerce product imagery.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Flyelep API keys may be exposed through local temp files, inline shell commands, logs, or command history.\n\nMitigation: Use a secret-handling method that avoids writing keys to payload_temp.json or embedding them directly in shell commands, delete any temporary payload files, and rotate the key if exposure is possible.\n\nRisk: Product descriptions and reference image URLs are sent to Flyelep for image generation.\n\nMitigation: Install and use the skill only when users are comfortable sending that content to Flyelep.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/flyelepai/skills/flyelep-generate-poster)\n- [Flyelep publisher profile](https://clawhub.ai/user/flyelepai)\n- [Flyelep platform](https://www.flyelep.cn)\n- [Flyelep generateAsync API endpoint](https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync)\n- [Flyelep queryTaskResult API endpoint](https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult)\n\n## Skill Output:\n\n**Output Type(s):** [API Calls, Shell commands, Configuration, Guidance, Text]\n\n**Output Format:** [Markdown guidance with JSON request bodies, shell commands, and generated image URLs]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Uses asynchronous task submission and polling; generated images are returned as URLs rather than embedded image content.]\n\n## Skill Version(s):\n\n1.0.1 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.0: 3 files, 4197 bytes\n\nFiles: skill-card.md (2160b), SKILL.md (6225b), _meta.json (142b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: generate-poster\ndescription: >-\n  通过 Flyelep API 生成电商产品主图和详情图海报。\n  当用户要求生成产品图、电商海报、Amazon 商品图、详情页图片时使用此技能。\n---\n# Flyelep 电商海报生图\n通过 Flyelep AI API 生成电商产品主图和详情图海报。\n**重要：这是一个 HTTP API 调用技能。必须通过 HTTP POST 请求调用 API 接口，禁止通过浏览器访问 Flyelep 网站。**\n## API 接口信息\n- **URL**: `POST https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generate`\n- **Content-Type**: `application/json`\n- **超时时间**: 建议 300-600 秒（生图需要较长时间）\n## 认证方式\n在请求 JSON body 的 `secretKey` 字段中传入 API 密钥。用户需在 Flyelep 平台（https://www.flyelep.cn）获取密钥。\n\n> **安全说明**：将 `secretKey` 放在 JSON body 中是 Flyelep API 的设计要求，该 API 不支持 header 认证方式。API 密钥仅在请求时传递给 Flyelep 服务器，不存储在技能代码中。请勿将真实的密钥直接写在示例代码中，运行时由用户动态提供。\n## 请求 Body\n```json\n{\n  \"query\": \"生图需求描述，最多1000个字符\",\n  \"generateType\": 200,\n  \"posterType\": 5,\n  \"platformType\": \"amazon\",\n  \"languageType\": \"英文\",\n  \"detailPictureNumber\": 10,\n  \"modelEdition\": 3,\n  \"needText\": true,\n  \"secretKey\": \"用户提供的API密钥\",\n  \"fileUrlList\": [\"https://example.com/product.png\"],\n  \"aspectRatio\": \"1:1\"\n}\n```\n## 响应格式\n成功：\n```json\n{\n  \"code\": 200,\n  \"data\": \"https://xxx.com/image1.png;https://xxx.com/image2.png;\"\n}\n```\n`data` 中多张图片 URL 以分号 `;` 分隔。将分号分隔的 URL 拆分后逐个展示给用户，不要回读图片内容。\n失败：\n```json\n{\n  \"code\": 500,\n  \"msg\": \"错误信息\"\n}\n```\n## 参数说明\n### 必传参数\n| 字段 | 默认值 | 说明 |\n|------|--------|------|\n| query | - | 生图需求描述，最多1000个字符 |\n| generateType | 200 | 100=产品单图，200=产品详情图 |\n| posterType | 5 | 5=跨境电商，6=中文电商 |\n| platformType | amazon | 电商平台（见下方映射表） |\n| languageType | 英文 | 生成图片上的文案语种 |\n| detailPictureNumber | 10 | 产品单图固定为1；详情图可选5、10、15 |\n| modelEdition | 3 | 2=Flyelep 2.0，3=Flyelep 3.0 |\n| needText | true | 图片上是否包含文案 |\n| secretKey | - | API 密钥 |\n### 可选参数\n| 字段 | 默认值 | 说明 |\n|------|--------|------|\n| fileUrlList | - | 参考图片 URL 数组，最多6张 |\n| aspectRatio | 随机 | 图片比例：1:1、3:2、2:3、3:4、4:3、4:5、5:4、9:16、16:9、21:9 |\n## 参数映射规则\n### platformType（电商平台）\n- 跨境电商：`amazon`、`Temu`、`Shopee`、`TikTok Shop`、`AliExpress`、`OZON`\n- 中文电商：`淘宝`、`京东`、`拼多多`、`1688`、`小红书`\n### languageType（文案语种）\n- 跨境：英文、俄语、日语、韩语、阿拉伯语、德语、西班牙语、法语、泰语、马来语、越南语、葡萄牙语、菲律宾语、印尼语、意大利语、荷兰语、波兰语、中文繁体\n- 中文：中文简体\n### posterType（海报类型）\n根据市场区域选择，再搭配 modelEdition：\n- 跨境电商 → `posterType=5`\n- 中文电商 → `posterType=6`\n### aspectRatio（图片比例）\n- 正方形：`1:1`\n- 横版：`3:2`、`4:3`、`16:9`、`21:9`\n- 竖版：`2:3`、`3:4`、`4:5`、`5:4`、`9:16`\n- 未提及比例 → 不传此字段（API 自动随机选择）\n### detailPictureNumber（图片数量）\n- 产品单图（`generateType=100`）：固定为 `1`\n- 产品详情图（`generateType=200`）：`5`、`10` 或 `15`\n## 调用示例\n**生成产品主图（跨境电商，Amazon）：**\n```bash\ncurl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generate\" \\\n  -H \"Content-Type: application/json\" \\\n  --max-time 600 \\\n  -d '{\n    \"query\": \"为这个蓝牙耳机生成一张白底产品主图\",\n    \"generateType\": 100,\n    \"posterType\": 5,\n    \"platformType\": \"amazon\",\n    \"languageType\": \"英文\",\n    \"detailPictureNumber\": 1,\n    \"modelEdition\": 3,\n    \"needText\": true,\n    \"secretKey\": \"你的密钥\"\n  }'\n```\n**生成产品详情图（带参考图）：**\n```bash\ncurl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generate\" \\\n  -H \"Content-Type: application/json\" \\\n  --max-time 600 \\\n  -d '{\n    \"query\": \"根据上传的图片生成对应的产品图\",\n    \"generateType\": 200,\n    \"posterType\": 5,\n    \"platformType\": \"amazon\",\n    \"languageType\": \"英文\",\n    \"detailPictureNumber\": 5,\n    \"modelEdition\": 3,\n    \"needText\": true,\n    \"secretKey\": \"你的密钥\",\n    \"fileUrlList\": [\"https://example.com/product1.png\", \"https://example.com/product2.png\"],\n    \"aspectRatio\": \"1:1\"\n  }'\n```\n**中文电商主图（淘宝，中文简体）：**\n```bash\ncurl -X POST \"https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generate\" \\\n  -H \"Content-Type: application/json\" \\\n  --max-time 600 \\\n  -d '{\n    \"query\": \"为这款智能手表生成一张电商主图，突出科技感\",\n    \"generateType\": 100,\n    \"posterType\": 6,\n    \"platformType\": \"淘宝\",\n    \"languageType\": \"中文简体\",\n    \"detailPictureNumber\": 1,\n    \"modelEdition\": 3,\n    \"needText\": true,\n    \"secretKey\": \"你的密钥\",\n    \"aspectRatio\": \"1:1\"\n  }'\n```\n## 常见错误及解决方案\n| 错误 | 原因与解决 |\n|------|-----------|\n| HTTP 405 Not Allowed | URL 路径错误，确保包含 `/prod-api` 前缀 |\n| code 500 \"当前并发请求过多\" | 服务繁忙，稍后重试 |\n| HTTP 401 | 密钥无效或已过期，在 Flyelep 平台重新生成 |\n| 请求超时 | 生图最多需要5分钟，增大超时时间 |\n| data 为空 | 生图任务在排队中，稍后重试 |\n| 描述超过1000字符 | 缩短 query 内容 |\n## 提示词处理\n**基于参考图生成：** 将用户的产品描述传入 `query`，通过 `fileUrlList` 附上参考图片 URL。仅在描述明显不足时才优化。\n**无参考图生成：** 在 `query` 中描述产品、风格和构图。\n保留用户的创意意图。当用户描述模糊时，根据上下文（平台、语言等）推断合理的默认值。\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn7fp1zsg4nwdq826y0awapkks84fkq1\",\n  \"slug\": \"flyelep-generate-poster\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1776679099376\n}\n\nFile v1.0.0:skill-card.md\n\n## Description: <br>\nUses the Flyelep API to generate e-commerce product main images and detail-page poster images. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[flyelepai](https://clawhub.ai/user/flyelepai) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and e-commerce operators use this skill to prepare Flyelep API requests for product hero images and product detail posters across cross-border and Chinese marketplace formats. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Product descriptions, reference image URLs, and the Flyelep API key are sent to Flyelep. <br>\nMitigation: Use only product assets and prompts that are acceptable to share with Flyelep, avoid confidential inputs, and rotate the API key if it appears in logs or shared chats. <br>\nRisk: Image generation can be long-running or fail because of invalid credentials, service concurrency, queueing, or request timeouts. <br>\nMitigation: Use 300-600 second request timeouts, handle 401 and 500 responses, check for empty data, and retry later when the service is busy. <br>\n\n\n## Reference(s): <br>\n- [ClawHub release page](https://clawhub.ai/flyelepai/flyelep-generate-poster) <br>\n- [Flyelep poster generation API endpoint](https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generate) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, guidance] <br>\n**Output Format:** [Markdown guidance with JSON request bodies, curl examples, and generated image URLs.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include semicolon-separated image URLs returned by Flyelep; image generation requests can require 300-600 second timeouts.] <br>\n\n## Skill Version(s): <br>\n1.0.0 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>","readmeExcerpt":"Skill: generate-poster Owner: flyelepai Summary: 通过 Flyelep API 生成电商产品主图、详情图海报和白底主图，支持异步（提交后轮询）与同步（一次请求出图）两种模式。 当用户要求生成产品图、电商海报、Amazon 商品图、详情页图片、白底图、白底主图、纯白背景产品图时使用此技能。 Tags: latest:1.0.2 Version history: v1.0.2 | 2026-08-28T03:17:09.324Z | user **Summary: 支持同步出图模式，更新参数联动逻辑与默认值，推荐参数写法统一使用 Header 鉴权。** - 新增同步接口 /generate 和 /whiteBgMainImgGen 支持“一次请求出图”场景（连接可挂至15分钟返回图片 URL），参数与异步接口一致，选用由用户需求明确指定。 - 鉴权方式简化：所有接口均支持 secre","codeSnippets":[],"executableExamples":[{"language":"http","snippet":"Content-Type: application/json\nsecretKey: 用户提供的API密钥"},{"language":"json","snippet":"{\n  \"query\": \"生图需求描述，最多1000个字符\",\n  \"generateType\": 200,\n  \"posterType\": 5,\n  \"platformType\": \"amazon\",\n  \"languageType\": \"英文\",\n  \"detailPictureNumber\": 10,\n  \"modelEdition\": 9,\n  \"channel\": \"promotion\",\n  \"needText\": true,\n  \"secretKey\": \"用户提供的API密钥\",\n  \"fileUrlList\": [\"https://example.com/product.png\"],\n  \"aspectRatio\": \"1:1\"\n}"},{"language":"json","snippet":"{\n  \"query\": \"生成白底主图的需求描述，最多1000个字符\",\n  \"generateType\": 101,\n  \"posterType\": 5,\n  \"detailPictureNumber\": 1,\n  \"modelEdition\": 9,\n  \"channel\": \"promotion\",\n  \"secretKey\": \"用户提供的API密钥\",\n  \"fileUrlList\": [\"https://example.com/product.png\"],\n  \"aspectRatio\": \"1:1\"\n}"},{"language":"json","snippet":"{\n  \"agentGenerateTaskId\": \"创建任务返回的任务ID\"\n}"},{"language":"json","snippet":"{\n  \"code\": 200,\n  \"data\": \"20374084144913*****\"\n}"},{"language":"json","snippet":"{\n  \"code\": 200,\n  \"data\": \"https://xxx.com/image1.png;https://xxx.com/image2.png;\"\n}"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: generate-poster\ndescription: >-\n  通过 Flyelep API 生成电商产品主图、详情图海报和白底主图，支持异步（提交后轮询）与同步（一次请求出图）两种模式。\n  当用户要求生成产品图、电商海报、Amazon 商品图、详情页图片、白底图、白底主图、纯白背景产品图时使用此技能。\n---\n# Flyelep 电商海报生图\n通过 Flyelep AI API 生成电商产品主图、详情图海报和白底主图，支持异步与同步两种模式。\n\n**重要：这是一个 HTTP API 调用技能。必须通过 HTTP POST 请求调用 API 接口，禁止通过浏览器访问 Flyelep 网站。**\n\n## 两种调用模式\n\n| 模式 | 入口 | 返回 | 适用场景 |\n|------|------|------|----------|\n| 异步（推荐） | `/generateAsync` | 立即返回任务 ID，再轮询 `/queryTaskResult` | 绝大多数场景，尤其是多张详情图 |\n| 同步 | `/generate`、`/whiteBgMainImgGen` | 一次请求内挂住连接直到出图，直接返回图片结果 | 只出 1 张图、且调用方不方便实现轮询时 |\n\n两种模式的请求参数完全一致，共用同一套排队与计费逻辑，差别只在于结果怎么拿。\n\n**默认用异步模式**。同步模式的连接要挂最长 15 分钟，容易被中间的网关、代理或客户端超时切断，而且它**不返回任务 ID**，一旦连接断开就无法再查回这次生成的结果。只有用户明确要求\"一次请求拿到图\"时才用同步。\n\n## API 接口信息\n\n### 创建任务（异步，推荐）\n\n- **URL**: `POST https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync`\n- **Content-Type**: `application/json`\n- **认证方式**: `secretKey` 可放在请求 Header 或 Body 中，两者都传时以 **Header 为准**；所有 `generateType` 的规则一致\n- **超时时间**: 建议 120 秒（创建任务为瞬时操作）\n\n请求头示例：\n\n```http\nContent-Type: application/json\nsecretKey: 用户提供的API密钥\n```\n\n查询结果接口同样支持 Header 传 `secretKey`，推荐统一放在 Header 里。\n\n> **安全说明**：API 密钥仅在请求时传递给 Flyelep 服务器，不存储在技能代码中。请勿将真实的密钥直接写在示例代码中，运行时由用户动态提供。\n\n### 查询结果（仅异步模式需要）\n\n- **URL**: `POST https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult`\n- **Content-Type**: `application/json`\n- **认证方式**: 在请求 Header 中传入 `secretKey`\n- **说明**: 异步接口，需轮询获取最终图片 URL（生图耗时较长，可能需要数分钟）\n\n### 创建任务（同步）\n\n- **URL**: `POST https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generate`\n- **Content-Type**: `application/json`\n- **认证方式**: 与异步模式一致，`secretKey` 放 Header 或 Body 均可，Header 优先\n- **超时时间**: 服务端最长挂 **15 分钟**（900 秒）后返回超时失败，客户端 `--max-time` 要设到 900 秒以上，否则会自己先断开\n- **说明**: 请求会一直挂住直到生成完成，响应里直接带图片结果，**不返回任务 ID**\n\n白底主图另有一个语义化的同步入口：\n\n- **URL**: `POST https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/whiteBgMainImgGen`\n- **说明**: 等价于 `/generate` + `generateType=101`，服务端会强制把 `generateType` 置为 `101`，因此 body 里传不传 `generateType` 都一样。其余参数、鉴权、超时与 `/generate` 完全相同\n\n## 请求 Body\n\n以下 Body 结构对异步（`/generateAsync`）和同步（`/generate`、`/whiteBgMainImgGen`）都适用。\n\n### generateType=100/200（产品单图/详情图）\n\n```json\n{\n  \"query\": \"生图需求描述，最多1000个字符\",\n  \"generateType\": 200,\n  \"posterType\": 5,\n  \"platformType\": \"amazon\",\n  \"languageType\": \"英文\",\n  \"detailPictureNumber\": 10,\n  \"modelEdition\": 9,\n  \"channel\": \"promotion\",\n  \"needText\": true,\n  \"secretKey\": \"用户提供的API密钥\",\n  \"fileUrlList\": [\"https://example.com/product.png\"],\n  \"aspectRatio\": \"1:1\"\n}\n```\n\n### generateType=101（白底主图）\n\n> **注意**：白底主图不需要 `platformType`、`languageType`、`needText` 参数。\n\n```json\n{\n  \"query\": \"生成白底主图的需求描述，最多1000个字符\",\n  \"generateType\": 101,\n  \"posterType\": 5,\n  \"detailPictureNumber\": 1,\n  \"modelEdition\": 9,\n  \"channel\": \"promotion\",\n  \"secretKey\": \"用户提供的API密钥\",\n  \"fileUrlList\": [\"https://example.com/product.png\"],\n  \"aspectRatio\": \"1:1\"\n}\n```\n\n### 查询结果\n\n```json\n{\n  \"agentGenerateTaskId\": \"创建任务返回的任务ID\"\n}\n```\n\n## 响应格式\n\n### 创建任务响应（异步模式）\n\n```json\n{\n  \"code\": 200,\n  \"data\": \"20374084144913***"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7fp1zsg4nwdq826y0awapkks84fkq1\",\n  \"slug\": \"flyelep-generate-poster\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1787887029324\n}"},{"path":"skill-card.md","content":"## Description:\n\nUses the Flyelep API to generate ecommerce product hero images, detail-page posters, and white-background product images through asynchronous polling or synchronous image-generation requests.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[flyelepai](https://clawhub.ai/user/flyelepai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agents use this skill to collect ecommerce image-generation requirements, call Flyelep poster-generation endpoints, upload local reference images when needed, poll asynchronous jobs, and return generated image URLs to users.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Product images and API keys are sent to Flyelep.\n\nMitigation: Use this skill only with assets and credentials that are approved for disclosure to Flyelep, and provide API keys through safer header or secret handling.\n\nRisk: Local image uploads can become permanent public URLs.\n\nMitigation: Do not upload confidential, regulated, personal, unreleased, or otherwise sensitive images.\n\nRisk: Example commands may expose API keys in request bodies, shell history, or temporary files.\n\nMitigation: Prefer header-based secret handling and avoid storing real keys in plaintext payload files or command history.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/flyelepai/skills/flyelep-generate-poster)\n- [Flyelep asynchronous poster generation endpoint](https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generateAsync)\n- [Flyelep task-result query endpoint](https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/queryTaskResult)\n- [Flyelep synchronous poster generation endpoint](https://www.flyelep.cn/prod-api/poster-design/api/v1/poster/generate)\n- [Flyelep file upload endpoint](https://www.flyelep.cn/prod-api/poster-design/api/v1/file/upload)\n\n## Skill Output:\n\n**Output Type(s):** [API Calls, Shell commands, Markdown, Configuration, Guidance]\n\n**Output Format:** [Markdown guidance with JSON payloads, HTTP requests, shell commands, and generated image URLs]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May return asynchronous task IDs, polling status, semicolon-delimited synchronous image URL strings, or uploaded public image URLs.]\n\n## Skill Version(s):\n\n1.0.2 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"通过 Flyelep API 生成电商产品主图、详情图海报和白底主图，支持异步（提交后轮询）与同步（一次请求出图）两种模式。 当用户要求生成产品图、电商海报、Amazon 商品图、详情页图片、白底图、白底主图、纯白背景产品图时使用此技能。 Skill: generate-poster Owner: flyelepai Summary: 通过 Flyelep API 生成电商产品主图、详情图海报和白底主图，支持异步（提交后轮询）与同步（一次请求出图）两种模式。 当用户要求生成产品图、电商海报、Amazon 商品图、详情页图片、白底图、白底主图、纯白背景产品图时使用此技能。 Tags: latest:1.0.2 Version history: v1.0.2 | 2026-08-28T03:17:09.324Z | user **Summary: 支持同步出图模式，更新参数联动逻辑与默认值，推荐参数写法统一使用 Header 鉴权。** - 新增同步接口 /generate 和 /whiteBgMainImgGen 支持“一次请求出图”场景（连接可挂至15分钟返回图片 URL），参数与异步接口一致，选用由用户需求明确指定。 - 鉴权方式简化：所有接口均支持 secre","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":895,"uniquenessScore":53,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T04:02:11.102Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T04:02:11.102Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-11T07:41:03.262Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}