Unlock exclusive introductory pricing for the newly launched Gemini 3.5 Flash.
O

GPT 5 Codex

่ผธๅ…ฅ:$1/M
่ผธๅ‡บ:$8/M
ไธŠไธ‹ๆ–‡:400K
ๆœ€ๅคง่ผธๅ‡บ:128K
็™ผๅธƒๆ™‚้–“:Oct 9, 2025

GPT-5-Codex is a high-performance large language model focused on code generation and understanding, with enhanced capabilities for complex programming tasks, code reasoning, and production-level applications.

ๆ–ฐ
ๅ•†ๆฅญ็”จ้€”

GPT 5 Codex ็š„ Playground

ๆŽข็ดข GPT 5 Codex ็š„ Playground โ€” ไธ€ๅ€‹ไบ’ๅ‹•ๅผ็’ฐๅขƒ๏ผŒๅฏๆธฌ่ฉฆๆจกๅž‹ไธฆๅณๆ™‚ๅŸท่กŒๆŸฅ่ฉขใ€‚ๅ˜—่ฉฆๆ็คบใ€่ชฟๆ•ดๅƒๆ•ธ๏ผŒไธฆ็ซ‹ๅณ่ฟญไปฃไปฅๅŠ ้€Ÿ้–‹็™ผไธฆ้ฉ—่ญ‰ไฝฟ็”จๆกˆไพ‹ใ€‚

What is the GPT-5-Codex ?

GPT-5-Codex is a specialized variant of OpenAIโ€™s GPT-5 family designed for complex software engineering workflows: coding, large-scale refactoring, long multi-step agentic tasks, and extended autonomous runs inside the Codex environment (CLI, IDE extension, and cloud). It is positioned as the default model for OpenAIโ€™s Codex product and is accessible via the Responses API and Codex subscriptions.

Key features

  • Agentic optimization โ€” tuned to run inside agent loops and tool-driven workflows (better consistency when using tools/CLIs). Agentic and tool usage are first-class.
  • Code quality focus โ€” produces cleaner, more steerable code for refactoring, review, and long-running development tasks.
  • IDE & product integration โ€” integrated into developer products (e.g., GitHub Copilot preview rollouts) and OpenAIโ€™s Codex SDK/CLI.
  • Responses API only โ€” uses the newer Responses API pattern (token reuse, agent loop support) for best results; legacy Completion calls can underperform on Codex tasks.

Technical details โ€” training & architecture

  • Base lineage: GPT-5-Codex is a derivative of GPT-5, built by further tuning the GPT-5 snapshot for coding tasks and agent behaviors. Model internals (exact parameter count, training compute) are not publicly enumerated; OpenAI publishes capabilities and tuning approach rather than raw parameter counts.
  • Training focus: emphasis on real-world software engineering corpora, interactive agent traces, tool-use trajectories, and instruction tuning to improve steerability and long-horizon correctness.
  • Tool & agent loop tuning: prompt and tool definitions were adjusted so the Codex agent loop runs faster and yields more accurate multi-step outcomes when compared to a vanilla GPT-5 in comparable setups.

Benchmark performance

Public benchmarking from independent reviewers and aggregator sites shows GPT-5-Codex leading or near-leading on modern coding benchmarks:

  • SWE-Bench (real-world coding tasks): independent summary reports ~โ‰ˆ77% success on a 500-task suite (reported in a third-party review). This was noted as slightly above the general-purpose GPT-5 (high) baseline in that review.
  • LiveCodeBench / other code benchmarks: aggregator sites report high relative performance (examples include LiveCodeBench scores in the mid-80s for certain tasks).

Model versioning & availability

Availability channels: Responses API (model id gpt-5-codex)

gpt-5-codex-low/medium/high โ€“ Specialized for coding & software engineering:

  • gpt-5-codex-low
  • gpt-5-codex-medium
  • gpt-5-codex-high

Support /v1/responses format call

Limitations

  • Latency & compute: agentic workflows can be compute-intensive and sometimes slower than lighter models, particularly when the model runs test suites or performs extensive static analysis.
  • Hallucination & overconfidence: despite improvements, GPT-5-Codex can still hallucinate APIs, file paths, or test coverageโ€”users must validate generated code and CI outputs.
  • Context length & state: while the model is tuned for longer sessions, it remains bounded by practical context/attention limits; extremely large codebases require chunking, retrieval augmentation, or tool-assisted memory.
  • Safety & security: automated code changes can introduce security regressions or license violations; human oversight and secure CI gating are mandatory.

Use cases

  • Automated code review โ€” produce reviewer comments, identify regressions, and suggest fixes.
  • Feature development & refactoring โ€” large multi-file edits with tests run by the model and CI validation.
  • Test synthesis & TDD automation โ€” generate unit/integration tests and iterate until passing.
  • Developer assistants & agents โ€” integrated into IDE plugins, CI pipelines, or autonomous agents to carry out complex engineering tasks.

How to use GPT-5 Codex API

Required Steps

  • Log in to cometapi.com. If you are not our user yet, please register first.
  • Sign into your CometAPI console.
  • Get the access credential API key of the interface. Click โ€œAdd Tokenโ€ at the API token in the personal center, get the token key: sk-xxxxx and submit.

