跳转到内容

Codex 终端逆向接口文档

基础信息

官网地址: https://openai.com/zh-Hans-CN/codex

Base URL: http://<你的IP>:<你的端口>/codex

认证方式: Bearer Token

Token 提取: 点击查看

模型列表

  • gpt-5.2
  • gpt-5.3-codex
  • gpt-5.3-codex-spark
  • gpt-5.4
  • gpt-5.4-mini
  • gpt-5.5
  • gpt-image-2

模型参数

什么是模型参数?

模型参数推理等级适用范围
low低级推理gpt-image-2 除外
medium中级推理gpt-image-2 除外
high高级推理gpt-image-2 除外
xhigh超高级推理gpt-image-2 除外

接口支持概览

端点接口支持情况函数调用备注
V1ChatCompletions 接口-
V1Messages 接口额外收费
V1Responses 接口-
V1BetaModels 接口额外收费
V1Images 接口额外收费
V1Videos 接口-

gpt-image-2 模型额外参数

具体官方参数请查看:https://developers.openai.com/api/docs/guides/image-generation#size-and-quality-options

bash
curl -X POST 'http://localhost/{platform}/v1/images/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <你的许可证>' \
--data-raw '{
    "size": "2048x2048",
    "prompt": "画小猫",
    "model": "gpt-image-2"
}'
bash
curl -X POST 'http://localhost/{platform}/v1/images/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <你的许可证>' \
--data-raw '{
    "size": "3840x2160",
    "prompt": "画小猫",
    "model": "gpt-image-2"
}'