You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: ID of the model to use. See the [model endpoint compatibility](https://platform.openai.com/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API.
22285
-
example: "gpt-4-turbo"
22291
+
example: "gpt-5"
22286
22292
anyOf:
22287
22293
- type: string
22288
22294
- type: string
22289
22295
enum:
22290
22296
[
22297
+
"gpt-5",
22298
+
"gpt-5-mini",
22299
+
"gpt-5-nano",
22300
+
"o4-mini",
22301
+
"o3",
22302
+
"o3-mini",
22303
+
"o1",
22304
+
"o1-mini",
22291
22305
"gpt-4o",
22306
+
"gpt-4o-mini",
22292
22307
"gpt-4o-2024-05-13",
22293
22308
"gpt-4-turbo",
22294
22309
"gpt-4-turbo-2024-04-09",
@@ -22342,9 +22357,21 @@ components:
22342
22357
nullable: true
22343
22358
max_tokens:
22344
22359
description: |
22345
-
The maximum number of [tokens](https://platform.openai.com/tokenizer?view=bpe) that can be generated in the chat completion.
22360
+
Deprecated in favor of `max_completion_tokens`.
22361
+
22362
+
The maximum number of [tokens](https://platform.openai.com/tokenizer?view=bpe) that can be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.
22346
22363
22347
-
The total length of input tokens and generated tokens is limited by the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.
**Not supported:** o-series reasoning models (o1, o3, o3-mini, o4-mini) and GPT-5 series — use `max_completion_tokens` instead.
22367
+
type: integer
22368
+
nullable: true
22369
+
deprecated: true
22370
+
max_completion_tokens:
22371
+
description: |
22372
+
An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
22373
+
22374
+
**Supported models:** GPT-5 series, o-series reasoning models (o1, o3, o3-mini, o4-mini) — required. Also supported on GPT-4o, GPT-4o-mini, GPT-4, GPT-4 Turbo, GPT-3.5 Turbo as a replacement for `max_tokens`.
22348
22375
type: integer
22349
22376
nullable: true
22350
22377
n:
@@ -24999,6 +25026,28 @@ components:
24999
25026
total_tokens:
25000
25027
type: integer
25001
25028
description: Total number of tokens used in the request (prompt + completion).
25029
+
completion_tokens_details:
25030
+
type: object
25031
+
nullable: true
25032
+
description: Breakdown of tokens used in a completion.
25033
+
properties:
25034
+
reasoning_tokens:
25035
+
type: integer
25036
+
description: Tokens generated by the model for reasoning.
25037
+
accepted_prediction_tokens:
25038
+
type: integer
25039
+
description: When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion.
25040
+
rejected_prediction_tokens:
25041
+
type: integer
25042
+
description: When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion.
25043
+
prompt_tokens_details:
25044
+
type: object
25045
+
nullable: true
25046
+
description: Breakdown of tokens used in the prompt.
0 commit comments