npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@acedatacloud/piece-gpt-image

v0.1.9

Published

GPT Image generation, editing and task lookup through Ace Data Cloud for Activepieces

Readme

GPT Image for Activepieces

通过 Ace Data Cloud 创建 GPT Image 任务,并按同一个任务 ID查询结果。Piece 提供 Create GPT Image task、Edit a GPT Image 和 Get GPT Image task 三个动作。提交返回 ID 并不代表图片已完成;查询到 succeeded 后才可使用成品。English

**分发方式:**在 Activepieces 实例中将 @acedatacloud/piece-gpt-image(本源码目标为 0.1.9,已发布版本请查看 npm) 作为自定义 Piece 安装。公开 npm 包不会自动进入 Activepieces 共享目录。

安装与连接

Activepieces 0.92.2+ 中进入 Platform Admin → Catalogue → Pieces → Install Piece → NPM Registry,填写 @acedatacloud/piece-gpt-image 和已发布版本(本次目标为 0.1.9)。在流程中搜索 GPT Image,核对 GPT Image 图标和三个动作。

  1. 在 Ace Data Cloud Applications 注册或登录。页面会自动准备好通用应用卡片。若卡片尚无 Key,请先选择创建 API Key。
  2. 使用通用应用卡片,并确认账号具备 GPT Image 权限。通用 Key 可访问账号已获授权的服务;专用 Key 仅限对应服务。
  3. 点击应用卡片上 API KEY 旁的复制按钮,或通过 Manage Keys → Create 创建名为 Activepieces GPT Image 的独立 Key,按需设置有效期与用量限制。若启用 Allowed APIs,需允许实际使用的 /openai/images/generations、/openai/tasks;使用编辑时还需允许 /openai/images/edits。
  4. 创建 Activepieces 连接,只填写 API Key 本身,不加 Bearer 。platform-... 管理 Token 不是生成 API Key。Key 留在连接中,不写入流程导出。生成前查看当前价格。通用应用余额不足时,点击该卡片上的充值。

首次流程

  1. 添加 Create GPT Image task。Model 与 Quality 下拉框读取当前公开图片生成接口目录,选择精确型号及其支持的参数,目录包含兼容别名。模型、尺寸和数量默认值仍为 gpt-image-2、1024x1024 和 1。质量为可选项且不预填;留空时请求不发送 quality 字段,由 API 使用所选模型的默认值。
  2. 只运行一次创建动作,保存输出的 task_id。动作使用 callback_url 异步提交,不设置 HTTP 重试。若超时或返回 5xx,先查请求历史再考虑重提,任务可能已被接收。
  3. 添加 Get GPT Image task,把 Task ID 映射为创建动作的输出。只查询同一个 ID,直至 status=succeeded 或 failed。pending 时不会把预览当作最终媒体。
  4. 仅当 success=true 时打开 media_urls。若原始请求自带自定义 Trace ID 且丢失任务 ID,也可按 Trace ID 查询;本 Piece 的创建动作不设置自定义 Trace ID。

无密钥首跑流程 导入后两个连接均为空,任务 ID 映射保留。运行前请配置自己的连接;创建动作已关闭自动重试。

本次校验的目录包含 24 个型号和 8 个质量选项;下拉框刷新时读取当前目录。生成时 DALL-E 2 仅支持 standard,DALL-E 3 支持 standard 或 hd 且数量固定为 1;GPT Image 1、1.5、2 支持 auto、low、medium、high,2.5/2.6 Flare 与 Sunburst 还支持 xhigh 和 max。明确选择不支持的质量会在提交前报错。其他型号限制以当前接口说明为准。图片数量为 1–10,费用取决于所选模型;size 支持 auto 或 WIDTHxHEIGHT。查询任务不会再次生成或计费。

目录读取不携带连接、提示词或 API Key。元数据不可用时,下拉框明确显示错误,不返回缩水的备用列表;刷新字段可重试。已有保存流程继续使用其保存的模型 ID 和明确指定的质量,执行时无需查询目录;不合法的 DALL-E 质量需改为支持值或清空。首跑模板不预填质量,避免切换型号时带入 GPT 专用的质量值。生成和编辑分别读取各自公开 API 目录;保存的模型选择执行时不依赖目录请求。

此前隔离的 Activepieces CE 0.92.2 验证已接受构建归档,并通过 Get GPT Image task 查询一条既有完成任务;流程返回 succeeded 和 1 个最终图片 URL。本轮未通过创建动作提交新的付费图片任务。

编辑参考图

导入无密钥编辑示例,在两个步骤选择连接,将占位地址换成自己有权使用、可公开访问的 HTTPS 图片。Edit a GPT Image 支持每行一个链接或 JSON 数组,共 1–16 张;DALL-E 2 仅支持一张不超过 4 MB 的正方形 PNG。Piece 只把链接发送给 API,不自行下载图片。

选择编辑模型并填写修改要求。质量和尺寸留空时不发送;尺寸由 API 根据提示词或首张图选择。可选背景、输出格式和输入保真度受模型限制;GPT Image 2.6 还支持含透明像素的 HTTPS PNG 标注层、构图复杂度和 GIF 帧参数。标注层需与首张参考图尺寸一致、不超过 40 MB,且不能和 GIF 同用;两张图各不超过 16,777,216 像素。JPEG/WebP 可选压缩等级。请先核对当期价格。

编辑只提交一次,关闭 Retry on Failure,将返回的 task_id 映射到 Get GPT Image task,未完成时只重复查询。若提交超时且没有 ID,先查原请求历史。当前版本通过 JSON 接受 URL,直接上传文件和遮罩编辑需要 multipart 支持,尚未提供。

排障

| 现象 | 处理 | | --- | --- | | 401 / 403 | 核对 Key、GPT Image 权限和实际使用路径的 Allowed APIs。 | | 400 | 核对提示词、模型、WIDTHxHEIGHT 尺寸和图片数量。 | | pending | 等待并查询同一任务 ID,不重跑创建。 | | 429 | 降低并发,避免自动重试付费创建。 | | 创建超时或 5xx | 先检查请求历史,再考虑再次提交。 | | failed 或任务不存在 | 检查任务或 Trace ID 及保留期限。 |

Piece 只向 https://api.acedata.cloud 发送所选输入和 API Key,仅在终态返回媒体 URL,并过滤内部路由字段。源码 · 支持 · [email protected]。

生成、编辑及任务请求验证 HTTPS 证书,且仅访问 api.acedata.cloud。公开目录从固定的 platform.acedata.cloud 接口 schema 地址读取,不携带认证信息,验证 HTTPS 证书且不跟随重定向。网络失败与 HTTP 错误不自动重试;重新创建前先查请求历史。Piece 不提供独立代理设置。

图文配置参考

复制 Key 或管理密钥:真实脱敏 Ace 控制台 创建独立 Key:真实脱敏 Ace 控制台 官方 Activepieces 通用安装弹窗

2026-10-18 复用的真实/官方参考图,固定来源与边界保留。安装图不是本 Piece 已被官方共享目录收录的证明。管理员安装后按服务名搜索并核对 GPT Image 和已安装的 @acedatacloud/piece-gpt-image 包;Key 只放动作连接。源码 PR、npm 发版、官方目录收录与真实首用分别验收。