Use Method

  1. Select the โ€œgpt-5-codexโ€ endpoint to send the API request and set the request body. The request method and request body are obtained from our website API doc. Our website also provides Apifox test for your convenience.
  2. Replace <YOUR_API_KEY> with your actual CometAPI key from your account.
  3. Insert your question or request into the content fieldโ€”this is what the model will respond to.
  4. . Process the API response to get the generated answer.

CometAPI provides a fully compatible REST APIโ€”for seamless migration. Key details to Responses

See also GPT-5.1 API and GPT-5.1-Chat-latest API

GPT 5 Codex ็š„ๅฎšๅƒน

ๆŽข็ดข GPT 5 Codex ็š„็ซถ็ˆญๆ€งๅฎšๅƒน๏ผŒๅฐˆ็‚บๆปฟ่ถณๅ„็จฎ้ ็ฎ—ๅ’Œไฝฟ็”จ้œ€ๆฑ‚่€Œ่จญ่จˆใ€‚ๆˆ‘ๅ€‘้ˆๆดป็š„ๆ–นๆกˆ็ขบไฟๆ‚จๅช้œ€็‚บๅฏฆ้š›ไฝฟ็”จ้‡ไป˜่ฒป๏ผŒ่ฎ“ๆ‚จ่ƒฝๅค ้šจ่‘—้œ€ๆฑ‚ๅขž้•ท่ผ•้ฌ†ๆ“ดๅฑ•ใ€‚ไบ†่งฃ GPT 5 Codex ๅฆ‚ไฝ•ๅœจไฟๆŒๆˆๆœฌๅฏๆŽง็š„ๅŒๆ™‚ๆๅ‡ๆ‚จ็š„ๅฐˆๆกˆๆ•ˆๆžœใ€‚

ModelComet Price (USD / M Tokens)Official Price (USD / M Tokens)Discount
gpt-5-codex
่ผธๅ…ฅ:$1/M
่ผธๅ‡บ:$8/M
่ผธๅ…ฅ:$1.25/M
่ผธๅ‡บ:$10/M
-20%

GPT 5 Codex ็š„็ฏ„ไพ‹็จ‹ๅผ็ขผๅ’Œ API

ๅญ˜ๅ–ๅฎŒๆ•ด็š„็ฏ„ไพ‹็จ‹ๅผ็ขผๅ’Œ API ่ณ‡ๆบ๏ผŒไปฅ็ฐกๅŒ–ๆ‚จ็š„ GPT 5 Codex ๆ•ดๅˆๆต็จ‹ใ€‚ๆˆ‘ๅ€‘่ฉณ็›ก็š„ๆ–‡ไปถๆไพ›้€ๆญฅๆŒ‡ๅผ•๏ผŒๅ”ๅŠฉๆ‚จๅœจๅฐˆๆกˆไธญๅ……ๅˆ†็™ผๆฎ GPT 5 Codex ็š„ๆฝ›ๅŠ›ใ€‚

curl https://api.cometapi.com/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -d '{
    "model": "gpt-5-codex",
    "input": "Tell me a three sentence bedtime story about a unicorn."
  }'

cURL Code Example

curl https://api.cometapi.com/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -d '{
    "model": "gpt-5-codex",
    "input": "Tell me a three sentence bedtime story about a unicorn."
  }'

Python Code Example

from openai import OpenAI
import os

# Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here
COMETAPI_KEY = os.environ.get("COMETAPI_KEY") or "<YOUR_COMETAPI_KEY>"
BASE_URL = "https://api.cometapi.com/v1"

client = OpenAI(base_url=BASE_URL, api_key=COMETAPI_KEY)
response = client.responses.create(
    model="gpt-5-codex", input="Tell me a three sentence bedtime story about a unicorn."
)

print(response)

JavaScript Code Example

import OpenAI from "openai";

// Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here
const api_key = process.env.COMETAPI_KEY;
const base_url = "https://api.cometapi.com/v1";

const openai = new OpenAI({
  apiKey: api_key,
  baseURL: base_url,
});

const response = await openai.responses.create({
  model: "gpt-5-codex",
  input: "Tell me a three sentence bedtime story about a unicorn.",
});

console.log(response);

GPT 5 Codex็š„็‰ˆๆœฌ

GPT 5 Codexๆ“ๆœ‰ๅคšๅ€‹ๅฟซ็…ง็š„ๅŽŸๅ› ๅฏ่ƒฝๅŒ…ๆ‹ฌ๏ผšๆ›ดๆ–ฐๅพŒ่ผธๅ‡บ็ตๆžœๅญ˜ๅœจๅทฎ็•ฐ้œ€ไฟ็•™่ˆŠ็‰ˆๅฟซ็…งไปฅ็ขบไฟไธ€่‡ดๆ€งใ€็‚บ้–‹็™ผ่€…ๆไพ›้ฉๆ‡‰่ˆ‡้ท็งป็š„้ŽๆธกๆœŸ๏ผŒไปฅๅŠไธๅŒๅฟซ็…งๅฐๆ‡‰ๅ…จ็ƒๆˆ–ๅ€ๅŸŸ็ซฏ้ปžไปฅๅ„ชๅŒ–ไฝฟ็”จ่€…้ซ”้ฉ—็ญ‰ๆฝ›ๅœจๅ› ็ด ใ€‚ๅ„็‰ˆๆœฌ้–“็š„ๅ…ท้ซ”ๅทฎ็•ฐ่ซ‹ๅƒ้–ฑๅฎ˜ๆ–นๆ–‡ไปถ่ชชๆ˜Žใ€‚

Version
gpt-5-codex