codex curl 直接调用 gpt-image-2
- 内容介绍
- 文章标签
- 相关推荐
curl --location 'https://chatgpt.com/backend-api/codex/responses' \
--header 'Authorization: Bearer' \
--header 'chatgpt-account-id: ' \
--header 'user-agent: codex-tui/0.122.0 (Manjaro 26.1.0-pre; x86_64) vscode/3.0.12 (codex-tui; 0.122.0)' \
--header 'version: 0.122.0' \
--header 'originator: codex_cli_rs' \
--header 'session_id: test-session' \
--header 'accept: text/event-stream' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-5.4",
"input": [
{
"role": "user",
"content": "画一只可爱的猫抱着水獭"
}
],
"tools": [
{
"type": "image_generation",
"output_format": "png"
}
],
"instructions": "you are a helpful assistant",
"tool_choice": "auto",
"stream": true,
"store": false
}'
看了下返回值,貌似是按 token 计算的,并且使用任意模型调用,最终都是 gpt-image-2,再也不用折腾 flow 打码了,这还要什么自行车
image1862×497 128 KB
--【壹】--:
free号不行么?不是说谱号也有。。。。
--【贰】--:
我也试了一下,可以呀,而且我这个中转站也是用的cpa(大概)吧。gpt-image-2自由!能用gpt5.4就能用image2。我用中转站的5.4调用image 2生成了图片(意味着公益站也可以)
--【叁】--:
话说codex这个有数量限制嘛
有的话是多少张
按 token 计算的
哦如果按token算,我懂了
--【肆】--:
那我的5xpro的额度岂不是可以生很多图?
--【伍】--:
感觉是按token算的,没看到接口有返回单独的限制
--【陆】--:
看来是账号的问题,我用free的号池进行测试不行,换成plus后直接支持了
--【柒】--:
我拿cpa测试了下没法用,返回了一串文字,期待后续cpa支持!
--【捌】--:
我理解可能普号有web的权限但是codex调用只有plus team有?
curl --location 'https://chatgpt.com/backend-api/codex/responses' \
--header 'Authorization: Bearer' \
--header 'chatgpt-account-id: ' \
--header 'user-agent: codex-tui/0.122.0 (Manjaro 26.1.0-pre; x86_64) vscode/3.0.12 (codex-tui; 0.122.0)' \
--header 'version: 0.122.0' \
--header 'originator: codex_cli_rs' \
--header 'session_id: test-session' \
--header 'accept: text/event-stream' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-5.4",
"input": [
{
"role": "user",
"content": "画一只可爱的猫抱着水獭"
}
],
"tools": [
{
"type": "image_generation",
"output_format": "png"
}
],
"instructions": "you are a helpful assistant",
"tool_choice": "auto",
"stream": true,
"store": false
}'
看了下返回值,貌似是按 token 计算的,并且使用任意模型调用,最终都是 gpt-image-2,再也不用折腾 flow 打码了,这还要什么自行车
image1862×497 128 KB
--【壹】--:
free号不行么?不是说谱号也有。。。。
--【贰】--:
我也试了一下,可以呀,而且我这个中转站也是用的cpa(大概)吧。gpt-image-2自由!能用gpt5.4就能用image2。我用中转站的5.4调用image 2生成了图片(意味着公益站也可以)
--【叁】--:
话说codex这个有数量限制嘛
有的话是多少张
按 token 计算的
哦如果按token算,我懂了
--【肆】--:
那我的5xpro的额度岂不是可以生很多图?
--【伍】--:
感觉是按token算的,没看到接口有返回单独的限制
--【陆】--:
看来是账号的问题,我用free的号池进行测试不行,换成plus后直接支持了
--【柒】--:
我拿cpa测试了下没法用,返回了一串文字,期待后续cpa支持!
--【捌】--:
我理解可能普号有web的权限但是codex调用只有plus team有?

