跳到主内容
@wquguru
精选88VoxAI 产品与模型

ChatGPT Pro每月赠API额度,教你用脚本批量生成4K图片

ChatGPT Pro now gives you $100 to $500 in API credits every month. They expire a…

原文
发到 X
推荐理由

这篇不仅披露了Pro版API额度的细节,还提供了可直接运行的批量生成脚本和成本优化方案,结构清晰且极具实操参考价值。

ChatGPT Pro now gives you $100 to $500 in API credits every month. They expire and don't roll over. And you can't spend them on Codex itself, not even by signing in to Codex with an API key.

ChatGPT Pro 现在每月为你提供 100 到 500 美元的 API 额度。这些额度会过期且不会结转。而且你无法在 Codex 本身中使用它们,即使使用 API 密钥登录 Codex 也不行。

So 𝘀𝗽𝗲𝗻𝗱 𝘁𝗵𝗲𝗺 𝗼𝗻 𝗶𝗺𝗮𝗴𝗲𝘀, 𝗺𝗮𝘅𝗲𝗱 𝗼𝘂𝘁. In ChatGPT you can't pick the model or the quality setting. According to one user's tests on the OpenAI forum, ChatGPT images are fixed at about 1.5 million pixels. A 16:9 image comes out at 1672×941.

所以把它们用在图片上,拉到最大。在 ChatGPT 中,你无法选择模型或质量设置。根据 OpenAI 论坛上某位用户的测试,ChatGPT 生成的图片固定约为 150 万像素。一张 16:9 的图片输出尺寸为 1672×941。

In the API, maxing out takes three parameters: model gpt-image-2.5-sunburst, quality max, size 3840×2160.

在 API 中,拉满需要三个参数:模型 gpt-image-2.5-sunburst,质量 max,尺寸 3840×2160。

And "high" 𝗶𝘀𝗻'𝘁 𝘁𝗵𝗲 𝗵𝗶𝗴𝗵𝗲𝘀𝘁 quality.

而“high”并不是最高质量。

gpt-image-2.5 has five quality settings, and high is only the third. At the same size, high gets a quarter of the tokens max gets. Leave quality out and it defaults to auto, where the model picks the setting.

gpt-image-2.5 有五种质量设置,high 仅排第三。在相同尺寸下,high 获得的 token 数是 max 的四分之一。如果不指定质量,默认值为 auto,由模型自行选择设置。

By OpenAI's own calculator, one 3840×2160 image at max costs about $0.40, so $200 of credits gets you 𝗮𝗿𝗼𝘂𝗻𝗱 𝟱𝟬𝟬. If you're not in a hurry, use the Batch API: half price, around 1,000 images for the same money. No Pro? Your own API key works too. You just pay for it yourself.

根据 OpenAI 自己的计算器,一张 3840×2160 的 max 质量图片成本约为 0.40 美元,因此 200 美元的额度大约可以生成 500 张。如果你不着急,可以使用 Batch API:价格减半,同样的钱可以生成约 1,000 张图片。没有 Pro?你自己的 API 密钥也可以使用,只是你需要自己付费。

Paste this into Claude Code or Codex. The script generates the images through the API, so they come out of those credits:

将此粘贴到 Claude Code 或 Codex 中。该脚本通过 API 生成图片,因此费用将从这些额度中扣除:

Write a script that reads prompts.txt (one prompt per line) and generates one image per line with the OpenAI Images API. Use model gpt-image-2.5-sunburst, quality "max", size 3840x2160. Read the key from OPENAI_API_KEY and save each image as a numbered PNG in ./out. After each image, print the output tokens from the response's usage field and a running total at $30 per million output tokens ($15 with --batch). Retry rate-limit errors with backoff, but stop if the error code is credit_balance_exhausted. Add a --batch flag that sends the same requests through the Batch API instead.

编写一个脚本,读取 prompts.txt(每行一个提示词),并使用 OpenAI Images API 为每行生成一张图片。使用模型 gpt-image-2.5-sunburst,质量“max”,尺寸 3840x2160。从 OPENAI_API_KEY 读取密钥,并将每张图片保存为 ./out 目录下的编号 PNG 文件。在每张图像生成后,打印响应 usage 字段中的输出 token 数以及累计总数(按每百万输出 token 30 美元计算,使用 --batch 时为 15 美元)。对速率限制错误进行退避重试,但如果错误代码为 credit_balance_exhausted,则停止。添加一个 --batch 标志,使相同的请求通过 Batch API 发送。

Two catches: Use an API key from the organization that got the credits. Keys from other orgs don't draw on them. The first time you call an image model, you may need to verify your organization in the developer console first.

两个注意事项: 请使用获得额度的组织的 API 密钥。其他组织的密钥无法从中扣费。 首次调用图像模型时,你可能需要先在开发者控制台中验证你的组织。

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

关联讨论

同一事件的更多信源

相似阅读

关联信息,但可能不是同一事件