SpyBara
Go Premium

Reference 2026-07-22 20:02 UTC to 2026-07-23 18:00 UTC

123 files changed +4,326 −165. View all changes and history on the product overview
2026
Fri 31 21:03 Thu 30 23:58 Wed 29 15:02 Thu 23 18:00 Thu 16 20:57 Tue 14 06:58 Mon 13 15:59 Sun 12 06:58 Thu 9 20:58
Details

591 - `context: optional "auto" or "current_turn" or "all_turns"`591 - `context: optional "auto" or "current_turn" or "all_turns"`

592 592 

593 Controls which reasoning items are rendered back to the model on later turns.593 Controls which reasoning items are rendered back to the model on later turns.

594 If omitted or set to `auto`, the model determines the context mode. The

595 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

596 `current_turn`.

597 

594 When returned on a response, this is the effective reasoning context mode598 When returned on a response, this is the effective reasoning context mode

595 used for the response.599 used for the response.

596 600 

Details

30 30 

31 - `id: string`31 - `id: string`

32 32 

33 The identifier of the API key.

34 

33 - `created_at: number`35 - `created_at: number`

34 36 

37 The Unix timestamp (in seconds) when the API key was created.

38 

35 - `name: string`39 - `name: string`

36 40 

41 The name of the API key.

42 

37 - `object: "organization.project.service_account.api_key"`43 - `object: "organization.project.service_account.api_key"`

38 44 

39 The object type, which is always `organization.project.service_account.api_key`45 The object type, which is always `organization.project.service_account.api_key`

40 46 

41 - `value: string`47 - `value: string`

42 48 

49 The unredacted API key value.

50 

43### Example51### Example

44 52 

45```cli53```cli

Details

1## Delete project spend limit

2 

3`$ openai admin:organization:projects:spend-limit delete`

4 

5**delete** `/organization/projects/{project_id}/spend_limit`

6 

7Delete a project's hard spend limit.

8 

9### Parameters

10 

11- `--project-id: string`

12 

13 The ID of the project whose hard spend limit is being managed.

14 

15### Returns

16 

17- `project_spend_limit_deleted: object { deleted, object }`

18 

19 Confirmation payload returned after deleting a project hard spend limit.

20 

21 - `deleted: boolean`

22 

23 Whether the hard spend limit was deleted.

24 

25 - `object: "project.spend_limit.deleted"`

26 

27 The object type, which is always `project.spend_limit.deleted`.

28 

29### Example

30 

31```cli

32openai admin:organization:projects:spend-limit delete \

33 --admin-api-key 'My Admin API Key' \

34 --project-id proj_123

35```

36 

37#### Response

38 

39```json

40{

41 "deleted": true,

42 "object": "project.spend_limit.deleted"

43}

44```

Details

1## Retrieve project spend limit

2 

3`$ openai admin:organization:projects:spend-limit retrieve`

4 

5**get** `/organization/projects/{project_id}/spend_limit`

6 

7Get a project's hard spend limit.

8 

9### Parameters

10 

11- `--project-id: string`

12 

13 The ID of the project whose hard spend limit is being managed.

14 

15### Returns

16 

17- `project_spend_limit: object { currency, enforcement, interval, 2 more }`

18 

19 Represents a hard spend limit configured at the project level.

20 

21 - `currency: string or "USD"`

22 

23 The currency for the threshold amount. Currently, only `USD` is supported.

24 

25 - `"USD"`

26 

27 - `enforcement: object { status }`

28 

29 The current enforcement state of the hard spend limit.

30 

31 - `status: string or "inactive" or "enforcing"`

32 

33 Whether the hard spend limit is currently enforcing.

34 

35 - `"inactive"`

36 

37 - `"enforcing"`

38 

39 - `interval: string or "month"`

40 

41 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

42 

43 - `"month"`

44 

45 - `object: "project.spend_limit"`

46 

47 The object type, which is always `project.spend_limit`.

48 

49 - `threshold_amount: number`

50 

51 The hard spend limit amount, in cents.

52 

53### Example

54 

55```cli

56openai admin:organization:projects:spend-limit retrieve \

57 --admin-api-key 'My Admin API Key' \

58 --project-id proj_123

59```

60 

61#### Response

62 

63```json

64{

65 "currency": "USD",

66 "enforcement": {

67 "status": "inactive"

68 },

69 "interval": "month",

70 "object": "project.spend_limit",

71 "threshold_amount": 0

72}

73```

Details

1## Update project spend limit

2 

3`$ openai admin:organization:projects:spend-limit update`

4 

5**post** `/organization/projects/{project_id}/spend_limit`

6 

7Create or replace a project's hard spend limit.

8 

9### Parameters

10 

11- `--project-id: string`

12 

13 The ID of the project whose hard spend limit is being managed.

14 

15- `--currency: "USD"`

16 

17 The currency for the threshold amount. Currently, only `USD` is supported.

18 

19- `--interval: "month"`

20 

21 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

22 

23- `--threshold-amount: number`

24 

25 The hard spend limit amount, in cents.

26 

27### Returns

28 

29- `project_spend_limit: object { currency, enforcement, interval, 2 more }`

30 

31 Represents a hard spend limit configured at the project level.

32 

33 - `currency: string or "USD"`

34 

35 The currency for the threshold amount. Currently, only `USD` is supported.

36 

37 - `"USD"`

38 

39 - `enforcement: object { status }`

40 

41 The current enforcement state of the hard spend limit.

42 

43 - `status: string or "inactive" or "enforcing"`

44 

45 Whether the hard spend limit is currently enforcing.

46 

47 - `"inactive"`

48 

49 - `"enforcing"`

50 

51 - `interval: string or "month"`

52 

53 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

54 

55 - `"month"`

56 

57 - `object: "project.spend_limit"`

58 

59 The object type, which is always `project.spend_limit`.

60 

61 - `threshold_amount: number`

62 

63 The hard spend limit amount, in cents.

64 

65### Example

66 

67```cli

68openai admin:organization:projects:spend-limit update \

69 --admin-api-key 'My Admin API Key' \

70 --project-id proj_123 \

71 --currency USD \

72 --interval month \

73 --threshold-amount 1

74```

75 

76#### Response

77 

78```json

79{

80 "currency": "USD",

81 "enforcement": {

82 "status": "inactive"

83 },

84 "interval": "month",

85 "object": "project.spend_limit",

86 "threshold_amount": 0

87}

88```

Details

1## Delete organization spend limit

2 

3`$ openai admin:organization:spend-limit delete`

4 

5**delete** `/organization/spend_limit`

6 

7Delete the organization's hard spend limit.

8 

9### Returns

10 

11- `organization_spend_limit_deleted: object { deleted, object }`

12 

13 Confirmation payload returned after deleting an organization hard spend limit.

14 

15 - `deleted: boolean`

16 

17 Whether the hard spend limit was deleted.

18 

19 - `object: "organization.spend_limit.deleted"`

20 

21 The object type, which is always `organization.spend_limit.deleted`.

22 

23### Example

24 

25```cli

26openai admin:organization:spend-limit delete \

27 --admin-api-key 'My Admin API Key'

28```

29 

30#### Response

31 

32```json

33{

34 "deleted": true,

35 "object": "organization.spend_limit.deleted"

36}

37```

Details

1## Retrieve organization spend limit

2 

3`$ openai admin:organization:spend-limit retrieve`

4 

5**get** `/organization/spend_limit`

6 

7Get the organization's hard spend limit.

8 

9### Returns

10 

11- `organization_spend_limit: object { currency, enforcement, interval, 2 more }`

12 

13 Represents a hard spend limit configured at the organization level.

14 

15 - `currency: string or "USD"`

16 

17 The currency for the threshold amount. Currently, only `USD` is supported.

18 

19 - `"USD"`

20 

21 - `enforcement: object { status }`

22 

23 The current enforcement state of the hard spend limit.

24 

25 - `status: string or "inactive" or "enforcing"`

26 

27 Whether the hard spend limit is currently enforcing.

28 

29 - `"inactive"`

30 

31 - `"enforcing"`

32 

33 - `interval: string or "month"`

34 

35 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

36 

37 - `"month"`

38 

39 - `object: "organization.spend_limit"`

40 

41 The object type, which is always `organization.spend_limit`.

42 

43 - `threshold_amount: number`

44 

45 The hard spend limit amount, in cents.

46 

47### Example

48 

49```cli

50openai admin:organization:spend-limit retrieve \

51 --admin-api-key 'My Admin API Key'

52```

53 

54#### Response

55 

56```json

57{

58 "currency": "USD",

59 "enforcement": {

60 "status": "inactive"

61 },

62 "interval": "month",

63 "object": "organization.spend_limit",

64 "threshold_amount": 0

65}

66```

Details

1## Update organization spend limit

2 

3`$ openai admin:organization:spend-limit update`

4 

5**post** `/organization/spend_limit`

6 

7Create or replace the organization's hard spend limit.

8 

9### Parameters

10 

11- `--currency: "USD"`

12 

13 The currency for the threshold amount. Currently, only `USD` is supported.

14 

15- `--interval: "month"`

16 

17 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

18 

19- `--threshold-amount: number`

20 

21 The hard spend limit amount, in cents.

22 

23### Returns

24 

25- `organization_spend_limit: object { currency, enforcement, interval, 2 more }`

26 

27 Represents a hard spend limit configured at the organization level.

28 

29 - `currency: string or "USD"`

30 

31 The currency for the threshold amount. Currently, only `USD` is supported.

32 

33 - `"USD"`

34 

35 - `enforcement: object { status }`

36 

37 The current enforcement state of the hard spend limit.

38 

39 - `status: string or "inactive" or "enforcing"`

40 

41 Whether the hard spend limit is currently enforcing.

42 

43 - `"inactive"`

44 

45 - `"enforcing"`

46 

47 - `interval: string or "month"`

48 

49 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

50 

51 - `"month"`

52 

53 - `object: "organization.spend_limit"`

54 

55 The object type, which is always `organization.spend_limit`.

56 

57 - `threshold_amount: number`

58 

59 The hard spend limit amount, in cents.

60 

61### Example

62 

63```cli

64openai admin:organization:spend-limit update \

65 --admin-api-key 'My Admin API Key' \

66 --currency USD \

67 --interval month \

68 --threshold-amount 1

69```

70 

71#### Response

72 

73```json

74{

75 "currency": "USD",

76 "enforcement": {

77 "status": "inactive"

78 },

79 "interval": "month",

80 "object": "organization.spend_limit",

81 "threshold_amount": 0

82}

83```

Details

34 34 

35 An error object returned when the model fails to generate a Response.35 An error object returned when the model fails to generate a Response.

36 36 

37 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 16 more`37 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 17 more`

38 38 

39 The error code for the response.39 The error code for the response.

40 40 


44 44 

45 - `"invalid_prompt"`45 - `"invalid_prompt"`

46 46 

47 - `"data_residency_mismatch"`

48 

47 - `"bio_policy"`49 - `"bio_policy"`

48 50 

49 - `"vector_store_timeout"`51 - `"vector_store_timeout"`


6101 - `context: optional "auto" or "current_turn" or "all_turns"`6103 - `context: optional "auto" or "current_turn" or "all_turns"`

6102 6104 

6103 Controls which reasoning items are rendered back to the model on later turns.6105 Controls which reasoning items are rendered back to the model on later turns.

6106 If omitted or set to `auto`, the model determines the context mode. The

6107 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

6108 `current_turn`.

6109 

6104 When returned on a response, this is the effective reasoning context mode6110 When returned on a response, this is the effective reasoning context mode

6105 used for the response.6111 used for the response.

6106 6112 


6286 6292 

6287 Constrains the verbosity of the model's response. Lower values will result in6293 Constrains the verbosity of the model's response. Lower values will result in

6288 more concise responses, while higher values will result in more verbose responses.6294 more concise responses, while higher values will result in more verbose responses.

6289 Currently supported values are `low`, `medium`, and `high`.6295 Currently supported values are `low`, `medium`, and `high`. The default is

6296 `medium`.

6290 6297 

6291 - `"low"`6298 - `"low"`

6292 6299 

Details

253 253 

254 An error object returned when the model fails to generate a Response.254 An error object returned when the model fails to generate a Response.

255 255 

256 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 16 more`256 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 17 more`

257 257 

258 The error code for the response.258 The error code for the response.

259 259 


263 263 

264 - `"invalid_prompt"`264 - `"invalid_prompt"`

265 265 

266 - `"data_residency_mismatch"`

267 

266 - `"bio_policy"`268 - `"bio_policy"`

267 269 

268 - `"vector_store_timeout"`270 - `"vector_store_timeout"`


6320 - `context: optional "auto" or "current_turn" or "all_turns"`6322 - `context: optional "auto" or "current_turn" or "all_turns"`

6321 6323 

6322 Controls which reasoning items are rendered back to the model on later turns.6324 Controls which reasoning items are rendered back to the model on later turns.

6325 If omitted or set to `auto`, the model determines the context mode. The

6326 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

6327 `current_turn`.

6328 

6323 When returned on a response, this is the effective reasoning context mode6329 When returned on a response, this is the effective reasoning context mode

6324 used for the response.6330 used for the response.

6325 6331 


6505 6511 

6506 Constrains the verbosity of the model's response. Lower values will result in6512 Constrains the verbosity of the model's response. Lower values will result in

6507 more concise responses, while higher values will result in more verbose responses.6513 more concise responses, while higher values will result in more verbose responses.

6508 Currently supported values are `low`, `medium`, and `high`.6514 Currently supported values are `low`, `medium`, and `high`. The default is

6515 `medium`.

6509 6516 

6510 - `"low"`6517 - `"low"`

6511 6518 

Details

51 51 

52 An error object returned when the model fails to generate a Response.52 An error object returned when the model fails to generate a Response.

53 53 

54 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 16 more`54 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 17 more`

55 55 

56 The error code for the response.56 The error code for the response.

57 57 


61 61 

62 - `"invalid_prompt"`62 - `"invalid_prompt"`

63 63 

64 - `"data_residency_mismatch"`

65 

64 - `"bio_policy"`66 - `"bio_policy"`

65 67 

66 - `"vector_store_timeout"`68 - `"vector_store_timeout"`


6118 - `context: optional "auto" or "current_turn" or "all_turns"`6120 - `context: optional "auto" or "current_turn" or "all_turns"`

6119 6121 

6120 Controls which reasoning items are rendered back to the model on later turns.6122 Controls which reasoning items are rendered back to the model on later turns.

6123 If omitted or set to `auto`, the model determines the context mode. The

6124 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

6125 `current_turn`.

6126 

6121 When returned on a response, this is the effective reasoning context mode6127 When returned on a response, this is the effective reasoning context mode

6122 used for the response.6128 used for the response.

6123 6129 


6303 6309 

6304 Constrains the verbosity of the model's response. Lower values will result in6310 Constrains the verbosity of the model's response. Lower values will result in

6305 more concise responses, while higher values will result in more verbose responses.6311 more concise responses, while higher values will result in more verbose responses.

6306 Currently supported values are `low`, `medium`, and `high`.6312 Currently supported values are `low`, `medium`, and `high`. The default is

6313 `medium`.

6307 6314 

6308 - `"low"`6315 - `"low"`

6309 6316 

Details

284 284 

285 Constrains the verbosity of the model's response. Lower values will result in285 Constrains the verbosity of the model's response. Lower values will result in

286 more concise responses, while higher values will result in more verbose responses.286 more concise responses, while higher values will result in more verbose responses.

287 Currently supported values are `low`, `medium`, and `high`.287 Currently supported values are `low`, `medium`, and `high`. The default is

288 `medium`.

288 289 

289- `--web-search-options: optional object { search_context_size, user_location }`290- `--web-search-options: optional object { search_context_size, user_location }`

290 291 

Details

30 30 

31 An error object returned when the model fails to generate a Response.31 An error object returned when the model fails to generate a Response.

32 32 

33 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 16 more`33 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 17 more`

34 34 

35 The error code for the response.35 The error code for the response.

36 36 


40 40 

41 - `"invalid_prompt"`41 - `"invalid_prompt"`

42 42 

43 - `"data_residency_mismatch"`

44 

43 - `"bio_policy"`45 - `"bio_policy"`

44 46 

45 - `"vector_store_timeout"`47 - `"vector_store_timeout"`


5273 - `context: optional "auto" or "current_turn" or "all_turns"`5275 - `context: optional "auto" or "current_turn" or "all_turns"`

5274 5276 

5275 Controls which reasoning items are rendered back to the model on later turns.5277 Controls which reasoning items are rendered back to the model on later turns.

5278 If omitted or set to `auto`, the model determines the context mode. The

5279 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

5280 `current_turn`.

5281 

5276 When returned on a response, this is the effective reasoning context mode5282 When returned on a response, this is the effective reasoning context mode

5277 used for the response.5283 used for the response.

5278 5284 


5466 5472 

5467 Constrains the verbosity of the model's response. Lower values will result in5473 Constrains the verbosity of the model's response. Lower values will result in

5468 more concise responses, while higher values will result in more verbose responses.5474 more concise responses, while higher values will result in more verbose responses.

5469 Currently supported values are `low`, `medium`, and `high`.5475 Currently supported values are `low`, `medium`, and `high`. The default is

5476 `medium`.

5470 5477 

5471 - `"low"`5478 - `"low"`

5472 5479 

Details

245 245 

246 An error object returned when the model fails to generate a Response.246 An error object returned when the model fails to generate a Response.

247 247 

248 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 16 more`248 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 17 more`

249 249 

250 The error code for the response.250 The error code for the response.

251 251 


255 255 

256 - `"invalid_prompt"`256 - `"invalid_prompt"`

257 257 

258 - `"data_residency_mismatch"`

259 

258 - `"bio_policy"`260 - `"bio_policy"`

259 261 

260 - `"vector_store_timeout"`262 - `"vector_store_timeout"`


5488 - `context: optional "auto" or "current_turn" or "all_turns"`5490 - `context: optional "auto" or "current_turn" or "all_turns"`

5489 5491 

5490 Controls which reasoning items are rendered back to the model on later turns.5492 Controls which reasoning items are rendered back to the model on later turns.

5493 If omitted or set to `auto`, the model determines the context mode. The

5494 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

5495 `current_turn`.

5496 

5491 When returned on a response, this is the effective reasoning context mode5497 When returned on a response, this is the effective reasoning context mode

5492 used for the response.5498 used for the response.

5493 5499 


5681 5687 

5682 Constrains the verbosity of the model's response. Lower values will result in5688 Constrains the verbosity of the model's response. Lower values will result in

5683 more concise responses, while higher values will result in more verbose responses.5689 more concise responses, while higher values will result in more verbose responses.

5684 Currently supported values are `low`, `medium`, and `high`.5690 Currently supported values are `low`, `medium`, and `high`. The default is

5691 `medium`.

5685 5692 

5686 - `"low"`5693 - `"low"`

5687 5694 

Details

47 47 

48 An error object returned when the model fails to generate a Response.48 An error object returned when the model fails to generate a Response.

49 49 

50 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 16 more`50 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 17 more`

51 51 

52 The error code for the response.52 The error code for the response.

53 53 


57 57 

58 - `"invalid_prompt"`58 - `"invalid_prompt"`

59 59 

60 - `"data_residency_mismatch"`

61 

60 - `"bio_policy"`62 - `"bio_policy"`

61 63 

62 - `"vector_store_timeout"`64 - `"vector_store_timeout"`


5290 - `context: optional "auto" or "current_turn" or "all_turns"`5292 - `context: optional "auto" or "current_turn" or "all_turns"`

5291 5293 

5292 Controls which reasoning items are rendered back to the model on later turns.5294 Controls which reasoning items are rendered back to the model on later turns.

5295 If omitted or set to `auto`, the model determines the context mode. The

5296 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

5297 `current_turn`.

5298 

5293 When returned on a response, this is the effective reasoning context mode5299 When returned on a response, this is the effective reasoning context mode

5294 used for the response.5300 used for the response.

5295 5301 


5483 5489 

5484 Constrains the verbosity of the model's response. Lower values will result in5490 Constrains the verbosity of the model's response. Lower values will result in

5485 more concise responses, while higher values will result in more verbose responses.5491 more concise responses, while higher values will result in more verbose responses.

5486 Currently supported values are `low`, `medium`, and `high`.5492 Currently supported values are `low`, `medium`, and `high`. The default is

5493 `medium`.

5487 5494 

5488 - `"low"`5495 - `"low"`

5489 5496 

Details

609 - `Context ReasoningContext`609 - `Context ReasoningContext`

610 610 

611 Controls which reasoning items are rendered back to the model on later turns.611 Controls which reasoning items are rendered back to the model on later turns.

612 If omitted or set to `auto`, the model determines the context mode. The

613 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

614 `current_turn`.

615 

612 When returned on a response, this is the effective reasoning context mode616 When returned on a response, this is the effective reasoning context mode

613 used for the response.617 used for the response.

614 618 

Details

10 10 

11- `projectID string`11- `projectID string`

12 12 

13 The ID of the project.

14 

13- `serviceAccountID string`15- `serviceAccountID string`

14 16 

17 The ID of the service account.

18 

15- `body AdminOrganizationProjectServiceAccountAPIKeyNewParams`19- `body AdminOrganizationProjectServiceAccountAPIKeyNewParams`

16 20 

17 - `Name param.Field[string]`21 - `Name param.Field[string]`


28 32 

29 - `ID string`33 - `ID string`

30 34 

35 The identifier of the API key.

36 

31 - `CreatedAt int64`37 - `CreatedAt int64`

32 38 

39 The Unix timestamp (in seconds) when the API key was created.

40 

33 - `Name string`41 - `Name string`

34 42 

43 The name of the API key.

44 

35 - `Object OrganizationProjectServiceAccountAPIKey`45 - `Object OrganizationProjectServiceAccountAPIKey`

36 46 

37 The object type, which is always `organization.project.service_account.api_key`47 The object type, which is always `organization.project.service_account.api_key`


40 50 

41 - `Value string`51 - `Value string`

42 52 

53 The unredacted API key value.

54 

43### Example55### Example

44 56 

45```go57```go

Details

1## Delete project spend limit

2 

3`client.Admin.Organization.Projects.SpendLimit.Delete(ctx, projectID) (*ProjectSpendLimitDeleted, error)`

4 

5**delete** `/organization/projects/{project_id}/spend_limit`

6 

7Delete a project's hard spend limit.

8 

9### Parameters

10 

11- `projectID string`

12 

13### Returns

14 

15- `type ProjectSpendLimitDeleted struct{…}`

16 

17 Confirmation payload returned after deleting a project hard spend limit.

18 

19 - `Deleted bool`

20 

21 Whether the hard spend limit was deleted.

22 

23 - `Object ProjectSpendLimitDeleted`

24 

25 The object type, which is always `project.spend_limit.deleted`.

26 

27 - `const ProjectSpendLimitDeletedProjectSpendLimitDeleted ProjectSpendLimitDeleted = "project.spend_limit.deleted"`

28 

29### Example

30 

31```go

32package main

33 

34import (

35 "context"

36 "fmt"

37 

38 "github.com/openai/openai-go"

39 "github.com/openai/openai-go/option"

40)

41 

42func main() {

43 client := openai.NewClient(

44 option.WithAdminAPIKey("My Admin API Key"),

45 )

46 projectSpendLimitDeleted, err := client.Admin.Organization.Projects.SpendLimit.Delete(context.TODO(), "proj_123")

47 if err != nil {

48 panic(err.Error())

49 }

50 fmt.Printf("%+v\n", projectSpendLimitDeleted.Deleted)

51}

52```

53 

54#### Response

55 

56```json

57{

58 "deleted": true,

59 "object": "project.spend_limit.deleted"

60}

61```

Details

1## Retrieve project spend limit

2 

3`client.Admin.Organization.Projects.SpendLimit.Get(ctx, projectID) (*ProjectSpendLimit, error)`

4 

5**get** `/organization/projects/{project_id}/spend_limit`

6 

7Get a project's hard spend limit.

8 

9### Parameters

10 

11- `projectID string`

12 

13### Returns

14 

15- `type ProjectSpendLimit struct{…}`

16 

17 Represents a hard spend limit configured at the project level.

18 

19 - `Currency ProjectSpendLimitCurrency`

20 

21 The currency for the threshold amount. Currently, only `USD` is supported.

22 

23 - `string`

24 

25 - `type ProjectSpendLimitCurrency string`

26 

27 The currency for the threshold amount. Currently, only `USD` is supported.

28 

29 - `const ProjectSpendLimitCurrencyUsd ProjectSpendLimitCurrency = "USD"`

30 

31 - `Enforcement ProjectSpendLimitEnforcement`

32 

33 The current enforcement state of the hard spend limit.

34 

35 - `Status string`

36 

37 Whether the hard spend limit is currently enforcing.

38 

39 - `string`

40 

41 - `string`

42 

43 - `const ProjectSpendLimitEnforcementStatusInactive ProjectSpendLimitEnforcementStatus = "inactive"`

44 

45 - `const ProjectSpendLimitEnforcementStatusEnforcing ProjectSpendLimitEnforcementStatus = "enforcing"`

46 

47 - `Interval ProjectSpendLimitInterval`

48 

49 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

50 

51 - `string`

52 

53 - `type ProjectSpendLimitInterval string`

54 

55 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

56 

57 - `const ProjectSpendLimitIntervalMonth ProjectSpendLimitInterval = "month"`

58 

59 - `Object ProjectSpendLimit`

60 

61 The object type, which is always `project.spend_limit`.

62 

63 - `const ProjectSpendLimitProjectSpendLimit ProjectSpendLimit = "project.spend_limit"`

64 

65 - `ThresholdAmount int64`

66 

67 The hard spend limit amount, in cents.

68 

69### Example

70 

71```go

72package main

73 

74import (

75 "context"

76 "fmt"

77 

78 "github.com/openai/openai-go"

79 "github.com/openai/openai-go/option"

80)

81 

82func main() {

83 client := openai.NewClient(

84 option.WithAdminAPIKey("My Admin API Key"),

85 )

86 projectSpendLimit, err := client.Admin.Organization.Projects.SpendLimit.Get(context.TODO(), "proj_123")

87 if err != nil {

88 panic(err.Error())

89 }

90 fmt.Printf("%+v\n", projectSpendLimit.Currency)

91}

92```

93 

94#### Response

95 

96```json

97{

98 "currency": "USD",

99 "enforcement": {

100 "status": "inactive"

101 },

102 "interval": "month",

103 "object": "project.spend_limit",

104 "threshold_amount": 0

105}

106```

Details

1## Update project spend limit

2 

3`client.Admin.Organization.Projects.SpendLimit.Update(ctx, projectID, body) (*ProjectSpendLimit, error)`

4 

5**post** `/organization/projects/{project_id}/spend_limit`

6 

7Create or replace a project's hard spend limit.

8 

9### Parameters

10 

11- `projectID string`

12 

13- `body AdminOrganizationProjectSpendLimitUpdateParams`

14 

15 - `Currency param.Field[AdminOrganizationProjectSpendLimitUpdateParamsCurrency]`

16 

17 The currency for the threshold amount. Currently, only `USD` is supported.

18 

19 - `const AdminOrganizationProjectSpendLimitUpdateParamsCurrencyUsd AdminOrganizationProjectSpendLimitUpdateParamsCurrency = "USD"`

20 

21 - `Interval param.Field[AdminOrganizationProjectSpendLimitUpdateParamsInterval]`

22 

23 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

24 

25 - `const AdminOrganizationProjectSpendLimitUpdateParamsIntervalMonth AdminOrganizationProjectSpendLimitUpdateParamsInterval = "month"`

26 

27 - `ThresholdAmount param.Field[int64]`

28 

29 The hard spend limit amount, in cents.

30 

31### Returns

32 

33- `type ProjectSpendLimit struct{…}`

34 

35 Represents a hard spend limit configured at the project level.

36 

37 - `Currency ProjectSpendLimitCurrency`

38 

39 The currency for the threshold amount. Currently, only `USD` is supported.

40 

41 - `string`

42 

43 - `type ProjectSpendLimitCurrency string`

44 

45 The currency for the threshold amount. Currently, only `USD` is supported.

46 

47 - `const ProjectSpendLimitCurrencyUsd ProjectSpendLimitCurrency = "USD"`

48 

49 - `Enforcement ProjectSpendLimitEnforcement`

50 

51 The current enforcement state of the hard spend limit.

52 

53 - `Status string`

54 

55 Whether the hard spend limit is currently enforcing.

56 

57 - `string`

58 

59 - `string`

60 

61 - `const ProjectSpendLimitEnforcementStatusInactive ProjectSpendLimitEnforcementStatus = "inactive"`

62 

63 - `const ProjectSpendLimitEnforcementStatusEnforcing ProjectSpendLimitEnforcementStatus = "enforcing"`

64 

65 - `Interval ProjectSpendLimitInterval`

66 

67 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

68 

69 - `string`

70 

71 - `type ProjectSpendLimitInterval string`

72 

73 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

74 

75 - `const ProjectSpendLimitIntervalMonth ProjectSpendLimitInterval = "month"`

76 

77 - `Object ProjectSpendLimit`

78 

79 The object type, which is always `project.spend_limit`.

80 

81 - `const ProjectSpendLimitProjectSpendLimit ProjectSpendLimit = "project.spend_limit"`

82 

83 - `ThresholdAmount int64`

84 

85 The hard spend limit amount, in cents.

86 

87### Example

88 

89```go

90package main

91 

92import (

93 "context"

94 "fmt"

95 

96 "github.com/openai/openai-go"

97 "github.com/openai/openai-go/option"

98)

99 

100func main() {

101 client := openai.NewClient(

102 option.WithAdminAPIKey("My Admin API Key"),

103 )

104 projectSpendLimit, err := client.Admin.Organization.Projects.SpendLimit.Update(

105 context.TODO(),

106 "proj_123",

107 openai.AdminOrganizationProjectSpendLimitUpdateParams{

108 Currency: openai.AdminOrganizationProjectSpendLimitUpdateParamsCurrencyUsd,

109 Interval: openai.AdminOrganizationProjectSpendLimitUpdateParamsIntervalMonth,

110 ThresholdAmount: 1,

111 },

112 )

113 if err != nil {

114 panic(err.Error())

115 }

116 fmt.Printf("%+v\n", projectSpendLimit.Currency)

117}

118```

119 

120#### Response

121 

122```json

123{

124 "currency": "USD",

125 "enforcement": {

126 "status": "inactive"

127 },

128 "interval": "month",

129 "object": "project.spend_limit",

130 "threshold_amount": 0

131}

132```

Details

1## Delete organization spend limit

2 

3`client.Admin.Organization.SpendLimit.Delete(ctx) (*OrganizationSpendLimitDeleted, error)`

4 

5**delete** `/organization/spend_limit`

6 

7Delete the organization's hard spend limit.

8 

9### Returns

10 

11- `type OrganizationSpendLimitDeleted struct{…}`

12 

13 Confirmation payload returned after deleting an organization hard spend limit.

14 

15 - `Deleted bool`

16 

17 Whether the hard spend limit was deleted.

18 

19 - `Object OrganizationSpendLimitDeleted`

20 

21 The object type, which is always `organization.spend_limit.deleted`.

22 

23 - `const OrganizationSpendLimitDeletedOrganizationSpendLimitDeleted OrganizationSpendLimitDeleted = "organization.spend_limit.deleted"`

24 

25### Example

26 

27```go

28package main

29 

30import (

31 "context"

32 "fmt"

33 

34 "github.com/openai/openai-go"

35 "github.com/openai/openai-go/option"

36)

37 

38func main() {

39 client := openai.NewClient(

40 option.WithAdminAPIKey("My Admin API Key"),

41 )

42 organizationSpendLimitDeleted, err := client.Admin.Organization.SpendLimit.Delete(context.TODO())

43 if err != nil {

44 panic(err.Error())

45 }

46 fmt.Printf("%+v\n", organizationSpendLimitDeleted.Deleted)

47}

48```

49 

50#### Response

51 

52```json

53{

54 "deleted": true,

55 "object": "organization.spend_limit.deleted"

56}

57```

Details

1## Retrieve organization spend limit

2 

3`client.Admin.Organization.SpendLimit.Get(ctx) (*OrganizationSpendLimit, error)`

4 

5**get** `/organization/spend_limit`

6 

7Get the organization's hard spend limit.

8 

9### Returns

10 

11- `type OrganizationSpendLimit struct{…}`

12 

13 Represents a hard spend limit configured at the organization level.

14 

15 - `Currency OrganizationSpendLimitCurrency`

16 

17 The currency for the threshold amount. Currently, only `USD` is supported.

18 

19 - `string`

20 

21 - `type OrganizationSpendLimitCurrency string`

22 

23 The currency for the threshold amount. Currently, only `USD` is supported.

24 

25 - `const OrganizationSpendLimitCurrencyUsd OrganizationSpendLimitCurrency = "USD"`

26 

27 - `Enforcement OrganizationSpendLimitEnforcement`

28 

29 The current enforcement state of the hard spend limit.

30 

31 - `Status string`

32 

33 Whether the hard spend limit is currently enforcing.

34 

35 - `string`

36 

37 - `string`

38 

39 - `const OrganizationSpendLimitEnforcementStatusInactive OrganizationSpendLimitEnforcementStatus = "inactive"`

40 

41 - `const OrganizationSpendLimitEnforcementStatusEnforcing OrganizationSpendLimitEnforcementStatus = "enforcing"`

42 

43 - `Interval OrganizationSpendLimitInterval`

44 

45 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

46 

47 - `string`

48 

49 - `type OrganizationSpendLimitInterval string`

50 

51 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

52 

53 - `const OrganizationSpendLimitIntervalMonth OrganizationSpendLimitInterval = "month"`

54 

55 - `Object OrganizationSpendLimit`

56 

57 The object type, which is always `organization.spend_limit`.

58 

59 - `const OrganizationSpendLimitOrganizationSpendLimit OrganizationSpendLimit = "organization.spend_limit"`

60 

61 - `ThresholdAmount int64`

62 

63 The hard spend limit amount, in cents.

64 

65### Example

66 

67```go

68package main

69 

70import (

71 "context"

72 "fmt"

73 

74 "github.com/openai/openai-go"

75 "github.com/openai/openai-go/option"

76)

77 

78func main() {

79 client := openai.NewClient(

80 option.WithAdminAPIKey("My Admin API Key"),

81 )

82 organizationSpendLimit, err := client.Admin.Organization.SpendLimit.Get(context.TODO())

83 if err != nil {

84 panic(err.Error())

85 }

86 fmt.Printf("%+v\n", organizationSpendLimit.Currency)

87}

88```

89 

90#### Response

91 

92```json

93{

94 "currency": "USD",

95 "enforcement": {

96 "status": "inactive"

97 },

98 "interval": "month",

99 "object": "organization.spend_limit",

100 "threshold_amount": 0

101}

102```

Details

1## Update organization spend limit

2 

3`client.Admin.Organization.SpendLimit.Update(ctx, body) (*OrganizationSpendLimit, error)`

4 

5**post** `/organization/spend_limit`

6 

7Create or replace the organization's hard spend limit.

8 

9### Parameters

10 

11- `body AdminOrganizationSpendLimitUpdateParams`

12 

13 - `Currency param.Field[AdminOrganizationSpendLimitUpdateParamsCurrency]`

14 

15 The currency for the threshold amount. Currently, only `USD` is supported.

16 

17 - `const AdminOrganizationSpendLimitUpdateParamsCurrencyUsd AdminOrganizationSpendLimitUpdateParamsCurrency = "USD"`

18 

19 - `Interval param.Field[AdminOrganizationSpendLimitUpdateParamsInterval]`

20 

21 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

22 

23 - `const AdminOrganizationSpendLimitUpdateParamsIntervalMonth AdminOrganizationSpendLimitUpdateParamsInterval = "month"`

24 

25 - `ThresholdAmount param.Field[int64]`

26 

27 The hard spend limit amount, in cents.

28 

29### Returns

30 

31- `type OrganizationSpendLimit struct{…}`

32 

33 Represents a hard spend limit configured at the organization level.

34 

35 - `Currency OrganizationSpendLimitCurrency`

36 

37 The currency for the threshold amount. Currently, only `USD` is supported.

38 

39 - `string`

40 

41 - `type OrganizationSpendLimitCurrency string`

42 

43 The currency for the threshold amount. Currently, only `USD` is supported.

44 

45 - `const OrganizationSpendLimitCurrencyUsd OrganizationSpendLimitCurrency = "USD"`

46 

47 - `Enforcement OrganizationSpendLimitEnforcement`

48 

49 The current enforcement state of the hard spend limit.

50 

51 - `Status string`

52 

53 Whether the hard spend limit is currently enforcing.

54 

55 - `string`

56 

57 - `string`

58 

59 - `const OrganizationSpendLimitEnforcementStatusInactive OrganizationSpendLimitEnforcementStatus = "inactive"`

60 

61 - `const OrganizationSpendLimitEnforcementStatusEnforcing OrganizationSpendLimitEnforcementStatus = "enforcing"`

62 

63 - `Interval OrganizationSpendLimitInterval`

64 

65 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

66 

67 - `string`

68 

69 - `type OrganizationSpendLimitInterval string`

70 

71 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

72 

73 - `const OrganizationSpendLimitIntervalMonth OrganizationSpendLimitInterval = "month"`

74 

75 - `Object OrganizationSpendLimit`

76 

77 The object type, which is always `organization.spend_limit`.

78 

79 - `const OrganizationSpendLimitOrganizationSpendLimit OrganizationSpendLimit = "organization.spend_limit"`

80 

81 - `ThresholdAmount int64`

82 

83 The hard spend limit amount, in cents.

84 

85### Example

86 

87```go

88package main

89 

90import (

91 "context"

92 "fmt"

93 

94 "github.com/openai/openai-go"

95 "github.com/openai/openai-go/option"

96)

97 

98func main() {

99 client := openai.NewClient(

100 option.WithAdminAPIKey("My Admin API Key"),

101 )

102 organizationSpendLimit, err := client.Admin.Organization.SpendLimit.Update(context.TODO(), openai.AdminOrganizationSpendLimitUpdateParams{

103 Currency: openai.AdminOrganizationSpendLimitUpdateParamsCurrencyUsd,

104 Interval: openai.AdminOrganizationSpendLimitUpdateParamsIntervalMonth,

105 ThresholdAmount: 1,

106 })

107 if err != nil {

108 panic(err.Error())

109 }

110 fmt.Printf("%+v\n", organizationSpendLimit.Currency)

111}

112```

113 

114#### Response

115 

116```json

117{

118 "currency": "USD",

119 "enforcement": {

120 "status": "inactive"

121 },

122 "interval": "month",

123 "object": "organization.spend_limit",

124 "threshold_amount": 0

125}

126```

Details

46 46 

47 - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`47 - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`

48 48 

49 - `const BetaResponseErrorCodeDataResidencyMismatch BetaResponseErrorCode = "data_residency_mismatch"`

50 

49 - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`51 - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`

50 52 

51 - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`53 - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`


6160 - `Context string`6162 - `Context string`

6161 6163 

6162 Controls which reasoning items are rendered back to the model on later turns.6164 Controls which reasoning items are rendered back to the model on later turns.

6165 If omitted or set to `auto`, the model determines the context mode. The

6166 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

6167 `current_turn`.

6168 

6163 When returned on a response, this is the effective reasoning context mode6169 When returned on a response, this is the effective reasoning context mode

6164 used for the response.6170 used for the response.

6165 6171 


6363 6369 

6364 Constrains the verbosity of the model's response. Lower values will result in6370 Constrains the verbosity of the model's response. Lower values will result in

6365 more concise responses, while higher values will result in more verbose responses.6371 more concise responses, while higher values will result in more verbose responses.

6366 Currently supported values are `low`, `medium`, and `high`.6372 Currently supported values are `low`, `medium`, and `high`. The default is

6373 `medium`.

6367 6374 

6368 - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`6375 - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`

6369 6376 

Details

4220 - `Context string`4220 - `Context string`

4221 4221 

4222 Controls which reasoning items are rendered back to the model on later turns.4222 Controls which reasoning items are rendered back to the model on later turns.

4223 If omitted or set to `auto`, the model determines the context mode. The

4224 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

4225 `current_turn`.

4226 

4223 When returned on a response, this is the effective reasoning context mode4227 When returned on a response, this is the effective reasoning context mode

4224 used for the response.4228 used for the response.

4225 4229 


4677 4681 

4678 - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`4682 - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`

4679 4683 

4684 - `const BetaResponseErrorCodeDataResidencyMismatch BetaResponseErrorCode = "data_residency_mismatch"`

4685 

4680 - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`4686 - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`

4681 4687 

4682 - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`4688 - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`


10791 - `Context string`10797 - `Context string`

10792 10798 

10793 Controls which reasoning items are rendered back to the model on later turns.10799 Controls which reasoning items are rendered back to the model on later turns.

10800 If omitted or set to `auto`, the model determines the context mode. The

10801 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

10802 `current_turn`.

10803 

10794 When returned on a response, this is the effective reasoning context mode10804 When returned on a response, this is the effective reasoning context mode

10795 used for the response.10805 used for the response.

10796 10806 


10994 11004 

10995 Constrains the verbosity of the model's response. Lower values will result in11005 Constrains the verbosity of the model's response. Lower values will result in

10996 more concise responses, while higher values will result in more verbose responses.11006 more concise responses, while higher values will result in more verbose responses.

10997 Currently supported values are `low`, `medium`, and `high`.11007 Currently supported values are `low`, `medium`, and `high`. The default is

11008 `medium`.

10998 11009 

10999 - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`11010 - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`

11000 11011 

Details

81 81 

82 - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`82 - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"`

83 83 

84 - `const BetaResponseErrorCodeDataResidencyMismatch BetaResponseErrorCode = "data_residency_mismatch"`

85 

84 - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`86 - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"`

85 87 

86 - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`88 - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"`


6195 - `Context string`6197 - `Context string`

6196 6198 

6197 Controls which reasoning items are rendered back to the model on later turns.6199 Controls which reasoning items are rendered back to the model on later turns.

6200 If omitted or set to `auto`, the model determines the context mode. The

6201 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

6202 `current_turn`.

6203 

6198 When returned on a response, this is the effective reasoning context mode6204 When returned on a response, this is the effective reasoning context mode

6199 used for the response.6205 used for the response.

6200 6206 


6398 6404 

6399 Constrains the verbosity of the model's response. Lower values will result in6405 Constrains the verbosity of the model's response. Lower values will result in

6400 more concise responses, while higher values will result in more verbose responses.6406 more concise responses, while higher values will result in more verbose responses.

6401 Currently supported values are `low`, `medium`, and `high`.6407 Currently supported values are `low`, `medium`, and `high`. The default is

6408 `medium`.

6402 6409 

6403 - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`6410 - `const BetaResponseTextConfigVerbosityLow BetaResponseTextConfigVerbosity = "low"`

6404 6411 

Details

3863 - `Context string`3863 - `Context string`

3864 3864 

3865 Controls which reasoning items are rendered back to the model on later turns.3865 Controls which reasoning items are rendered back to the model on later turns.

3866 If omitted or set to `auto`, the model determines the context mode. The

3867 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

3868 `current_turn`.

3869 

3866 When returned on a response, this is the effective reasoning context mode3870 When returned on a response, this is the effective reasoning context mode

3867 used for the response.3871 used for the response.

3868 3872 


4023 4027 

4024 Constrains the verbosity of the model's response. Lower values will result in4028 Constrains the verbosity of the model's response. Lower values will result in

4025 more concise responses, while higher values will result in more verbose responses.4029 more concise responses, while higher values will result in more verbose responses.

4026 Currently supported values are `low`, `medium`, and `high`.4030 Currently supported values are `low`, `medium`, and `high`. The default is

4031 `medium`.

4027 4032 

4028 - `const BetaResponseInputTokenCountParamsTextVerbosityLow BetaResponseInputTokenCountParamsTextVerbosity = "low"`4033 - `const BetaResponseInputTokenCountParamsTextVerbosityLow BetaResponseInputTokenCountParamsTextVerbosity = "low"`

4029 4034 

Details

1085 1085 

1086 Constrains the verbosity of the model's response. Lower values will result in1086 Constrains the verbosity of the model's response. Lower values will result in

1087 more concise responses, while higher values will result in more verbose responses.1087 more concise responses, while higher values will result in more verbose responses.

1088 Currently supported values are `low`, `medium`, and `high`.1088 Currently supported values are `low`, `medium`, and `high`. The default is

1089 `medium`.

1089 1090 

1090 - `const ChatCompletionNewParamsVerbosityLow ChatCompletionNewParamsVerbosity = "low"`1091 - `const ChatCompletionNewParamsVerbosityLow ChatCompletionNewParamsVerbosity = "low"`

1091 1092 

Details

38 38 

39 - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"`39 - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"`

40 40 

41 - `const ResponseErrorCodeDataResidencyMismatch ResponseErrorCode = "data_residency_mismatch"`

42 

41 - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"`43 - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"`

42 44 

43 - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"`45 - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"`


5379 - `Context ReasoningContext`5381 - `Context ReasoningContext`

5380 5382 

5381 Controls which reasoning items are rendered back to the model on later turns.5383 Controls which reasoning items are rendered back to the model on later turns.

5384 If omitted or set to `auto`, the model determines the context mode. The

5385 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

5386 `current_turn`.

5387 

5382 When returned on a response, this is the effective reasoning context mode5388 When returned on a response, this is the effective reasoning context mode

5383 used for the response.5389 used for the response.

5384 5390 


5586 5592 

5587 Constrains the verbosity of the model's response. Lower values will result in5593 Constrains the verbosity of the model's response. Lower values will result in

5588 more concise responses, while higher values will result in more verbose responses.5594 more concise responses, while higher values will result in more verbose responses.

5589 Currently supported values are `low`, `medium`, and `high`.5595 Currently supported values are `low`, `medium`, and `high`. The default is

5596 `medium`.

5590 5597 

5591 - `const ResponseTextConfigVerbosityLow ResponseTextConfigVerbosity = "low"`5598 - `const ResponseTextConfigVerbosityLow ResponseTextConfigVerbosity = "low"`

5592 5599 

Details

4014 4014 

4015 - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"`4015 - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"`

4016 4016 

4017 - `const ResponseErrorCodeDataResidencyMismatch ResponseErrorCode = "data_residency_mismatch"`

4018 

4017 - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"`4019 - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"`

4018 4020 

4019 - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"`4021 - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"`


9355 - `Context ReasoningContext`9357 - `Context ReasoningContext`

9356 9358 

9357 Controls which reasoning items are rendered back to the model on later turns.9359 Controls which reasoning items are rendered back to the model on later turns.

9360 If omitted or set to `auto`, the model determines the context mode. The

9361 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

9362 `current_turn`.

9363 

9358 When returned on a response, this is the effective reasoning context mode9364 When returned on a response, this is the effective reasoning context mode

9359 used for the response.9365 used for the response.

9360 9366 


9562 9568 

9563 Constrains the verbosity of the model's response. Lower values will result in9569 Constrains the verbosity of the model's response. Lower values will result in

9564 more concise responses, while higher values will result in more verbose responses.9570 more concise responses, while higher values will result in more verbose responses.

9565 Currently supported values are `low`, `medium`, and `high`.9571 Currently supported values are `low`, `medium`, and `high`. The default is

9572 `medium`.

9566 9573 

9567 - `const ResponseTextConfigVerbosityLow ResponseTextConfigVerbosity = "low"`9574 - `const ResponseTextConfigVerbosityLow ResponseTextConfigVerbosity = "low"`

9568 9575 

Details

75 75 

76 - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"`76 - `const ResponseErrorCodeInvalidPrompt ResponseErrorCode = "invalid_prompt"`

77 77 

78 - `const ResponseErrorCodeDataResidencyMismatch ResponseErrorCode = "data_residency_mismatch"`

79 

78 - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"`80 - `const ResponseErrorCodeBioPolicy ResponseErrorCode = "bio_policy"`

79 81 

80 - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"`82 - `const ResponseErrorCodeVectorStoreTimeout ResponseErrorCode = "vector_store_timeout"`


5416 - `Context ReasoningContext`5418 - `Context ReasoningContext`

5417 5419 

5418 Controls which reasoning items are rendered back to the model on later turns.5420 Controls which reasoning items are rendered back to the model on later turns.

5421 If omitted or set to `auto`, the model determines the context mode. The

5422 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

5423 `current_turn`.

5424 

5419 When returned on a response, this is the effective reasoning context mode5425 When returned on a response, this is the effective reasoning context mode

5420 used for the response.5426 used for the response.

5421 5427 


5623 5629 

5624 Constrains the verbosity of the model's response. Lower values will result in5630 Constrains the verbosity of the model's response. Lower values will result in

5625 more concise responses, while higher values will result in more verbose responses.5631 more concise responses, while higher values will result in more verbose responses.

5626 Currently supported values are `low`, `medium`, and `high`.5632 Currently supported values are `low`, `medium`, and `high`. The default is

5633 `medium`.

5627 5634 

5628 - `const ResponseTextConfigVerbosityLow ResponseTextConfigVerbosity = "low"`5635 - `const ResponseTextConfigVerbosityLow ResponseTextConfigVerbosity = "low"`

5629 5636 

Details

3573 3573 

3574 Constrains the verbosity of the model's response. Lower values will result in3574 Constrains the verbosity of the model's response. Lower values will result in

3575 more concise responses, while higher values will result in more verbose responses.3575 more concise responses, while higher values will result in more verbose responses.

3576 Currently supported values are `low`, `medium`, and `high`.3576 Currently supported values are `low`, `medium`, and `high`. The default is

3577 `medium`.

3577 3578 

3578 - `const InputTokenCountParamsTextVerbosityLow InputTokenCountParamsTextVerbosity = "low"`3579 - `const InputTokenCountParamsTextVerbosityLow InputTokenCountParamsTextVerbosity = "low"`

3579 3580 

Details

592 - `Optional<Context> context`592 - `Optional<Context> context`

593 593 

594 Controls which reasoning items are rendered back to the model on later turns.594 Controls which reasoning items are rendered back to the model on later turns.

595 If omitted or set to `auto`, the model determines the context mode. The

596 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

597 `current_turn`.

598 

595 When returned on a response, this is the effective reasoning context mode599 When returned on a response, this is the effective reasoning context mode

596 used for the response.600 used for the response.

597 601 

Details

12 12 

13 - `String projectId`13 - `String projectId`

14 14 

15 The ID of the project.

16 

15 - `Optional<String> serviceAccountId`17 - `Optional<String> serviceAccountId`

16 18 

19 The ID of the service account.

20 

17 - `Optional<String> name`21 - `Optional<String> name`

18 22 

19 API key name.23 API key name.


28 32 

29 - `String id`33 - `String id`

30 34 

35 The identifier of the API key.

36 

31 - `long createdAt`37 - `long createdAt`

32 38 

39 The Unix timestamp (in seconds) when the API key was created.

40 

33 - `String name`41 - `String name`

34 42 

43 The name of the API key.

44 

35 - `JsonValue; object_ "organization.project.service_account.api_key"constant`45 - `JsonValue; object_ "organization.project.service_account.api_key"constant`

36 46 

37 The object type, which is always `organization.project.service_account.api_key`47 The object type, which is always `organization.project.service_account.api_key`


40 50 

41 - `String value`51 - `String value`

42 52 

53 The unredacted API key value.

54 

43### Example55### Example

44 56 

45```java57```java

Details

1## Delete project spend limit

2 

3`ProjectSpendLimitDeleted admin().organization().projects().spendLimit().delete(SpendLimitDeleteParamsparams = SpendLimitDeleteParams.none(), RequestOptionsrequestOptions = RequestOptions.none())`

4 

5**delete** `/organization/projects/{project_id}/spend_limit`

6 

7Delete a project's hard spend limit.

8 

9### Parameters

10 

11- `SpendLimitDeleteParams params`

12 

13 - `Optional<String> projectId`

14 

15### Returns

16 

17- `class ProjectSpendLimitDeleted:`

18 

19 Confirmation payload returned after deleting a project hard spend limit.

20 

21 - `boolean deleted`

22 

23 Whether the hard spend limit was deleted.

24 

25 - `JsonValue; object_ "project.spend_limit.deleted"constant`

26 

27 The object type, which is always `project.spend_limit.deleted`.

28 

29 - `PROJECT_SPEND_LIMIT_DELETED("project.spend_limit.deleted")`

30 

31### Example

32 

33```java

34package com.openai.example;

35 

36import com.openai.client.OpenAIClient;

37import com.openai.client.okhttp.OpenAIOkHttpClient;

38import com.openai.models.admin.organization.projects.spendlimit.ProjectSpendLimitDeleted;

39import com.openai.models.admin.organization.projects.spendlimit.SpendLimitDeleteParams;

40 

41public final class Main {

42 private Main() {}

43 

44 public static void main(String[] args) {

45 OpenAIClient client = OpenAIOkHttpClient.fromEnv();

46 

47 ProjectSpendLimitDeleted projectSpendLimitDeleted = client.admin().organization().projects().spendLimit().delete("proj_123");

48 }

49}

50```

51 

52#### Response

53 

54```json

55{

56 "deleted": true,

57 "object": "project.spend_limit.deleted"

58}

59```

Details

1## Retrieve project spend limit

2 

3`ProjectSpendLimit admin().organization().projects().spendLimit().retrieve(SpendLimitRetrieveParamsparams = SpendLimitRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())`

4 

5**get** `/organization/projects/{project_id}/spend_limit`

6 

7Get a project's hard spend limit.

8 

9### Parameters

10 

11- `SpendLimitRetrieveParams params`

12 

13 - `Optional<String> projectId`

14 

15### Returns

16 

17- `class ProjectSpendLimit:`

18 

19 Represents a hard spend limit configured at the project level.

20 

21 - `Currency currency`

22 

23 The currency for the threshold amount. Currently, only `USD` is supported.

24 

25 - `USD("USD")`

26 

27 - `Enforcement enforcement`

28 

29 The current enforcement state of the hard spend limit.

30 

31 - `Status status`

32 

33 Whether the hard spend limit is currently enforcing.

34 

35 - `INACTIVE("inactive")`

36 

37 - `ENFORCING("enforcing")`

38 

39 - `Interval interval`

40 

41 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

42 

43 - `MONTH("month")`

44 

45 - `JsonValue; object_ "project.spend_limit"constant`

46 

47 The object type, which is always `project.spend_limit`.

48 

49 - `PROJECT_SPEND_LIMIT("project.spend_limit")`

50 

51 - `long thresholdAmount`

52 

53 The hard spend limit amount, in cents.

54 

55### Example

56 

57```java

58package com.openai.example;

59 

60import com.openai.client.OpenAIClient;

61import com.openai.client.okhttp.OpenAIOkHttpClient;

62import com.openai.models.admin.organization.projects.spendlimit.ProjectSpendLimit;

63import com.openai.models.admin.organization.projects.spendlimit.SpendLimitRetrieveParams;

64 

65public final class Main {

66 private Main() {}

67 

68 public static void main(String[] args) {

69 OpenAIClient client = OpenAIOkHttpClient.fromEnv();

70 

71 ProjectSpendLimit projectSpendLimit = client.admin().organization().projects().spendLimit().retrieve("proj_123");

72 }

73}

74```

75 

76#### Response

77 

78```json

79{

80 "currency": "USD",

81 "enforcement": {

82 "status": "inactive"

83 },

84 "interval": "month",

85 "object": "project.spend_limit",

86 "threshold_amount": 0

87}

88```

Details

1## Update project spend limit

2 

3`ProjectSpendLimit admin().organization().projects().spendLimit().update(SpendLimitUpdateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())`

4 

5**post** `/organization/projects/{project_id}/spend_limit`

6 

7Create or replace a project's hard spend limit.

8 

9### Parameters

10 

11- `SpendLimitUpdateParams params`

12 

13 - `Optional<String> projectId`

14 

15 - `Currency currency`

16 

17 The currency for the threshold amount. Currently, only `USD` is supported.

18 

19 - `USD("USD")`

20 

21 - `Interval interval`

22 

23 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

24 

25 - `MONTH("month")`

26 

27 - `long thresholdAmount`

28 

29 The hard spend limit amount, in cents.

30 

31### Returns

32 

33- `class ProjectSpendLimit:`

34 

35 Represents a hard spend limit configured at the project level.

36 

37 - `Currency currency`

38 

39 The currency for the threshold amount. Currently, only `USD` is supported.

40 

41 - `USD("USD")`

42 

43 - `Enforcement enforcement`

44 

45 The current enforcement state of the hard spend limit.

46 

47 - `Status status`

48 

49 Whether the hard spend limit is currently enforcing.

50 

51 - `INACTIVE("inactive")`

52 

53 - `ENFORCING("enforcing")`

54 

55 - `Interval interval`

56 

57 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

58 

59 - `MONTH("month")`

60 

61 - `JsonValue; object_ "project.spend_limit"constant`

62 

63 The object type, which is always `project.spend_limit`.

64 

65 - `PROJECT_SPEND_LIMIT("project.spend_limit")`

66 

67 - `long thresholdAmount`

68 

69 The hard spend limit amount, in cents.

70 

71### Example

72 

73```java

74package com.openai.example;

75 

76import com.openai.client.OpenAIClient;

77import com.openai.client.okhttp.OpenAIOkHttpClient;

78import com.openai.models.admin.organization.projects.spendlimit.ProjectSpendLimit;

79import com.openai.models.admin.organization.projects.spendlimit.SpendLimitUpdateParams;

80 

81public final class Main {

82 private Main() {}

83 

84 public static void main(String[] args) {

85 OpenAIClient client = OpenAIOkHttpClient.fromEnv();

86 

87 SpendLimitUpdateParams params = SpendLimitUpdateParams.builder()

88 .projectId("proj_123")

89 .currency(SpendLimitUpdateParams.Currency.USD)

90 .interval(SpendLimitUpdateParams.Interval.MONTH)

91 .thresholdAmount(1L)

92 .build();

93 ProjectSpendLimit projectSpendLimit = client.admin().organization().projects().spendLimit().update(params);

94 }

95}

96```

97 

98#### Response

99 

100```json

101{

102 "currency": "USD",

103 "enforcement": {

104 "status": "inactive"

105 },

106 "interval": "month",

107 "object": "project.spend_limit",

108 "threshold_amount": 0

109}

110```

Details

1## Delete organization spend limit

2 

3`OrganizationSpendLimitDeleted admin().organization().spendLimit().delete(SpendLimitDeleteParamsparams = SpendLimitDeleteParams.none(), RequestOptionsrequestOptions = RequestOptions.none())`

4 

5**delete** `/organization/spend_limit`

6 

7Delete the organization's hard spend limit.

8 

9### Parameters

10 

11- `SpendLimitDeleteParams params`

12 

13### Returns

14 

15- `class OrganizationSpendLimitDeleted:`

16 

17 Confirmation payload returned after deleting an organization hard spend limit.

18 

19 - `boolean deleted`

20 

21 Whether the hard spend limit was deleted.

22 

23 - `JsonValue; object_ "organization.spend_limit.deleted"constant`

24 

25 The object type, which is always `organization.spend_limit.deleted`.

26 

27 - `ORGANIZATION_SPEND_LIMIT_DELETED("organization.spend_limit.deleted")`

28 

29### Example

30 

31```java

32package com.openai.example;

33 

34import com.openai.client.OpenAIClient;

35import com.openai.client.okhttp.OpenAIOkHttpClient;

36import com.openai.models.admin.organization.spendlimit.OrganizationSpendLimitDeleted;

37import com.openai.models.admin.organization.spendlimit.SpendLimitDeleteParams;

38 

39public final class Main {

40 private Main() {}

41 

42 public static void main(String[] args) {

43 OpenAIClient client = OpenAIOkHttpClient.fromEnv();

44 

45 OrganizationSpendLimitDeleted organizationSpendLimitDeleted = client.admin().organization().spendLimit().delete();

46 }

47}

48```

49 

50#### Response

51 

52```json

53{

54 "deleted": true,

55 "object": "organization.spend_limit.deleted"

56}

57```

Details

1## Retrieve organization spend limit

2 

3`OrganizationSpendLimit admin().organization().spendLimit().retrieve(SpendLimitRetrieveParamsparams = SpendLimitRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())`

4 

5**get** `/organization/spend_limit`

6 

7Get the organization's hard spend limit.

8 

9### Parameters

10 

11- `SpendLimitRetrieveParams params`

12 

13### Returns

14 

15- `class OrganizationSpendLimit:`

16 

17 Represents a hard spend limit configured at the organization level.

18 

19 - `Currency currency`

20 

21 The currency for the threshold amount. Currently, only `USD` is supported.

22 

23 - `USD("USD")`

24 

25 - `Enforcement enforcement`

26 

27 The current enforcement state of the hard spend limit.

28 

29 - `Status status`

30 

31 Whether the hard spend limit is currently enforcing.

32 

33 - `INACTIVE("inactive")`

34 

35 - `ENFORCING("enforcing")`

36 

37 - `Interval interval`

38 

39 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

40 

41 - `MONTH("month")`

42 

43 - `JsonValue; object_ "organization.spend_limit"constant`

44 

45 The object type, which is always `organization.spend_limit`.

46 

47 - `ORGANIZATION_SPEND_LIMIT("organization.spend_limit")`

48 

49 - `long thresholdAmount`

50 

51 The hard spend limit amount, in cents.

52 

53### Example

54 

55```java

56package com.openai.example;

57 

58import com.openai.client.OpenAIClient;

59import com.openai.client.okhttp.OpenAIOkHttpClient;

60import com.openai.models.admin.organization.spendlimit.OrganizationSpendLimit;

61import com.openai.models.admin.organization.spendlimit.SpendLimitRetrieveParams;

62 

63public final class Main {

64 private Main() {}

65 

66 public static void main(String[] args) {

67 OpenAIClient client = OpenAIOkHttpClient.fromEnv();

68 

69 OrganizationSpendLimit organizationSpendLimit = client.admin().organization().spendLimit().retrieve();

70 }

71}

72```

73 

74#### Response

75 

76```json

77{

78 "currency": "USD",

79 "enforcement": {

80 "status": "inactive"

81 },

82 "interval": "month",

83 "object": "organization.spend_limit",

84 "threshold_amount": 0

85}

86```

Details

1## Update organization spend limit

2 

3`OrganizationSpendLimit admin().organization().spendLimit().update(SpendLimitUpdateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())`

4 

5**post** `/organization/spend_limit`

6 

7Create or replace the organization's hard spend limit.

8 

9### Parameters

10 

11- `SpendLimitUpdateParams params`

12 

13 - `Currency currency`

14 

15 The currency for the threshold amount. Currently, only `USD` is supported.

16 

17 - `USD("USD")`

18 

19 - `Interval interval`

20 

21 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

22 

23 - `MONTH("month")`

24 

25 - `long thresholdAmount`

26 

27 The hard spend limit amount, in cents.

28 

29### Returns

30 

31- `class OrganizationSpendLimit:`

32 

33 Represents a hard spend limit configured at the organization level.

34 

35 - `Currency currency`

36 

37 The currency for the threshold amount. Currently, only `USD` is supported.

38 

39 - `USD("USD")`

40 

41 - `Enforcement enforcement`

42 

43 The current enforcement state of the hard spend limit.

44 

45 - `Status status`

46 

47 Whether the hard spend limit is currently enforcing.

48 

49 - `INACTIVE("inactive")`

50 

51 - `ENFORCING("enforcing")`

52 

53 - `Interval interval`

54 

55 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

56 

57 - `MONTH("month")`

58 

59 - `JsonValue; object_ "organization.spend_limit"constant`

60 

61 The object type, which is always `organization.spend_limit`.

62 

63 - `ORGANIZATION_SPEND_LIMIT("organization.spend_limit")`

64 

65 - `long thresholdAmount`

66 

67 The hard spend limit amount, in cents.

68 

69### Example

70 

71```java

72package com.openai.example;

73 

74import com.openai.client.OpenAIClient;

75import com.openai.client.okhttp.OpenAIOkHttpClient;

76import com.openai.models.admin.organization.spendlimit.OrganizationSpendLimit;

77import com.openai.models.admin.organization.spendlimit.SpendLimitUpdateParams;

78 

79public final class Main {

80 private Main() {}

81 

82 public static void main(String[] args) {

83 OpenAIClient client = OpenAIOkHttpClient.fromEnv();

84 

85 SpendLimitUpdateParams params = SpendLimitUpdateParams.builder()

86 .currency(SpendLimitUpdateParams.Currency.USD)

87 .interval(SpendLimitUpdateParams.Interval.MONTH)

88 .thresholdAmount(1L)

89 .build();

90 OrganizationSpendLimit organizationSpendLimit = client.admin().organization().spendLimit().update(params);

91 }

92}

93```

94 

95#### Response

96 

97```json

98{

99 "currency": "USD",

100 "enforcement": {

101 "status": "inactive"

102 },

103 "interval": "month",

104 "object": "organization.spend_limit",

105 "threshold_amount": 0

106}

107```

Details

44 44 

45 - `INVALID_PROMPT("invalid_prompt")`45 - `INVALID_PROMPT("invalid_prompt")`

46 46 

47 - `DATA_RESIDENCY_MISMATCH("data_residency_mismatch")`

48 

47 - `BIO_POLICY("bio_policy")`49 - `BIO_POLICY("bio_policy")`

48 50 

49 - `VECTOR_STORE_TIMEOUT("vector_store_timeout")`51 - `VECTOR_STORE_TIMEOUT("vector_store_timeout")`


6004 - `Optional<Context> context`6006 - `Optional<Context> context`

6005 6007 

6006 Controls which reasoning items are rendered back to the model on later turns.6008 Controls which reasoning items are rendered back to the model on later turns.

6009 If omitted or set to `auto`, the model determines the context mode. The

6010 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

6011 `current_turn`.

6012 

6007 When returned on a response, this is the effective reasoning context mode6013 When returned on a response, this is the effective reasoning context mode

6008 used for the response.6014 used for the response.

6009 6015 


6196 6202 

6197 Constrains the verbosity of the model's response. Lower values will result in6203 Constrains the verbosity of the model's response. Lower values will result in

6198 more concise responses, while higher values will result in more verbose responses.6204 more concise responses, while higher values will result in more verbose responses.

6199 Currently supported values are `low`, `medium`, and `high`.6205 Currently supported values are `low`, `medium`, and `high`. The default is

6206 `medium`.

6200 6207 

6201 - `LOW("low")`6208 - `LOW("low")`

6202 6209 

Details

4120 - `Optional<Context> context`4120 - `Optional<Context> context`

4121 4121 

4122 Controls which reasoning items are rendered back to the model on later turns.4122 Controls which reasoning items are rendered back to the model on later turns.

4123 If omitted or set to `auto`, the model determines the context mode. The

4124 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

4125 `current_turn`.

4126 

4123 When returned on a response, this is the effective reasoning context mode4127 When returned on a response, this is the effective reasoning context mode

4124 used for the response.4128 used for the response.

4125 4129 


4556 4560 

4557 - `INVALID_PROMPT("invalid_prompt")`4561 - `INVALID_PROMPT("invalid_prompt")`

4558 4562 

4563 - `DATA_RESIDENCY_MISMATCH("data_residency_mismatch")`

4564 

4559 - `BIO_POLICY("bio_policy")`4565 - `BIO_POLICY("bio_policy")`

4560 4566 

4561 - `VECTOR_STORE_TIMEOUT("vector_store_timeout")`4567 - `VECTOR_STORE_TIMEOUT("vector_store_timeout")`


10516 - `Optional<Context> context`10522 - `Optional<Context> context`

10517 10523 

10518 Controls which reasoning items are rendered back to the model on later turns.10524 Controls which reasoning items are rendered back to the model on later turns.

10525 If omitted or set to `auto`, the model determines the context mode. The

10526 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

10527 `current_turn`.

10528 

10519 When returned on a response, this is the effective reasoning context mode10529 When returned on a response, this is the effective reasoning context mode

10520 used for the response.10530 used for the response.

10521 10531 


10708 10718 

10709 Constrains the verbosity of the model's response. Lower values will result in10719 Constrains the verbosity of the model's response. Lower values will result in

10710 more concise responses, while higher values will result in more verbose responses.10720 more concise responses, while higher values will result in more verbose responses.

10711 Currently supported values are `low`, `medium`, and `high`.10721 Currently supported values are `low`, `medium`, and `high`. The default is

10722 `medium`.

10712 10723 

10713 - `LOW("low")`10724 - `LOW("low")`

10714 10725 

Details

77 77 

78 - `INVALID_PROMPT("invalid_prompt")`78 - `INVALID_PROMPT("invalid_prompt")`

79 79 

80 - `DATA_RESIDENCY_MISMATCH("data_residency_mismatch")`

81 

80 - `BIO_POLICY("bio_policy")`82 - `BIO_POLICY("bio_policy")`

81 83 

82 - `VECTOR_STORE_TIMEOUT("vector_store_timeout")`84 - `VECTOR_STORE_TIMEOUT("vector_store_timeout")`


6037 - `Optional<Context> context`6039 - `Optional<Context> context`

6038 6040 

6039 Controls which reasoning items are rendered back to the model on later turns.6041 Controls which reasoning items are rendered back to the model on later turns.

6042 If omitted or set to `auto`, the model determines the context mode. The

6043 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

6044 `current_turn`.

6045 

6040 When returned on a response, this is the effective reasoning context mode6046 When returned on a response, this is the effective reasoning context mode

6041 used for the response.6047 used for the response.

6042 6048 


6229 6235 

6230 Constrains the verbosity of the model's response. Lower values will result in6236 Constrains the verbosity of the model's response. Lower values will result in

6231 more concise responses, while higher values will result in more verbose responses.6237 more concise responses, while higher values will result in more verbose responses.

6232 Currently supported values are `low`, `medium`, and `high`.6238 Currently supported values are `low`, `medium`, and `high`. The default is

6239 `medium`.

6233 6240 

6234 - `LOW("low")`6241 - `LOW("low")`

6235 6242 

Details

3762 - `Optional<Context> context`3762 - `Optional<Context> context`

3763 3763 

3764 Controls which reasoning items are rendered back to the model on later turns.3764 Controls which reasoning items are rendered back to the model on later turns.

3765 If omitted or set to `auto`, the model determines the context mode. The

3766 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

3767 `current_turn`.

3768 

3765 When returned on a response, this is the effective reasoning context mode3769 When returned on a response, this is the effective reasoning context mode

3766 used for the response.3770 used for the response.

3767 3771 


3911 3915 

3912 Constrains the verbosity of the model's response. Lower values will result in3916 Constrains the verbosity of the model's response. Lower values will result in

3913 more concise responses, while higher values will result in more verbose responses.3917 more concise responses, while higher values will result in more verbose responses.

3914 Currently supported values are `low`, `medium`, and `high`.3918 Currently supported values are `low`, `medium`, and `high`. The default is

3919 `medium`.

3915 3920 

3916 - `LOW("low")`3921 - `LOW("low")`

3917 3922 

Details

921 921 

922 Constrains the verbosity of the model's response. Lower values will result in922 Constrains the verbosity of the model's response. Lower values will result in

923 more concise responses, while higher values will result in more verbose responses.923 more concise responses, while higher values will result in more verbose responses.

924 Currently supported values are `low`, `medium`, and `high`.924 Currently supported values are `low`, `medium`, and `high`. The default is

925 `medium`.

925 926 

926 - `LOW("low")`927 - `LOW("low")`

927 928 

Details

40 40 

41 - `INVALID_PROMPT("invalid_prompt")`41 - `INVALID_PROMPT("invalid_prompt")`

42 42 

43 - `DATA_RESIDENCY_MISMATCH("data_residency_mismatch")`

44 

43 - `BIO_POLICY("bio_policy")`45 - `BIO_POLICY("bio_policy")`

44 46 

45 - `VECTOR_STORE_TIMEOUT("vector_store_timeout")`47 - `VECTOR_STORE_TIMEOUT("vector_store_timeout")`


5250 - `Optional<Context> context`5252 - `Optional<Context> context`

5251 5253 

5252 Controls which reasoning items are rendered back to the model on later turns.5254 Controls which reasoning items are rendered back to the model on later turns.

5255 If omitted or set to `auto`, the model determines the context mode. The

5256 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

5257 `current_turn`.

5258 

5253 When returned on a response, this is the effective reasoning context mode5259 When returned on a response, this is the effective reasoning context mode

5254 used for the response.5260 used for the response.

5255 5261 


5449 5455 

5450 Constrains the verbosity of the model's response. Lower values will result in5456 Constrains the verbosity of the model's response. Lower values will result in

5451 more concise responses, while higher values will result in more verbose responses.5457 more concise responses, while higher values will result in more verbose responses.

5452 Currently supported values are `low`, `medium`, and `high`.5458 Currently supported values are `low`, `medium`, and `high`. The default is

5459 `medium`.

5453 5460 

5454 - `LOW("low")`5461 - `LOW("low")`

5455 5462 

Details

3917 3917 

3918 - `INVALID_PROMPT("invalid_prompt")`3918 - `INVALID_PROMPT("invalid_prompt")`

3919 3919 

3920 - `DATA_RESIDENCY_MISMATCH("data_residency_mismatch")`

3921 

3920 - `BIO_POLICY("bio_policy")`3922 - `BIO_POLICY("bio_policy")`

3921 3923 

3922 - `VECTOR_STORE_TIMEOUT("vector_store_timeout")`3924 - `VECTOR_STORE_TIMEOUT("vector_store_timeout")`


9127 - `Optional<Context> context`9129 - `Optional<Context> context`

9128 9130 

9129 Controls which reasoning items are rendered back to the model on later turns.9131 Controls which reasoning items are rendered back to the model on later turns.

9132 If omitted or set to `auto`, the model determines the context mode. The

9133 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

9134 `current_turn`.

9135 

9130 When returned on a response, this is the effective reasoning context mode9136 When returned on a response, this is the effective reasoning context mode

9131 used for the response.9137 used for the response.

9132 9138 


9326 9332 

9327 Constrains the verbosity of the model's response. Lower values will result in9333 Constrains the verbosity of the model's response. Lower values will result in

9328 more concise responses, while higher values will result in more verbose responses.9334 more concise responses, while higher values will result in more verbose responses.

9329 Currently supported values are `low`, `medium`, and `high`.9335 Currently supported values are `low`, `medium`, and `high`. The default is

9336 `medium`.

9330 9337 

9331 - `LOW("low")`9338 - `LOW("low")`

9332 9339 

Details

73 73 

74 - `INVALID_PROMPT("invalid_prompt")`74 - `INVALID_PROMPT("invalid_prompt")`

75 75 

76 - `DATA_RESIDENCY_MISMATCH("data_residency_mismatch")`

77 

76 - `BIO_POLICY("bio_policy")`78 - `BIO_POLICY("bio_policy")`

77 79 

78 - `VECTOR_STORE_TIMEOUT("vector_store_timeout")`80 - `VECTOR_STORE_TIMEOUT("vector_store_timeout")`


5283 - `Optional<Context> context`5285 - `Optional<Context> context`

5284 5286 

5285 Controls which reasoning items are rendered back to the model on later turns.5287 Controls which reasoning items are rendered back to the model on later turns.

5288 If omitted or set to `auto`, the model determines the context mode. The

5289 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

5290 `current_turn`.

5291 

5286 When returned on a response, this is the effective reasoning context mode5292 When returned on a response, this is the effective reasoning context mode

5287 used for the response.5293 used for the response.

5288 5294 


5482 5488 

5483 Constrains the verbosity of the model's response. Lower values will result in5489 Constrains the verbosity of the model's response. Lower values will result in

5484 more concise responses, while higher values will result in more verbose responses.5490 more concise responses, while higher values will result in more verbose responses.

5485 Currently supported values are `low`, `medium`, and `high`.5491 Currently supported values are `low`, `medium`, and `high`. The default is

5492 `medium`.

5486 5493 

5487 - `LOW("low")`5494 - `LOW("low")`

5488 5495 

Details

3482 3482 

3483 Constrains the verbosity of the model's response. Lower values will result in3483 Constrains the verbosity of the model's response. Lower values will result in

3484 more concise responses, while higher values will result in more verbose responses.3484 more concise responses, while higher values will result in more verbose responses.

3485 Currently supported values are `low`, `medium`, and `high`.3485 Currently supported values are `low`, `medium`, and `high`. The default is

3486 `medium`.

3486 3487 

3487 - `LOW("low")`3488 - `LOW("low")`

3488 3489 

Details

611 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`611 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`

612 612 

613 Controls which reasoning items are rendered back to the model on later turns.613 Controls which reasoning items are rendered back to the model on later turns.

614 If omitted or set to `auto`, the model determines the context mode. The

615 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

616 `current_turn`.

617 

614 When returned on a response, this is the effective reasoning context mode618 When returned on a response, this is the effective reasoning context mode

615 used for the response.619 used for the response.

616 620 

Details

10 10 

11- `project_id: str`11- `project_id: str`

12 12 

13 The ID of the project.

14 

13- `service_account_id: str`15- `service_account_id: str`

14 16 

17 The ID of the service account.

18 

15- `name: Optional[str]`19- `name: Optional[str]`

16 20 

17 API key name.21 API key name.


26 30 

27 - `id: str`31 - `id: str`

28 32 

33 The identifier of the API key.

34 

29 - `created_at: int`35 - `created_at: int`

30 36 

37 The Unix timestamp (in seconds) when the API key was created.

38 

31 - `name: str`39 - `name: str`

32 40 

41 The name of the API key.

42 

33 - `object: Literal["organization.project.service_account.api_key"]`43 - `object: Literal["organization.project.service_account.api_key"]`

34 44 

35 The object type, which is always `organization.project.service_account.api_key`45 The object type, which is always `organization.project.service_account.api_key`


38 48 

39 - `value: str`49 - `value: str`

40 50 

51 The unredacted API key value.

52 

41### Example53### Example

42 54 

43```python55```python

Details

1## Delete project spend limit

2 

3`admin.organization.projects.spend_limit.delete(strproject_id) -> ProjectSpendLimitDeleted`

4 

5**delete** `/organization/projects/{project_id}/spend_limit`

6 

7Delete a project's hard spend limit.

8 

9### Parameters

10 

11- `project_id: str`

12 

13### Returns

14 

15- `class ProjectSpendLimitDeleted: …`

16 

17 Confirmation payload returned after deleting a project hard spend limit.

18 

19 - `deleted: bool`

20 

21 Whether the hard spend limit was deleted.

22 

23 - `object: Literal["project.spend_limit.deleted"]`

24 

25 The object type, which is always `project.spend_limit.deleted`.

26 

27 - `"project.spend_limit.deleted"`

28 

29### Example

30 

31```python

32import os

33from openai import OpenAI

34 

35client = OpenAI(

36 admin_api_key=os.environ.get("OPENAI_ADMIN_KEY"), # This is the default and can be omitted

37)

38project_spend_limit_deleted = client.admin.organization.projects.spend_limit.delete(

39 "proj_123",

40)

41print(project_spend_limit_deleted.deleted)

42```

43 

44#### Response

45 

46```json

47{

48 "deleted": true,

49 "object": "project.spend_limit.deleted"

50}

51```

Details

1## Retrieve project spend limit

2 

3`admin.organization.projects.spend_limit.retrieve(strproject_id) -> ProjectSpendLimit`

4 

5**get** `/organization/projects/{project_id}/spend_limit`

6 

7Get a project's hard spend limit.

8 

9### Parameters

10 

11- `project_id: str`

12 

13### Returns

14 

15- `class ProjectSpendLimit: …`

16 

17 Represents a hard spend limit configured at the project level.

18 

19 - `currency: Union[str, Literal["USD"]]`

20 

21 The currency for the threshold amount. Currently, only `USD` is supported.

22 

23 - `str`

24 

25 - `Literal["USD"]`

26 

27 The currency for the threshold amount. Currently, only `USD` is supported.

28 

29 - `"USD"`

30 

31 - `enforcement: Enforcement`

32 

33 The current enforcement state of the hard spend limit.

34 

35 - `status: Union[str, Literal["inactive", "enforcing"]]`

36 

37 Whether the hard spend limit is currently enforcing.

38 

39 - `str`

40 

41 - `Literal["inactive", "enforcing"]`

42 

43 Whether the hard spend limit is currently enforcing.

44 

45 - `"inactive"`

46 

47 - `"enforcing"`

48 

49 - `interval: Union[str, Literal["month"]]`

50 

51 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

52 

53 - `str`

54 

55 - `Literal["month"]`

56 

57 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

58 

59 - `"month"`

60 

61 - `object: Literal["project.spend_limit"]`

62 

63 The object type, which is always `project.spend_limit`.

64 

65 - `"project.spend_limit"`

66 

67 - `threshold_amount: int`

68 

69 The hard spend limit amount, in cents.

70 

71### Example

72 

73```python

74import os

75from openai import OpenAI

76 

77client = OpenAI(

78 admin_api_key=os.environ.get("OPENAI_ADMIN_KEY"), # This is the default and can be omitted

79)

80project_spend_limit = client.admin.organization.projects.spend_limit.retrieve(

81 "proj_123",

82)

83print(project_spend_limit.currency)

84```

85 

86#### Response

87 

88```json

89{

90 "currency": "USD",

91 "enforcement": {

92 "status": "inactive"

93 },

94 "interval": "month",

95 "object": "project.spend_limit",

96 "threshold_amount": 0

97}

98```

Details

1## Update project spend limit

2 

3`admin.organization.projects.spend_limit.update(strproject_id, SpendLimitUpdateParams**kwargs) -> ProjectSpendLimit`

4 

5**post** `/organization/projects/{project_id}/spend_limit`

6 

7Create or replace a project's hard spend limit.

8 

9### Parameters

10 

11- `project_id: str`

12 

13- `currency: Literal["USD"]`

14 

15 The currency for the threshold amount. Currently, only `USD` is supported.

16 

17 - `"USD"`

18 

19- `interval: Literal["month"]`

20 

21 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

22 

23 - `"month"`

24 

25- `threshold_amount: int`

26 

27 The hard spend limit amount, in cents.

28 

29### Returns

30 

31- `class ProjectSpendLimit: …`

32 

33 Represents a hard spend limit configured at the project level.

34 

35 - `currency: Union[str, Literal["USD"]]`

36 

37 The currency for the threshold amount. Currently, only `USD` is supported.

38 

39 - `str`

40 

41 - `Literal["USD"]`

42 

43 The currency for the threshold amount. Currently, only `USD` is supported.

44 

45 - `"USD"`

46 

47 - `enforcement: Enforcement`

48 

49 The current enforcement state of the hard spend limit.

50 

51 - `status: Union[str, Literal["inactive", "enforcing"]]`

52 

53 Whether the hard spend limit is currently enforcing.

54 

55 - `str`

56 

57 - `Literal["inactive", "enforcing"]`

58 

59 Whether the hard spend limit is currently enforcing.

60 

61 - `"inactive"`

62 

63 - `"enforcing"`

64 

65 - `interval: Union[str, Literal["month"]]`

66 

67 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

68 

69 - `str`

70 

71 - `Literal["month"]`

72 

73 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

74 

75 - `"month"`

76 

77 - `object: Literal["project.spend_limit"]`

78 

79 The object type, which is always `project.spend_limit`.

80 

81 - `"project.spend_limit"`

82 

83 - `threshold_amount: int`

84 

85 The hard spend limit amount, in cents.

86 

87### Example

88 

89```python

90import os

91from openai import OpenAI

92 

93client = OpenAI(

94 admin_api_key=os.environ.get("OPENAI_ADMIN_KEY"), # This is the default and can be omitted

95)

96project_spend_limit = client.admin.organization.projects.spend_limit.update(

97 project_id="proj_123",

98 currency="USD",

99 interval="month",

100 threshold_amount=1,

101)

102print(project_spend_limit.currency)

103```

104 

105#### Response

106 

107```json

108{

109 "currency": "USD",

110 "enforcement": {

111 "status": "inactive"

112 },

113 "interval": "month",

114 "object": "project.spend_limit",

115 "threshold_amount": 0

116}

117```

Details

1## Delete organization spend limit

2 

3`admin.organization.spend_limit.delete() -> OrganizationSpendLimitDeleted`

4 

5**delete** `/organization/spend_limit`

6 

7Delete the organization's hard spend limit.

8 

9### Returns

10 

11- `class OrganizationSpendLimitDeleted: …`

12 

13 Confirmation payload returned after deleting an organization hard spend limit.

14 

15 - `deleted: bool`

16 

17 Whether the hard spend limit was deleted.

18 

19 - `object: Literal["organization.spend_limit.deleted"]`

20 

21 The object type, which is always `organization.spend_limit.deleted`.

22 

23 - `"organization.spend_limit.deleted"`

24 

25### Example

26 

27```python

28import os

29from openai import OpenAI

30 

31client = OpenAI(

32 admin_api_key=os.environ.get("OPENAI_ADMIN_KEY"), # This is the default and can be omitted

33)

34organization_spend_limit_deleted = client.admin.organization.spend_limit.delete()

35print(organization_spend_limit_deleted.deleted)

36```

37 

38#### Response

39 

40```json

41{

42 "deleted": true,

43 "object": "organization.spend_limit.deleted"

44}

45```

Details

1## Retrieve organization spend limit

2 

3`admin.organization.spend_limit.retrieve() -> OrganizationSpendLimit`

4 

5**get** `/organization/spend_limit`

6 

7Get the organization's hard spend limit.

8 

9### Returns

10 

11- `class OrganizationSpendLimit: …`

12 

13 Represents a hard spend limit configured at the organization level.

14 

15 - `currency: Union[str, Literal["USD"]]`

16 

17 The currency for the threshold amount. Currently, only `USD` is supported.

18 

19 - `str`

20 

21 - `Literal["USD"]`

22 

23 The currency for the threshold amount. Currently, only `USD` is supported.

24 

25 - `"USD"`

26 

27 - `enforcement: Enforcement`

28 

29 The current enforcement state of the hard spend limit.

30 

31 - `status: Union[str, Literal["inactive", "enforcing"]]`

32 

33 Whether the hard spend limit is currently enforcing.

34 

35 - `str`

36 

37 - `Literal["inactive", "enforcing"]`

38 

39 Whether the hard spend limit is currently enforcing.

40 

41 - `"inactive"`

42 

43 - `"enforcing"`

44 

45 - `interval: Union[str, Literal["month"]]`

46 

47 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

48 

49 - `str`

50 

51 - `Literal["month"]`

52 

53 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

54 

55 - `"month"`

56 

57 - `object: Literal["organization.spend_limit"]`

58 

59 The object type, which is always `organization.spend_limit`.

60 

61 - `"organization.spend_limit"`

62 

63 - `threshold_amount: int`

64 

65 The hard spend limit amount, in cents.

66 

67### Example

68 

69```python

70import os

71from openai import OpenAI

72 

73client = OpenAI(

74 admin_api_key=os.environ.get("OPENAI_ADMIN_KEY"), # This is the default and can be omitted

75)

76organization_spend_limit = client.admin.organization.spend_limit.retrieve()

77print(organization_spend_limit.currency)

78```

79 

80#### Response

81 

82```json

83{

84 "currency": "USD",

85 "enforcement": {

86 "status": "inactive"

87 },

88 "interval": "month",

89 "object": "organization.spend_limit",

90 "threshold_amount": 0

91}

92```

Details

1## Update organization spend limit

2 

3`admin.organization.spend_limit.update(SpendLimitUpdateParams**kwargs) -> OrganizationSpendLimit`

4 

5**post** `/organization/spend_limit`

6 

7Create or replace the organization's hard spend limit.

8 

9### Parameters

10 

11- `currency: Literal["USD"]`

12 

13 The currency for the threshold amount. Currently, only `USD` is supported.

14 

15 - `"USD"`

16 

17- `interval: Literal["month"]`

18 

19 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

20 

21 - `"month"`

22 

23- `threshold_amount: int`

24 

25 The hard spend limit amount, in cents.

26 

27### Returns

28 

29- `class OrganizationSpendLimit: …`

30 

31 Represents a hard spend limit configured at the organization level.

32 

33 - `currency: Union[str, Literal["USD"]]`

34 

35 The currency for the threshold amount. Currently, only `USD` is supported.

36 

37 - `str`

38 

39 - `Literal["USD"]`

40 

41 The currency for the threshold amount. Currently, only `USD` is supported.

42 

43 - `"USD"`

44 

45 - `enforcement: Enforcement`

46 

47 The current enforcement state of the hard spend limit.

48 

49 - `status: Union[str, Literal["inactive", "enforcing"]]`

50 

51 Whether the hard spend limit is currently enforcing.

52 

53 - `str`

54 

55 - `Literal["inactive", "enforcing"]`

56 

57 Whether the hard spend limit is currently enforcing.

58 

59 - `"inactive"`

60 

61 - `"enforcing"`

62 

63 - `interval: Union[str, Literal["month"]]`

64 

65 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

66 

67 - `str`

68 

69 - `Literal["month"]`

70 

71 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

72 

73 - `"month"`

74 

75 - `object: Literal["organization.spend_limit"]`

76 

77 The object type, which is always `organization.spend_limit`.

78 

79 - `"organization.spend_limit"`

80 

81 - `threshold_amount: int`

82 

83 The hard spend limit amount, in cents.

84 

85### Example

86 

87```python

88import os

89from openai import OpenAI

90 

91client = OpenAI(

92 admin_api_key=os.environ.get("OPENAI_ADMIN_KEY"), # This is the default and can be omitted

93)

94organization_spend_limit = client.admin.organization.spend_limit.update(

95 currency="USD",

96 interval="month",

97 threshold_amount=1,

98)

99print(organization_spend_limit.currency)

100```

101 

102#### Response

103 

104```json

105{

106 "currency": "USD",

107 "enforcement": {

108 "status": "inactive"

109 },

110 "interval": "month",

111 "object": "organization.spend_limit",

112 "threshold_amount": 0

113}

114```

Details

32 32 

33 An error object returned when the model fails to generate a Response.33 An error object returned when the model fails to generate a Response.

34 34 

35 - `code: Literal["server_error", "rate_limit_exceeded", "invalid_prompt", 16 more]`35 - `code: Literal["server_error", "rate_limit_exceeded", "invalid_prompt", 17 more]`

36 36 

37 The error code for the response.37 The error code for the response.

38 38 


42 42 

43 - `"invalid_prompt"`43 - `"invalid_prompt"`

44 44 

45 - `"data_residency_mismatch"`

46 

45 - `"bio_policy"`47 - `"bio_policy"`

46 48 

47 - `"vector_store_timeout"`49 - `"vector_store_timeout"`


6173 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`6175 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`

6174 6176 

6175 Controls which reasoning items are rendered back to the model on later turns.6177 Controls which reasoning items are rendered back to the model on later turns.

6178 If omitted or set to `auto`, the model determines the context mode. The

6179 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

6180 `current_turn`.

6181 

6176 When returned on a response, this is the effective reasoning context mode6182 When returned on a response, this is the effective reasoning context mode

6177 used for the response.6183 used for the response.

6178 6184 


6380 6386 

6381 Constrains the verbosity of the model's response. Lower values will result in6387 Constrains the verbosity of the model's response. Lower values will result in

6382 more concise responses, while higher values will result in more verbose responses.6388 more concise responses, while higher values will result in more verbose responses.

6383 Currently supported values are `low`, `medium`, and `high`.6389 Currently supported values are `low`, `medium`, and `high`. The default is

6390 `medium`.

6384 6391 

6385 - `"low"`6392 - `"low"`

6386 6393 

Details

7865 "usage": {7865 "usage": {

7866 "input_tokens": 139,7866 "input_tokens": 139,

7867 "input_tokens_details": {7867 "input_tokens_details": {

7868 "cached_tokens": 07868 "cached_tokens": 0,

7869 "cache_write_tokens": 0

7869 },7870 },

7870 "output_tokens": 438,7871 "output_tokens": 438,

7871 "output_tokens_details": {7872 "output_tokens_details": {

Details

4274 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`4274 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`

4275 4275 

4276 Controls which reasoning items are rendered back to the model on later turns.4276 Controls which reasoning items are rendered back to the model on later turns.

4277 If omitted or set to `auto`, the model determines the context mode. The

4278 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

4279 `current_turn`.

4280 

4277 When returned on a response, this is the effective reasoning context mode4281 When returned on a response, this is the effective reasoning context mode

4278 used for the response.4282 used for the response.

4279 4283 


4497 4501 

4498 Constrains the verbosity of the model's response. Lower values will result in4502 Constrains the verbosity of the model's response. Lower values will result in

4499 more concise responses, while higher values will result in more verbose responses.4503 more concise responses, while higher values will result in more verbose responses.

4500 Currently supported values are `low`, `medium`, and `high`.4504 Currently supported values are `low`, `medium`, and `high`. The default is

4505 `medium`.

4501 4506 

4502 - `"low"`4507 - `"low"`

4503 4508 


4806 4811 

4807 An error object returned when the model fails to generate a Response.4812 An error object returned when the model fails to generate a Response.

4808 4813 

4809 - `code: Literal["server_error", "rate_limit_exceeded", "invalid_prompt", 16 more]`4814 - `code: Literal["server_error", "rate_limit_exceeded", "invalid_prompt", 17 more]`

4810 4815 

4811 The error code for the response.4816 The error code for the response.

4812 4817 


4816 4821 

4817 - `"invalid_prompt"`4822 - `"invalid_prompt"`

4818 4823 

4824 - `"data_residency_mismatch"`

4825 

4819 - `"bio_policy"`4826 - `"bio_policy"`

4820 4827 

4821 - `"vector_store_timeout"`4828 - `"vector_store_timeout"`


10947 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`10954 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`

10948 10955 

10949 Controls which reasoning items are rendered back to the model on later turns.10956 Controls which reasoning items are rendered back to the model on later turns.

10957 If omitted or set to `auto`, the model determines the context mode. The

10958 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

10959 `current_turn`.

10960 

10950 When returned on a response, this is the effective reasoning context mode10961 When returned on a response, this is the effective reasoning context mode

10951 used for the response.10962 used for the response.

10952 10963 


11154 11165 

11155 Constrains the verbosity of the model's response. Lower values will result in11166 Constrains the verbosity of the model's response. Lower values will result in

11156 more concise responses, while higher values will result in more verbose responses.11167 more concise responses, while higher values will result in more verbose responses.

11157 Currently supported values are `low`, `medium`, and `high`.11168 Currently supported values are `low`, `medium`, and `high`. The default is

11169 `medium`.

11158 11170 

11159 - `"low"`11171 - `"low"`

11160 11172 


11479 "usage": {11491 "usage": {

11480 "input_tokens": 36,11492 "input_tokens": 36,

11481 "input_tokens_details": {11493 "input_tokens_details": {

11482 "cached_tokens": 011494 "cached_tokens": 0,

11495 "cache_write_tokens": 0

11483 },11496 },

11484 "output_tokens": 87,11497 "output_tokens": 87,

11485 "output_tokens_details": {11498 "output_tokens_details": {


11567 "usage": {11580 "usage": {

11568 "input_tokens": 328,11581 "input_tokens": 328,

11569 "input_tokens_details": {11582 "input_tokens_details": {

11570 "cached_tokens": 011583 "cached_tokens": 0,

11584 "cache_write_tokens": 0

11571 },11585 },

11572 "output_tokens": 52,11586 "output_tokens": 52,

11573 "output_tokens_details": {11587 "output_tokens_details": {


11661 "usage": {11675 "usage": {

11662 "input_tokens": 8438,11676 "input_tokens": 8438,

11663 "input_tokens_details": {11677 "input_tokens_details": {

11664 "cached_tokens": 011678 "cached_tokens": 0,

11679 "cache_write_tokens": 0

11665 },11680 },

11666 "output_tokens": 398,11681 "output_tokens": 398,

11667 "output_tokens_details": {11682 "output_tokens_details": {


11779 "usage": {11794 "usage": {

11780 "input_tokens": 328,11795 "input_tokens": 328,

11781 "input_tokens_details": {11796 "input_tokens_details": {

11782 "cached_tokens": 011797 "cached_tokens": 0,

11798 "cache_write_tokens": 0

11783 },11799 },

11784 "output_tokens": 356,11800 "output_tokens": 356,

11785 "output_tokens_details": {11801 "output_tokens_details": {


11932 "usage": {11948 "usage": {

11933 "input_tokens": 18307,11949 "input_tokens": 18307,

11934 "input_tokens_details": {11950 "input_tokens_details": {

11935 "cached_tokens": 011951 "cached_tokens": 0,

11952 "cache_write_tokens": 0

11936 },11953 },

11937 "output_tokens": 348,11954 "output_tokens": 348,

11938 "output_tokens_details": {11955 "output_tokens_details": {


12179 "usage": {12196 "usage": {

12180 "input_tokens": 81,12197 "input_tokens": 81,

12181 "input_tokens_details": {12198 "input_tokens_details": {

12182 "cached_tokens": 012199 "cached_tokens": 0,

12200 "cache_write_tokens": 0

12183 },12201 },

12184 "output_tokens": 1035,12202 "output_tokens": 1035,

12185 "output_tokens_details": {12203 "output_tokens_details": {

Details

74 74 

75 An error object returned when the model fails to generate a Response.75 An error object returned when the model fails to generate a Response.

76 76 

77 - `code: Literal["server_error", "rate_limit_exceeded", "invalid_prompt", 16 more]`77 - `code: Literal["server_error", "rate_limit_exceeded", "invalid_prompt", 17 more]`

78 78 

79 The error code for the response.79 The error code for the response.

80 80 


84 84 

85 - `"invalid_prompt"`85 - `"invalid_prompt"`

86 86 

87 - `"data_residency_mismatch"`

88 

87 - `"bio_policy"`89 - `"bio_policy"`

88 90 

89 - `"vector_store_timeout"`91 - `"vector_store_timeout"`


6215 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`6217 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`

6216 6218 

6217 Controls which reasoning items are rendered back to the model on later turns.6219 Controls which reasoning items are rendered back to the model on later turns.

6220 If omitted or set to `auto`, the model determines the context mode. The

6221 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

6222 `current_turn`.

6223 

6218 When returned on a response, this is the effective reasoning context mode6224 When returned on a response, this is the effective reasoning context mode

6219 used for the response.6225 used for the response.

6220 6226 


6422 6428 

6423 Constrains the verbosity of the model's response. Lower values will result in6429 Constrains the verbosity of the model's response. Lower values will result in

6424 more concise responses, while higher values will result in more verbose responses.6430 more concise responses, while higher values will result in more verbose responses.

6425 Currently supported values are `low`, `medium`, and `high`.6431 Currently supported values are `low`, `medium`, and `high`. The default is

6432 `medium`.

6426 6433 

6427 - `"low"`6434 - `"low"`

6428 6435 


6744 "usage": {6751 "usage": {

6745 "input_tokens": 32,6752 "input_tokens": 32,

6746 "input_tokens_details": {6753 "input_tokens_details": {

6747 "cached_tokens": 06754 "cached_tokens": 0,

6755 "cache_write_tokens": 0

6748 },6756 },

6749 "output_tokens": 18,6757 "output_tokens": 18,

6750 "output_tokens_details": {6758 "output_tokens_details": {

Details

3886 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`3886 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`

3887 3887 

3888 Controls which reasoning items are rendered back to the model on later turns.3888 Controls which reasoning items are rendered back to the model on later turns.

3889 If omitted or set to `auto`, the model determines the context mode. The

3890 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

3891 `current_turn`.

3892 

3889 When returned on a response, this is the effective reasoning context mode3893 When returned on a response, this is the effective reasoning context mode

3890 used for the response.3894 used for the response.

3891 3895 


4050 4054 

4051 Constrains the verbosity of the model's response. Lower values will result in4055 Constrains the verbosity of the model's response. Lower values will result in

4052 more concise responses, while higher values will result in more verbose responses.4056 more concise responses, while higher values will result in more verbose responses.

4053 Currently supported values are `low`, `medium`, and `high`.4057 Currently supported values are `low`, `medium`, and `high`. The default is

4058 `medium`.

4054 4059 

4055 - `"low"`4060 - `"low"`

4056 4061 

Details

1326 1326 

1327 Constrains the verbosity of the model's response. Lower values will result in1327 Constrains the verbosity of the model's response. Lower values will result in

1328 more concise responses, while higher values will result in more verbose responses.1328 more concise responses, while higher values will result in more verbose responses.

1329 Currently supported values are `low`, `medium`, and `high`.1329 Currently supported values are `low`, `medium`, and `high`. The default is

1330 `medium`.

1330 1331 

1331 - `"low"`1332 - `"low"`

1332 1333 

Details

28 28 

29 An error object returned when the model fails to generate a Response.29 An error object returned when the model fails to generate a Response.

30 30 

31 - `code: Literal["server_error", "rate_limit_exceeded", "invalid_prompt", 16 more]`31 - `code: Literal["server_error", "rate_limit_exceeded", "invalid_prompt", 17 more]`

32 32 

33 The error code for the response.33 The error code for the response.

34 34 


38 38 

39 - `"invalid_prompt"`39 - `"invalid_prompt"`

40 40 

41 - `"data_residency_mismatch"`

42 

41 - `"bio_policy"`43 - `"bio_policy"`

42 44 

43 - `"vector_store_timeout"`45 - `"vector_store_timeout"`


5396 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`5398 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`

5397 5399 

5398 Controls which reasoning items are rendered back to the model on later turns.5400 Controls which reasoning items are rendered back to the model on later turns.

5401 If omitted or set to `auto`, the model determines the context mode. The

5402 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

5403 `current_turn`.

5404 

5399 When returned on a response, this is the effective reasoning context mode5405 When returned on a response, this is the effective reasoning context mode

5400 used for the response.5406 used for the response.

5401 5407 


5603 5609 

5604 Constrains the verbosity of the model's response. Lower values will result in5610 Constrains the verbosity of the model's response. Lower values will result in

5605 more concise responses, while higher values will result in more verbose responses.5611 more concise responses, while higher values will result in more verbose responses.

5606 Currently supported values are `low`, `medium`, and `high`.5612 Currently supported values are `low`, `medium`, and `high`. The default is

5613 `medium`.

5607 5614 

5608 - `"low"`5615 - `"low"`

5609 5616 

Details

7130 "usage": {7130 "usage": {

7131 "input_tokens": 139,7131 "input_tokens": 139,

7132 "input_tokens_details": {7132 "input_tokens_details": {

7133 "cached_tokens": 07133 "cached_tokens": 0,

7134 "cache_write_tokens": 0

7134 },7135 },

7135 "output_tokens": 438,7136 "output_tokens": 438,

7136 "output_tokens_details": {7137 "output_tokens_details": {

Details

3886 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`3886 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`

3887 3887 

3888 Controls which reasoning items are rendered back to the model on later turns.3888 Controls which reasoning items are rendered back to the model on later turns.

3889 If omitted or set to `auto`, the model determines the context mode. The

3890 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

3891 `current_turn`.

3892 

3889 When returned on a response, this is the effective reasoning context mode3893 When returned on a response, this is the effective reasoning context mode

3890 used for the response.3894 used for the response.

3891 3895 


4109 4113 

4110 Constrains the verbosity of the model's response. Lower values will result in4114 Constrains the verbosity of the model's response. Lower values will result in

4111 more concise responses, while higher values will result in more verbose responses.4115 more concise responses, while higher values will result in more verbose responses.

4112 Currently supported values are `low`, `medium`, and `high`.4116 Currently supported values are `low`, `medium`, and `high`. The default is

4117 `medium`.

4113 4118 

4114 - `"low"`4119 - `"low"`

4115 4120 


4414 4419 

4415 An error object returned when the model fails to generate a Response.4420 An error object returned when the model fails to generate a Response.

4416 4421 

4417 - `code: Literal["server_error", "rate_limit_exceeded", "invalid_prompt", 16 more]`4422 - `code: Literal["server_error", "rate_limit_exceeded", "invalid_prompt", 17 more]`

4418 4423 

4419 The error code for the response.4424 The error code for the response.

4420 4425 


4424 4429 

4425 - `"invalid_prompt"`4430 - `"invalid_prompt"`

4426 4431 

4432 - `"data_residency_mismatch"`

4433 

4427 - `"bio_policy"`4434 - `"bio_policy"`

4428 4435 

4429 - `"vector_store_timeout"`4436 - `"vector_store_timeout"`


9782 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`9789 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`

9783 9790 

9784 Controls which reasoning items are rendered back to the model on later turns.9791 Controls which reasoning items are rendered back to the model on later turns.

9792 If omitted or set to `auto`, the model determines the context mode. The

9793 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

9794 `current_turn`.

9795 

9785 When returned on a response, this is the effective reasoning context mode9796 When returned on a response, this is the effective reasoning context mode

9786 used for the response.9797 used for the response.

9787 9798 


9989 10000 

9990 Constrains the verbosity of the model's response. Lower values will result in10001 Constrains the verbosity of the model's response. Lower values will result in

9991 more concise responses, while higher values will result in more verbose responses.10002 more concise responses, while higher values will result in more verbose responses.

9992 Currently supported values are `low`, `medium`, and `high`.10003 Currently supported values are `low`, `medium`, and `high`. The default is

10004 `medium`.

9993 10005 

9994 - `"low"`10006 - `"low"`

9995 10007 


10311 "usage": {10323 "usage": {

10312 "input_tokens": 36,10324 "input_tokens": 36,

10313 "input_tokens_details": {10325 "input_tokens_details": {

10314 "cached_tokens": 010326 "cached_tokens": 0,

10327 "cache_write_tokens": 0

10315 },10328 },

10316 "output_tokens": 87,10329 "output_tokens": 87,

10317 "output_tokens_details": {10330 "output_tokens_details": {


10399 "usage": {10412 "usage": {

10400 "input_tokens": 328,10413 "input_tokens": 328,

10401 "input_tokens_details": {10414 "input_tokens_details": {

10402 "cached_tokens": 010415 "cached_tokens": 0,

10416 "cache_write_tokens": 0

10403 },10417 },

10404 "output_tokens": 52,10418 "output_tokens": 52,

10405 "output_tokens_details": {10419 "output_tokens_details": {


10493 "usage": {10507 "usage": {

10494 "input_tokens": 8438,10508 "input_tokens": 8438,

10495 "input_tokens_details": {10509 "input_tokens_details": {

10496 "cached_tokens": 010510 "cached_tokens": 0,

10511 "cache_write_tokens": 0

10497 },10512 },

10498 "output_tokens": 398,10513 "output_tokens": 398,

10499 "output_tokens_details": {10514 "output_tokens_details": {


10611 "usage": {10626 "usage": {

10612 "input_tokens": 328,10627 "input_tokens": 328,

10613 "input_tokens_details": {10628 "input_tokens_details": {

10614 "cached_tokens": 010629 "cached_tokens": 0,

10630 "cache_write_tokens": 0

10615 },10631 },

10616 "output_tokens": 356,10632 "output_tokens": 356,

10617 "output_tokens_details": {10633 "output_tokens_details": {


10764 "usage": {10780 "usage": {

10765 "input_tokens": 18307,10781 "input_tokens": 18307,

10766 "input_tokens_details": {10782 "input_tokens_details": {

10767 "cached_tokens": 010783 "cached_tokens": 0,

10784 "cache_write_tokens": 0

10768 },10785 },

10769 "output_tokens": 348,10786 "output_tokens": 348,

10770 "output_tokens_details": {10787 "output_tokens_details": {


11011 "usage": {11028 "usage": {

11012 "input_tokens": 81,11029 "input_tokens": 81,

11013 "input_tokens_details": {11030 "input_tokens_details": {

11014 "cached_tokens": 011031 "cached_tokens": 0,

11032 "cache_write_tokens": 0

11015 },11033 },

11016 "output_tokens": 1035,11034 "output_tokens": 1035,

11017 "output_tokens_details": {11035 "output_tokens_details": {

Details

70 70 

71 An error object returned when the model fails to generate a Response.71 An error object returned when the model fails to generate a Response.

72 72 

73 - `code: Literal["server_error", "rate_limit_exceeded", "invalid_prompt", 16 more]`73 - `code: Literal["server_error", "rate_limit_exceeded", "invalid_prompt", 17 more]`

74 74 

75 The error code for the response.75 The error code for the response.

76 76 


80 80 

81 - `"invalid_prompt"`81 - `"invalid_prompt"`

82 82 

83 - `"data_residency_mismatch"`

84 

83 - `"bio_policy"`85 - `"bio_policy"`

84 86 

85 - `"vector_store_timeout"`87 - `"vector_store_timeout"`


5438 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`5440 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`

5439 5441 

5440 Controls which reasoning items are rendered back to the model on later turns.5442 Controls which reasoning items are rendered back to the model on later turns.

5443 If omitted or set to `auto`, the model determines the context mode. The

5444 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

5445 `current_turn`.

5446 

5441 When returned on a response, this is the effective reasoning context mode5447 When returned on a response, this is the effective reasoning context mode

5442 used for the response.5448 used for the response.

5443 5449 


5645 5651 

5646 Constrains the verbosity of the model's response. Lower values will result in5652 Constrains the verbosity of the model's response. Lower values will result in

5647 more concise responses, while higher values will result in more verbose responses.5653 more concise responses, while higher values will result in more verbose responses.

5648 Currently supported values are `low`, `medium`, and `high`.5654 Currently supported values are `low`, `medium`, and `high`. The default is

5655 `medium`.

5649 5656 

5650 - `"low"`5657 - `"low"`

5651 5658 


5964 "usage": {5971 "usage": {

5965 "input_tokens": 32,5972 "input_tokens": 32,

5966 "input_tokens_details": {5973 "input_tokens_details": {

5967 "cached_tokens": 05974 "cached_tokens": 0,

5975 "cache_write_tokens": 0

5968 },5976 },

5969 "output_tokens": 18,5977 "output_tokens": 18,

5970 "output_tokens_details": {5978 "output_tokens_details": {

Details

3514 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`3514 - `context: Optional[Literal["auto", "current_turn", "all_turns"]]`

3515 3515 

3516 Controls which reasoning items are rendered back to the model on later turns.3516 Controls which reasoning items are rendered back to the model on later turns.

3517 If omitted or set to `auto`, the model determines the context mode. The

3518 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

3519 `current_turn`.

3520 

3517 When returned on a response, this is the effective reasoning context mode3521 When returned on a response, this is the effective reasoning context mode

3518 used for the response.3522 used for the response.

3519 3523 


3678 3682 

3679 Constrains the verbosity of the model's response. Lower values will result in3683 Constrains the verbosity of the model's response. Lower values will result in

3680 more concise responses, while higher values will result in more verbose responses.3684 more concise responses, while higher values will result in more verbose responses.

3681 Currently supported values are `low`, `medium`, and `high`.3685 Currently supported values are `low`, `medium`, and `high`. The default is

3686 `medium`.

3682 3687 

3683 - `"low"`3688 - `"low"`

3684 3689 

Details

433 - `context: optional "auto" or "current_turn" or "all_turns"`433 - `context: optional "auto" or "current_turn" or "all_turns"`

434 434 

435 Controls which reasoning items are rendered back to the model on later turns.435 Controls which reasoning items are rendered back to the model on later turns.

436 If omitted or set to `auto`, the model determines the context mode. The

437 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

438 `current_turn`.

439 

436 When returned on a response, this is the effective reasoning context mode440 When returned on a response, this is the effective reasoning context mode

437 used for the response.441 used for the response.

438 442 

Details

8 8 

9- `project_id: string`9- `project_id: string`

10 10 

11 The ID of the project.

12 

11- `service_account_id: string`13- `service_account_id: string`

12 14 

15 The ID of the service account.

16 

13### Body Parameters17### Body Parameters

14 18 

15- `name: optional string`19- `name: optional string`


24 28 

25- `id: string`29- `id: string`

26 30 

31 The identifier of the API key.

32 

27- `created_at: number`33- `created_at: number`

28 34 

35 The Unix timestamp (in seconds) when the API key was created.

36 

29- `name: string`37- `name: string`

30 38 

39 The name of the API key.

40 

31- `object: "organization.project.service_account.api_key"`41- `object: "organization.project.service_account.api_key"`

32 42 

33 The object type, which is always `organization.project.service_account.api_key`43 The object type, which is always `organization.project.service_account.api_key`


36 46 

37- `value: string`47- `value: string`

38 48 

49 The unredacted API key value.

50 

39### Example51### Example

40 52 

41```http53```http

Details

1## Delete project spend limit

2 

3**delete** `/organization/projects/{project_id}/spend_limit`

4 

5Delete a project's hard spend limit.

6 

7### Path Parameters

8 

9- `project_id: string`

10 

11### Returns

12 

13- `ProjectSpendLimitDeleted object { deleted, object }`

14 

15 Confirmation payload returned after deleting a project hard spend limit.

16 

17 - `deleted: boolean`

18 

19 Whether the hard spend limit was deleted.

20 

21 - `object: "project.spend_limit.deleted"`

22 

23 The object type, which is always `project.spend_limit.deleted`.

24 

25 - `"project.spend_limit.deleted"`

26 

27### Example

28 

29```http

30curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/spend_limit \

31 -X DELETE \

32 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

33```

34 

35#### Response

36 

37```json

38{

39 "deleted": true,

40 "object": "project.spend_limit.deleted"

41}

42```

43 

44### Example

45 

46```http

47curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/spend_limit \

48 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

49 -H "Content-Type: application/json"

50```

51 

52#### Response

53 

54```json

55{

56 "object": "project.spend_limit.deleted",

57 "deleted": true

58}

59```

Details

1## Retrieve project spend limit

2 

3**get** `/organization/projects/{project_id}/spend_limit`

4 

5Get a project's hard spend limit.

6 

7### Path Parameters

8 

9- `project_id: string`

10 

11### Returns

12 

13- `ProjectSpendLimit object { currency, enforcement, interval, 2 more }`

14 

15 Represents a hard spend limit configured at the project level.

16 

17 - `currency: string or "USD"`

18 

19 The currency for the threshold amount. Currently, only `USD` is supported.

20 

21 - `string`

22 

23 - `"USD"`

24 

25 The currency for the threshold amount. Currently, only `USD` is supported.

26 

27 - `"USD"`

28 

29 - `enforcement: object { status }`

30 

31 The current enforcement state of the hard spend limit.

32 

33 - `status: string or "inactive" or "enforcing"`

34 

35 Whether the hard spend limit is currently enforcing.

36 

37 - `string`

38 

39 - `"inactive" or "enforcing"`

40 

41 Whether the hard spend limit is currently enforcing.

42 

43 - `"inactive"`

44 

45 - `"enforcing"`

46 

47 - `interval: string or "month"`

48 

49 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

50 

51 - `string`

52 

53 - `"month"`

54 

55 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

56 

57 - `"month"`

58 

59 - `object: "project.spend_limit"`

60 

61 The object type, which is always `project.spend_limit`.

62 

63 - `"project.spend_limit"`

64 

65 - `threshold_amount: number`

66 

67 The hard spend limit amount, in cents.

68 

69### Example

70 

71```http

72curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/spend_limit \

73 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

74```

75 

76#### Response

77 

78```json

79{

80 "currency": "USD",

81 "enforcement": {

82 "status": "inactive"

83 },

84 "interval": "month",

85 "object": "project.spend_limit",

86 "threshold_amount": 0

87}

88```

89 

90### Example

91 

92```http

93curl https://api.openai.com/v1/organization/projects/proj_abc/spend_limit \

94 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

95 -H "Content-Type: application/json"

96```

97 

98#### Response

99 

100```json

101{

102 "object": "project.spend_limit",

103 "threshold_amount": 10000,

104 "currency": "USD",

105 "interval": "month",

106 "enforcement": {

107 "status": "enforcing"

108 }

109}

110```

Details

1## Update project spend limit

2 

3**post** `/organization/projects/{project_id}/spend_limit`

4 

5Create or replace a project's hard spend limit.

6 

7### Path Parameters

8 

9- `project_id: string`

10 

11### Body Parameters

12 

13- `currency: "USD"`

14 

15 The currency for the threshold amount. Currently, only `USD` is supported.

16 

17 - `"USD"`

18 

19- `interval: "month"`

20 

21 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

22 

23 - `"month"`

24 

25- `threshold_amount: number`

26 

27 The hard spend limit amount, in cents.

28 

29### Returns

30 

31- `ProjectSpendLimit object { currency, enforcement, interval, 2 more }`

32 

33 Represents a hard spend limit configured at the project level.

34 

35 - `currency: string or "USD"`

36 

37 The currency for the threshold amount. Currently, only `USD` is supported.

38 

39 - `string`

40 

41 - `"USD"`

42 

43 The currency for the threshold amount. Currently, only `USD` is supported.

44 

45 - `"USD"`

46 

47 - `enforcement: object { status }`

48 

49 The current enforcement state of the hard spend limit.

50 

51 - `status: string or "inactive" or "enforcing"`

52 

53 Whether the hard spend limit is currently enforcing.

54 

55 - `string`

56 

57 - `"inactive" or "enforcing"`

58 

59 Whether the hard spend limit is currently enforcing.

60 

61 - `"inactive"`

62 

63 - `"enforcing"`

64 

65 - `interval: string or "month"`

66 

67 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

68 

69 - `string`

70 

71 - `"month"`

72 

73 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

74 

75 - `"month"`

76 

77 - `object: "project.spend_limit"`

78 

79 The object type, which is always `project.spend_limit`.

80 

81 - `"project.spend_limit"`

82 

83 - `threshold_amount: number`

84 

85 The hard spend limit amount, in cents.

86 

87### Example

88 

89```http

90curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/spend_limit \

91 -H 'Content-Type: application/json' \

92 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

93 -d '{

94 "currency": "USD",

95 "interval": "month",

96 "threshold_amount": 1

97 }'

98```

99 

100#### Response

101 

102```json

103{

104 "currency": "USD",

105 "enforcement": {

106 "status": "inactive"

107 },

108 "interval": "month",

109 "object": "project.spend_limit",

110 "threshold_amount": 0

111}

112```

113 

114### Example

115 

116```http

117curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/spend_limit \

118 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

119 -H "Content-Type: application/json" \

120 -d '{

121 "threshold_amount": 10000,

122 "currency": "USD",

123 "interval": "month"

124 }'

125```

126 

127#### Response

128 

129```json

130{

131 "object": "project.spend_limit",

132 "threshold_amount": 10000,

133 "currency": "USD",

134 "interval": "month",

135 "enforcement": {

136 "status": "enforcing"

137 }

138}

139```

Details

1## Delete organization spend limit

2 

3**delete** `/organization/spend_limit`

4 

5Delete the organization's hard spend limit.

6 

7### Returns

8 

9- `OrganizationSpendLimitDeleted object { deleted, object }`

10 

11 Confirmation payload returned after deleting an organization hard spend limit.

12 

13 - `deleted: boolean`

14 

15 Whether the hard spend limit was deleted.

16 

17 - `object: "organization.spend_limit.deleted"`

18 

19 The object type, which is always `organization.spend_limit.deleted`.

20 

21 - `"organization.spend_limit.deleted"`

22 

23### Example

24 

25```http

26curl https://api.openai.com/v1/organization/spend_limit \

27 -X DELETE \

28 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

29```

30 

31#### Response

32 

33```json

34{

35 "deleted": true,

36 "object": "organization.spend_limit.deleted"

37}

38```

39 

40### Example

41 

42```http

43curl -X DELETE https://api.openai.com/v1/organization/spend_limit \

44 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

45 -H "Content-Type: application/json"

46```

47 

48#### Response

49 

50```json

51{

52 "object": "organization.spend_limit.deleted",

53 "deleted": true

54}

55```

Details

1## Retrieve organization spend limit

2 

3**get** `/organization/spend_limit`

4 

5Get the organization's hard spend limit.

6 

7### Returns

8 

9- `OrganizationSpendLimit object { currency, enforcement, interval, 2 more }`

10 

11 Represents a hard spend limit configured at the organization level.

12 

13 - `currency: string or "USD"`

14 

15 The currency for the threshold amount. Currently, only `USD` is supported.

16 

17 - `string`

18 

19 - `"USD"`

20 

21 The currency for the threshold amount. Currently, only `USD` is supported.

22 

23 - `"USD"`

24 

25 - `enforcement: object { status }`

26 

27 The current enforcement state of the hard spend limit.

28 

29 - `status: string or "inactive" or "enforcing"`

30 

31 Whether the hard spend limit is currently enforcing.

32 

33 - `string`

34 

35 - `"inactive" or "enforcing"`

36 

37 Whether the hard spend limit is currently enforcing.

38 

39 - `"inactive"`

40 

41 - `"enforcing"`

42 

43 - `interval: string or "month"`

44 

45 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

46 

47 - `string`

48 

49 - `"month"`

50 

51 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

52 

53 - `"month"`

54 

55 - `object: "organization.spend_limit"`

56 

57 The object type, which is always `organization.spend_limit`.

58 

59 - `"organization.spend_limit"`

60 

61 - `threshold_amount: number`

62 

63 The hard spend limit amount, in cents.

64 

65### Example

66 

67```http

68curl https://api.openai.com/v1/organization/spend_limit \

69 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

70```

71 

72#### Response

73 

74```json

75{

76 "currency": "USD",

77 "enforcement": {

78 "status": "inactive"

79 },

80 "interval": "month",

81 "object": "organization.spend_limit",

82 "threshold_amount": 0

83}

84```

85 

86### Example

87 

88```http

89curl https://api.openai.com/v1/organization/spend_limit \

90 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

91 -H "Content-Type: application/json"

92```

93 

94#### Response

95 

96```json

97{

98 "object": "organization.spend_limit",

99 "threshold_amount": 10000,

100 "currency": "USD",

101 "interval": "month",

102 "enforcement": {

103 "status": "enforcing"

104 }

105}

106```

Details

1## Update organization spend limit

2 

3**post** `/organization/spend_limit`

4 

5Create or replace the organization's hard spend limit.

6 

7### Body Parameters

8 

9- `currency: "USD"`

10 

11 The currency for the threshold amount. Currently, only `USD` is supported.

12 

13 - `"USD"`

14 

15- `interval: "month"`

16 

17 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

18 

19 - `"month"`

20 

21- `threshold_amount: number`

22 

23 The hard spend limit amount, in cents.

24 

25### Returns

26 

27- `OrganizationSpendLimit object { currency, enforcement, interval, 2 more }`

28 

29 Represents a hard spend limit configured at the organization level.

30 

31 - `currency: string or "USD"`

32 

33 The currency for the threshold amount. Currently, only `USD` is supported.

34 

35 - `string`

36 

37 - `"USD"`

38 

39 The currency for the threshold amount. Currently, only `USD` is supported.

40 

41 - `"USD"`

42 

43 - `enforcement: object { status }`

44 

45 The current enforcement state of the hard spend limit.

46 

47 - `status: string or "inactive" or "enforcing"`

48 

49 Whether the hard spend limit is currently enforcing.

50 

51 - `string`

52 

53 - `"inactive" or "enforcing"`

54 

55 Whether the hard spend limit is currently enforcing.

56 

57 - `"inactive"`

58 

59 - `"enforcing"`

60 

61 - `interval: string or "month"`

62 

63 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

64 

65 - `string`

66 

67 - `"month"`

68 

69 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

70 

71 - `"month"`

72 

73 - `object: "organization.spend_limit"`

74 

75 The object type, which is always `organization.spend_limit`.

76 

77 - `"organization.spend_limit"`

78 

79 - `threshold_amount: number`

80 

81 The hard spend limit amount, in cents.

82 

83### Example

84 

85```http

86curl https://api.openai.com/v1/organization/spend_limit \

87 -H 'Content-Type: application/json' \

88 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

89 -d '{

90 "currency": "USD",

91 "interval": "month",

92 "threshold_amount": 1

93 }'

94```

95 

96#### Response

97 

98```json

99{

100 "currency": "USD",

101 "enforcement": {

102 "status": "inactive"

103 },

104 "interval": "month",

105 "object": "organization.spend_limit",

106 "threshold_amount": 0

107}

108```

109 

110### Example

111 

112```http

113curl -X POST https://api.openai.com/v1/organization/spend_limit \

114 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

115 -H "Content-Type: application/json" \

116 -d '{

117 "threshold_amount": 10000,

118 "currency": "USD",

119 "interval": "month"

120 }'

121```

122 

123#### Response

124 

125```json

126{

127 "object": "organization.spend_limit",

128 "threshold_amount": 10000,

129 "currency": "USD",

130 "interval": "month",

131 "enforcement": {

132 "status": "enforcing"

133 }

134}

135```

Details

32 32 

33 An error object returned when the model fails to generate a Response.33 An error object returned when the model fails to generate a Response.

34 34 

35 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 16 more`35 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 17 more`

36 36 

37 The error code for the response.37 The error code for the response.

38 38 


42 42 

43 - `"invalid_prompt"`43 - `"invalid_prompt"`

44 44 

45 - `"data_residency_mismatch"`

46 

45 - `"bio_policy"`47 - `"bio_policy"`

46 48 

47 - `"vector_store_timeout"`49 - `"vector_store_timeout"`


10474 - `context: optional "auto" or "current_turn" or "all_turns"`10476 - `context: optional "auto" or "current_turn" or "all_turns"`

10475 10477 

10476 Controls which reasoning items are rendered back to the model on later turns.10478 Controls which reasoning items are rendered back to the model on later turns.

10479 If omitted or set to `auto`, the model determines the context mode. The

10480 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

10481 `current_turn`.

10482 

10477 When returned on a response, this is the effective reasoning context mode10483 When returned on a response, this is the effective reasoning context mode

10478 used for the response.10484 used for the response.

10479 10485 


10681 10687 

10682 Constrains the verbosity of the model's response. Lower values will result in10688 Constrains the verbosity of the model's response. Lower values will result in

10683 more concise responses, while higher values will result in more verbose responses.10689 more concise responses, while higher values will result in more verbose responses.

10684 Currently supported values are `low`, `medium`, and `high`.10690 Currently supported values are `low`, `medium`, and `high`. The default is

10691 `medium`.

10685 10692 

10686 - `"low"`10693 - `"low"`

10687 10694 

Details

9934 "usage": {9934 "usage": {

9935 "input_tokens": 139,9935 "input_tokens": 139,

9936 "input_tokens_details": {9936 "input_tokens_details": {

9937 "cached_tokens": 09937 "cached_tokens": 0,

9938 "cache_write_tokens": 0

9938 },9939 },

9939 "output_tokens": 438,9940 "output_tokens": 438,

9940 "output_tokens_details": {9941 "output_tokens_details": {

Details

5244 - `context: optional "auto" or "current_turn" or "all_turns"`5244 - `context: optional "auto" or "current_turn" or "all_turns"`

5245 5245 

5246 Controls which reasoning items are rendered back to the model on later turns.5246 Controls which reasoning items are rendered back to the model on later turns.

5247 If omitted or set to `auto`, the model determines the context mode. The

5248 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

5249 `current_turn`.

5250 

5247 When returned on a response, this is the effective reasoning context mode5251 When returned on a response, this is the effective reasoning context mode

5248 used for the response.5252 used for the response.

5249 5253 


5465 5469 

5466 Constrains the verbosity of the model's response. Lower values will result in5470 Constrains the verbosity of the model's response. Lower values will result in

5467 more concise responses, while higher values will result in more verbose responses.5471 more concise responses, while higher values will result in more verbose responses.

5468 Currently supported values are `low`, `medium`, and `high`.5472 Currently supported values are `low`, `medium`, and `high`. The default is

5473 `medium`.

5469 5474 

5470 - `"low"`5475 - `"low"`

5471 5476 


6704 6709 

6705 An error object returned when the model fails to generate a Response.6710 An error object returned when the model fails to generate a Response.

6706 6711 

6707 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 16 more`6712 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 17 more`

6708 6713 

6709 The error code for the response.6714 The error code for the response.

6710 6715 


6714 6719 

6715 - `"invalid_prompt"`6720 - `"invalid_prompt"`

6716 6721 

6722 - `"data_residency_mismatch"`

6723 

6717 - `"bio_policy"`6724 - `"bio_policy"`

6718 6725 

6719 - `"vector_store_timeout"`6726 - `"vector_store_timeout"`


17146 - `context: optional "auto" or "current_turn" or "all_turns"`17153 - `context: optional "auto" or "current_turn" or "all_turns"`

17147 17154 

17148 Controls which reasoning items are rendered back to the model on later turns.17155 Controls which reasoning items are rendered back to the model on later turns.

17156 If omitted or set to `auto`, the model determines the context mode. The

17157 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

17158 `current_turn`.

17159 

17149 When returned on a response, this is the effective reasoning context mode17160 When returned on a response, this is the effective reasoning context mode

17150 used for the response.17161 used for the response.

17151 17162 


17353 17364 

17354 Constrains the verbosity of the model's response. Lower values will result in17365 Constrains the verbosity of the model's response. Lower values will result in

17355 more concise responses, while higher values will result in more verbose responses.17366 more concise responses, while higher values will result in more verbose responses.

17356 Currently supported values are `low`, `medium`, and `high`.17367 Currently supported values are `low`, `medium`, and `high`. The default is

17368 `medium`.

17357 17369 

17358 - `"low"`17370 - `"low"`

17359 17371 


17678 "usage": {17690 "usage": {

17679 "input_tokens": 36,17691 "input_tokens": 36,

17680 "input_tokens_details": {17692 "input_tokens_details": {

17681 "cached_tokens": 017693 "cached_tokens": 0,

17694 "cache_write_tokens": 0

17682 },17695 },

17683 "output_tokens": 87,17696 "output_tokens": 87,

17684 "output_tokens_details": {17697 "output_tokens_details": {


17763 "usage": {17776 "usage": {

17764 "input_tokens": 328,17777 "input_tokens": 328,

17765 "input_tokens_details": {17778 "input_tokens_details": {

17766 "cached_tokens": 017779 "cached_tokens": 0,

17780 "cache_write_tokens": 0

17767 },17781 },

17768 "output_tokens": 52,17782 "output_tokens": 52,

17769 "output_tokens_details": {17783 "output_tokens_details": {


17854 "usage": {17868 "usage": {

17855 "input_tokens": 8438,17869 "input_tokens": 8438,

17856 "input_tokens_details": {17870 "input_tokens_details": {

17857 "cached_tokens": 017871 "cached_tokens": 0,

17872 "cache_write_tokens": 0

17858 },17873 },

17859 "output_tokens": 398,17874 "output_tokens": 398,

17860 "output_tokens_details": {17875 "output_tokens_details": {


17969 "usage": {17984 "usage": {

17970 "input_tokens": 328,17985 "input_tokens": 328,

17971 "input_tokens_details": {17986 "input_tokens_details": {

17972 "cached_tokens": 017987 "cached_tokens": 0,

17988 "cache_write_tokens": 0

17973 },17989 },

17974 "output_tokens": 356,17990 "output_tokens": 356,

17975 "output_tokens_details": {17991 "output_tokens_details": {


18119 "usage": {18135 "usage": {

18120 "input_tokens": 18307,18136 "input_tokens": 18307,

18121 "input_tokens_details": {18137 "input_tokens_details": {

18122 "cached_tokens": 018138 "cached_tokens": 0,

18139 "cache_write_tokens": 0

18123 },18140 },

18124 "output_tokens": 348,18141 "output_tokens": 348,

18125 "output_tokens_details": {18142 "output_tokens_details": {


18358 "usage": {18375 "usage": {

18359 "input_tokens": 81,18376 "input_tokens": 81,

18360 "input_tokens_details": {18377 "input_tokens_details": {

18361 "cached_tokens": 018378 "cached_tokens": 0,

18379 "cache_write_tokens": 0

18362 },18380 },

18363 "output_tokens": 1035,18381 "output_tokens": 1035,

18364 "output_tokens_details": {18382 "output_tokens_details": {

Details

76 76 

77 An error object returned when the model fails to generate a Response.77 An error object returned when the model fails to generate a Response.

78 78 

79 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 16 more`79 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 17 more`

80 80 

81 The error code for the response.81 The error code for the response.

82 82 


86 86 

87 - `"invalid_prompt"`87 - `"invalid_prompt"`

88 88 

89 - `"data_residency_mismatch"`

90 

89 - `"bio_policy"`91 - `"bio_policy"`

90 92 

91 - `"vector_store_timeout"`93 - `"vector_store_timeout"`


10518 - `context: optional "auto" or "current_turn" or "all_turns"`10520 - `context: optional "auto" or "current_turn" or "all_turns"`

10519 10521 

10520 Controls which reasoning items are rendered back to the model on later turns.10522 Controls which reasoning items are rendered back to the model on later turns.

10523 If omitted or set to `auto`, the model determines the context mode. The

10524 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

10525 `current_turn`.

10526 

10521 When returned on a response, this is the effective reasoning context mode10527 When returned on a response, this is the effective reasoning context mode

10522 used for the response.10528 used for the response.

10523 10529 


10725 10731 

10726 Constrains the verbosity of the model's response. Lower values will result in10732 Constrains the verbosity of the model's response. Lower values will result in

10727 more concise responses, while higher values will result in more verbose responses.10733 more concise responses, while higher values will result in more verbose responses.

10728 Currently supported values are `low`, `medium`, and `high`.10734 Currently supported values are `low`, `medium`, and `high`. The default is

10735 `medium`.

10729 10736 

10730 - `"low"`10737 - `"low"`

10731 10738 


11037 "usage": {11044 "usage": {

11038 "input_tokens": 32,11045 "input_tokens": 32,

11039 "input_tokens_details": {11046 "input_tokens_details": {

11040 "cached_tokens": 011047 "cached_tokens": 0,

11048 "cache_write_tokens": 0

11041 },11049 },

11042 "output_tokens": 18,11050 "output_tokens": 18,

11043 "output_tokens_details": {11051 "output_tokens_details": {

Details

4853 - `context: optional "auto" or "current_turn" or "all_turns"`4853 - `context: optional "auto" or "current_turn" or "all_turns"`

4854 4854 

4855 Controls which reasoning items are rendered back to the model on later turns.4855 Controls which reasoning items are rendered back to the model on later turns.

4856 If omitted or set to `auto`, the model determines the context mode. The

4857 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

4858 `current_turn`.

4859 

4856 When returned on a response, this is the effective reasoning context mode4860 When returned on a response, this is the effective reasoning context mode

4857 used for the response.4861 used for the response.

4858 4862 


5017 5021 

5018 Constrains the verbosity of the model's response. Lower values will result in5022 Constrains the verbosity of the model's response. Lower values will result in

5019 more concise responses, while higher values will result in more verbose responses.5023 more concise responses, while higher values will result in more verbose responses.

5020 Currently supported values are `low`, `medium`, and `high`.5024 Currently supported values are `low`, `medium`, and `high`. The default is

5025 `medium`.

5021 5026 

5022 - `"low"`5027 - `"low"`

5023 5028 

Details

1327 1327 

1328 Constrains the verbosity of the model's response. Lower values will result in1328 Constrains the verbosity of the model's response. Lower values will result in

1329 more concise responses, while higher values will result in more verbose responses.1329 more concise responses, while higher values will result in more verbose responses.

1330 Currently supported values are `low`, `medium`, and `high`.1330 Currently supported values are `low`, `medium`, and `high`. The default is

1331 `medium`.

1331 1332 

1332 - `"low"`1333 - `"low"`

1333 1334 

Details

26 26 

27 An error object returned when the model fails to generate a Response.27 An error object returned when the model fails to generate a Response.

28 28 

29 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 16 more`29 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 17 more`

30 30 

31 The error code for the response.31 The error code for the response.

32 32 


36 36 

37 - `"invalid_prompt"`37 - `"invalid_prompt"`

38 38 

39 - `"data_residency_mismatch"`

40 

39 - `"bio_policy"`41 - `"bio_policy"`

40 42 

41 - `"vector_store_timeout"`43 - `"vector_store_timeout"`


8722 - `context: optional "auto" or "current_turn" or "all_turns"`8724 - `context: optional "auto" or "current_turn" or "all_turns"`

8723 8725 

8724 Controls which reasoning items are rendered back to the model on later turns.8726 Controls which reasoning items are rendered back to the model on later turns.

8727 If omitted or set to `auto`, the model determines the context mode. The

8728 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

8729 `current_turn`.

8730 

8725 When returned on a response, this is the effective reasoning context mode8731 When returned on a response, this is the effective reasoning context mode

8726 used for the response.8732 used for the response.

8727 8733 


8929 8935 

8930 Constrains the verbosity of the model's response. Lower values will result in8936 Constrains the verbosity of the model's response. Lower values will result in

8931 more concise responses, while higher values will result in more verbose responses.8937 more concise responses, while higher values will result in more verbose responses.

8932 Currently supported values are `low`, `medium`, and `high`.8938 Currently supported values are `low`, `medium`, and `high`. The default is

8939 `medium`.

8933 8940 

8934 - `"low"`8941 - `"low"`

8935 8942 

Details

8439 "usage": {8439 "usage": {

8440 "input_tokens": 139,8440 "input_tokens": 139,

8441 "input_tokens_details": {8441 "input_tokens_details": {

8442 "cached_tokens": 08442 "cached_tokens": 0,

8443 "cache_write_tokens": 0

8443 },8444 },

8444 "output_tokens": 438,8445 "output_tokens": 438,

8445 "output_tokens_details": {8446 "output_tokens_details": {

Details

4483 - `context: optional "auto" or "current_turn" or "all_turns"`4483 - `context: optional "auto" or "current_turn" or "all_turns"`

4484 4484 

4485 Controls which reasoning items are rendered back to the model on later turns.4485 Controls which reasoning items are rendered back to the model on later turns.

4486 If omitted or set to `auto`, the model determines the context mode. The

4487 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

4488 `current_turn`.

4489 

4486 When returned on a response, this is the effective reasoning context mode4490 When returned on a response, this is the effective reasoning context mode

4487 used for the response.4491 used for the response.

4488 4492 


4704 4708 

4705 Constrains the verbosity of the model's response. Lower values will result in4709 Constrains the verbosity of the model's response. Lower values will result in

4706 more concise responses, while higher values will result in more verbose responses.4710 more concise responses, while higher values will result in more verbose responses.

4707 Currently supported values are `low`, `medium`, and `high`.4711 Currently supported values are `low`, `medium`, and `high`. The default is

4712 `medium`.

4708 4713 

4709 - `"low"`4714 - `"low"`

4710 4715 


5763 5768 

5764 An error object returned when the model fails to generate a Response.5769 An error object returned when the model fails to generate a Response.

5765 5770 

5766 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 16 more`5771 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 17 more`

5767 5772 

5768 The error code for the response.5773 The error code for the response.

5769 5774 


5773 5778 

5774 - `"invalid_prompt"`5779 - `"invalid_prompt"`

5775 5780 

5781 - `"data_residency_mismatch"`

5782 

5776 - `"bio_policy"`5783 - `"bio_policy"`

5777 5784 

5778 - `"vector_store_timeout"`5785 - `"vector_store_timeout"`


14459 - `context: optional "auto" or "current_turn" or "all_turns"`14466 - `context: optional "auto" or "current_turn" or "all_turns"`

14460 14467 

14461 Controls which reasoning items are rendered back to the model on later turns.14468 Controls which reasoning items are rendered back to the model on later turns.

14469 If omitted or set to `auto`, the model determines the context mode. The

14470 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

14471 `current_turn`.

14472 

14462 When returned on a response, this is the effective reasoning context mode14473 When returned on a response, this is the effective reasoning context mode

14463 used for the response.14474 used for the response.

14464 14475 


14666 14677 

14667 Constrains the verbosity of the model's response. Lower values will result in14678 Constrains the verbosity of the model's response. Lower values will result in

14668 more concise responses, while higher values will result in more verbose responses.14679 more concise responses, while higher values will result in more verbose responses.

14669 Currently supported values are `low`, `medium`, and `high`.14680 Currently supported values are `low`, `medium`, and `high`. The default is

14681 `medium`.

14670 14682 

14671 - `"low"`14683 - `"low"`

14672 14684 


14988 "usage": {15000 "usage": {

14989 "input_tokens": 36,15001 "input_tokens": 36,

14990 "input_tokens_details": {15002 "input_tokens_details": {

14991 "cached_tokens": 015003 "cached_tokens": 0,

15004 "cache_write_tokens": 0

14992 },15005 },

14993 "output_tokens": 87,15006 "output_tokens": 87,

14994 "output_tokens_details": {15007 "output_tokens_details": {


15073 "usage": {15086 "usage": {

15074 "input_tokens": 328,15087 "input_tokens": 328,

15075 "input_tokens_details": {15088 "input_tokens_details": {

15076 "cached_tokens": 015089 "cached_tokens": 0,

15090 "cache_write_tokens": 0

15077 },15091 },

15078 "output_tokens": 52,15092 "output_tokens": 52,

15079 "output_tokens_details": {15093 "output_tokens_details": {


15164 "usage": {15178 "usage": {

15165 "input_tokens": 8438,15179 "input_tokens": 8438,

15166 "input_tokens_details": {15180 "input_tokens_details": {

15167 "cached_tokens": 015181 "cached_tokens": 0,

15182 "cache_write_tokens": 0

15168 },15183 },

15169 "output_tokens": 398,15184 "output_tokens": 398,

15170 "output_tokens_details": {15185 "output_tokens_details": {


15279 "usage": {15294 "usage": {

15280 "input_tokens": 328,15295 "input_tokens": 328,

15281 "input_tokens_details": {15296 "input_tokens_details": {

15282 "cached_tokens": 015297 "cached_tokens": 0,

15298 "cache_write_tokens": 0

15283 },15299 },

15284 "output_tokens": 356,15300 "output_tokens": 356,

15285 "output_tokens_details": {15301 "output_tokens_details": {


15429 "usage": {15445 "usage": {

15430 "input_tokens": 18307,15446 "input_tokens": 18307,

15431 "input_tokens_details": {15447 "input_tokens_details": {

15432 "cached_tokens": 015448 "cached_tokens": 0,

15449 "cache_write_tokens": 0

15433 },15450 },

15434 "output_tokens": 348,15451 "output_tokens": 348,

15435 "output_tokens_details": {15452 "output_tokens_details": {


15668 "usage": {15685 "usage": {

15669 "input_tokens": 81,15686 "input_tokens": 81,

15670 "input_tokens_details": {15687 "input_tokens_details": {

15671 "cached_tokens": 015688 "cached_tokens": 0,

15689 "cache_write_tokens": 0

15672 },15690 },

15673 "output_tokens": 1035,15691 "output_tokens": 1035,

15674 "output_tokens_details": {15692 "output_tokens_details": {

Details

70 70 

71 An error object returned when the model fails to generate a Response.71 An error object returned when the model fails to generate a Response.

72 72 

73 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 16 more`73 - `code: "server_error" or "rate_limit_exceeded" or "invalid_prompt" or 17 more`

74 74 

75 The error code for the response.75 The error code for the response.

76 76 


80 80 

81 - `"invalid_prompt"`81 - `"invalid_prompt"`

82 82 

83 - `"data_residency_mismatch"`

84 

83 - `"bio_policy"`85 - `"bio_policy"`

84 86 

85 - `"vector_store_timeout"`87 - `"vector_store_timeout"`


8766 - `context: optional "auto" or "current_turn" or "all_turns"`8768 - `context: optional "auto" or "current_turn" or "all_turns"`

8767 8769 

8768 Controls which reasoning items are rendered back to the model on later turns.8770 Controls which reasoning items are rendered back to the model on later turns.

8771 If omitted or set to `auto`, the model determines the context mode. The

8772 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

8773 `current_turn`.

8774 

8769 When returned on a response, this is the effective reasoning context mode8775 When returned on a response, this is the effective reasoning context mode

8770 used for the response.8776 used for the response.

8771 8777 


8973 8979 

8974 Constrains the verbosity of the model's response. Lower values will result in8980 Constrains the verbosity of the model's response. Lower values will result in

8975 more concise responses, while higher values will result in more verbose responses.8981 more concise responses, while higher values will result in more verbose responses.

8976 Currently supported values are `low`, `medium`, and `high`.8982 Currently supported values are `low`, `medium`, and `high`. The default is

8983 `medium`.

8977 8984 

8978 - `"low"`8985 - `"low"`

8979 8986 


9282 "usage": {9289 "usage": {

9283 "input_tokens": 32,9290 "input_tokens": 32,

9284 "input_tokens_details": {9291 "input_tokens_details": {

9285 "cached_tokens": 09292 "cached_tokens": 0,

9293 "cache_write_tokens": 0

9286 },9294 },

9287 "output_tokens": 18,9295 "output_tokens": 18,

9288 "output_tokens_details": {9296 "output_tokens_details": {

Details

4108 - `context: optional "auto" or "current_turn" or "all_turns"`4108 - `context: optional "auto" or "current_turn" or "all_turns"`

4109 4109 

4110 Controls which reasoning items are rendered back to the model on later turns.4110 Controls which reasoning items are rendered back to the model on later turns.

4111 If omitted or set to `auto`, the model determines the context mode. The

4112 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

4113 `current_turn`.

4114 

4111 When returned on a response, this is the effective reasoning context mode4115 When returned on a response, this is the effective reasoning context mode

4112 used for the response.4116 used for the response.

4113 4117 


4272 4276 

4273 Constrains the verbosity of the model's response. Lower values will result in4277 Constrains the verbosity of the model's response. Lower values will result in

4274 more concise responses, while higher values will result in more verbose responses.4278 more concise responses, while higher values will result in more verbose responses.

4275 Currently supported values are `low`, `medium`, and `high`.4279 Currently supported values are `low`, `medium`, and `high`. The default is

4280 `medium`.

4276 4281 

4277 - `"low"`4282 - `"low"`

4278 4283 

Details

611 - `context: :auto | :current_turn | :all_turns`611 - `context: :auto | :current_turn | :all_turns`

612 612 

613 Controls which reasoning items are rendered back to the model on later turns.613 Controls which reasoning items are rendered back to the model on later turns.

614 If omitted or set to `auto`, the model determines the context mode. The

615 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

616 `current_turn`.

617 

614 When returned on a response, this is the effective reasoning context mode618 When returned on a response, this is the effective reasoning context mode

615 used for the response.619 used for the response.

616 620 

Details

10 10 

11- `project_id: String`11- `project_id: String`

12 12 

13 The ID of the project.

14 

13- `service_account_id: String`15- `service_account_id: String`

14 16 

17 The ID of the service account.

18 

15- `name: String`19- `name: String`

16 20 

17 API key name.21 API key name.


26 30 

27 - `id: String`31 - `id: String`

28 32 

33 The identifier of the API key.

34 

29 - `created_at: Integer`35 - `created_at: Integer`

30 36 

37 The Unix timestamp (in seconds) when the API key was created.

38 

31 - `name: String`39 - `name: String`

32 40 

41 The name of the API key.

42 

33 - `object: :"organization.project.service_account.api_key"`43 - `object: :"organization.project.service_account.api_key"`

34 44 

35 The object type, which is always `organization.project.service_account.api_key`45 The object type, which is always `organization.project.service_account.api_key`


38 48 

39 - `value: String`49 - `value: String`

40 50 

51 The unredacted API key value.

52 

41### Example53### Example

42 54 

43```ruby55```ruby

Details

1## Delete project spend limit

2 

3`admin.organization.projects.spend_limit.delete(project_id) -> ProjectSpendLimitDeleted`

4 

5**delete** `/organization/projects/{project_id}/spend_limit`

6 

7Delete a project's hard spend limit.

8 

9### Parameters

10 

11- `project_id: String`

12 

13### Returns

14 

15- `class ProjectSpendLimitDeleted`

16 

17 Confirmation payload returned after deleting a project hard spend limit.

18 

19 - `deleted: bool`

20 

21 Whether the hard spend limit was deleted.

22 

23 - `object: :"project.spend_limit.deleted"`

24 

25 The object type, which is always `project.spend_limit.deleted`.

26 

27 - `:"project.spend_limit.deleted"`

28 

29### Example

30 

31```ruby

32require "openai"

33 

34openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")

35 

36project_spend_limit_deleted = openai.admin.organization.projects.spend_limit.delete("proj_123")

37 

38puts(project_spend_limit_deleted)

39```

40 

41#### Response

42 

43```json

44{

45 "deleted": true,

46 "object": "project.spend_limit.deleted"

47}

48```

Details

1## Retrieve project spend limit

2 

3`admin.organization.projects.spend_limit.retrieve(project_id) -> ProjectSpendLimit`

4 

5**get** `/organization/projects/{project_id}/spend_limit`

6 

7Get a project's hard spend limit.

8 

9### Parameters

10 

11- `project_id: String`

12 

13### Returns

14 

15- `class ProjectSpendLimit`

16 

17 Represents a hard spend limit configured at the project level.

18 

19 - `currency: String | :USD`

20 

21 The currency for the threshold amount. Currently, only `USD` is supported.

22 

23 - `String = String`

24 

25 - `Currency = :USD`

26 

27 The currency for the threshold amount. Currently, only `USD` is supported.

28 

29 - `:USD`

30 

31 - `enforcement: Enforcement{ status}`

32 

33 The current enforcement state of the hard spend limit.

34 

35 - `status: String | :inactive | :enforcing`

36 

37 Whether the hard spend limit is currently enforcing.

38 

39 - `String = String`

40 

41 - `Status = :inactive | :enforcing`

42 

43 Whether the hard spend limit is currently enforcing.

44 

45 - `:inactive`

46 

47 - `:enforcing`

48 

49 - `interval: String | :month`

50 

51 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

52 

53 - `String = String`

54 

55 - `Interval = :month`

56 

57 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

58 

59 - `:month`

60 

61 - `object: :"project.spend_limit"`

62 

63 The object type, which is always `project.spend_limit`.

64 

65 - `:"project.spend_limit"`

66 

67 - `threshold_amount: Integer`

68 

69 The hard spend limit amount, in cents.

70 

71### Example

72 

73```ruby

74require "openai"

75 

76openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")

77 

78project_spend_limit = openai.admin.organization.projects.spend_limit.retrieve("proj_123")

79 

80puts(project_spend_limit)

81```

82 

83#### Response

84 

85```json

86{

87 "currency": "USD",

88 "enforcement": {

89 "status": "inactive"

90 },

91 "interval": "month",

92 "object": "project.spend_limit",

93 "threshold_amount": 0

94}

95```

Details

1## Update project spend limit

2 

3`admin.organization.projects.spend_limit.update(project_id, **kwargs) -> ProjectSpendLimit`

4 

5**post** `/organization/projects/{project_id}/spend_limit`

6 

7Create or replace a project's hard spend limit.

8 

9### Parameters

10 

11- `project_id: String`

12 

13- `currency: :USD`

14 

15 The currency for the threshold amount. Currently, only `USD` is supported.

16 

17 - `:USD`

18 

19- `interval: :month`

20 

21 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

22 

23 - `:month`

24 

25- `threshold_amount: Integer`

26 

27 The hard spend limit amount, in cents.

28 

29### Returns

30 

31- `class ProjectSpendLimit`

32 

33 Represents a hard spend limit configured at the project level.

34 

35 - `currency: String | :USD`

36 

37 The currency for the threshold amount. Currently, only `USD` is supported.

38 

39 - `String = String`

40 

41 - `Currency = :USD`

42 

43 The currency for the threshold amount. Currently, only `USD` is supported.

44 

45 - `:USD`

46 

47 - `enforcement: Enforcement{ status}`

48 

49 The current enforcement state of the hard spend limit.

50 

51 - `status: String | :inactive | :enforcing`

52 

53 Whether the hard spend limit is currently enforcing.

54 

55 - `String = String`

56 

57 - `Status = :inactive | :enforcing`

58 

59 Whether the hard spend limit is currently enforcing.

60 

61 - `:inactive`

62 

63 - `:enforcing`

64 

65 - `interval: String | :month`

66 

67 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

68 

69 - `String = String`

70 

71 - `Interval = :month`

72 

73 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

74 

75 - `:month`

76 

77 - `object: :"project.spend_limit"`

78 

79 The object type, which is always `project.spend_limit`.

80 

81 - `:"project.spend_limit"`

82 

83 - `threshold_amount: Integer`

84 

85 The hard spend limit amount, in cents.

86 

87### Example

88 

89```ruby

90require "openai"

91 

92openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")

93 

94project_spend_limit = openai.admin.organization.projects.spend_limit.update(

95 "proj_123",

96 currency: :USD,

97 interval: :month,

98 threshold_amount: 1

99)

100 

101puts(project_spend_limit)

102```

103 

104#### Response

105 

106```json

107{

108 "currency": "USD",

109 "enforcement": {

110 "status": "inactive"

111 },

112 "interval": "month",

113 "object": "project.spend_limit",

114 "threshold_amount": 0

115}

116```

Details

1## Delete organization spend limit

2 

3`admin.organization.spend_limit.delete() -> OrganizationSpendLimitDeleted`

4 

5**delete** `/organization/spend_limit`

6 

7Delete the organization's hard spend limit.

8 

9### Returns

10 

11- `class OrganizationSpendLimitDeleted`

12 

13 Confirmation payload returned after deleting an organization hard spend limit.

14 

15 - `deleted: bool`

16 

17 Whether the hard spend limit was deleted.

18 

19 - `object: :"organization.spend_limit.deleted"`

20 

21 The object type, which is always `organization.spend_limit.deleted`.

22 

23 - `:"organization.spend_limit.deleted"`

24 

25### Example

26 

27```ruby

28require "openai"

29 

30openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")

31 

32organization_spend_limit_deleted = openai.admin.organization.spend_limit.delete

33 

34puts(organization_spend_limit_deleted)

35```

36 

37#### Response

38 

39```json

40{

41 "deleted": true,

42 "object": "organization.spend_limit.deleted"

43}

44```

Details

1## Retrieve organization spend limit

2 

3`admin.organization.spend_limit.retrieve() -> OrganizationSpendLimit`

4 

5**get** `/organization/spend_limit`

6 

7Get the organization's hard spend limit.

8 

9### Returns

10 

11- `class OrganizationSpendLimit`

12 

13 Represents a hard spend limit configured at the organization level.

14 

15 - `currency: String | :USD`

16 

17 The currency for the threshold amount. Currently, only `USD` is supported.

18 

19 - `String = String`

20 

21 - `Currency = :USD`

22 

23 The currency for the threshold amount. Currently, only `USD` is supported.

24 

25 - `:USD`

26 

27 - `enforcement: Enforcement{ status}`

28 

29 The current enforcement state of the hard spend limit.

30 

31 - `status: String | :inactive | :enforcing`

32 

33 Whether the hard spend limit is currently enforcing.

34 

35 - `String = String`

36 

37 - `Status = :inactive | :enforcing`

38 

39 Whether the hard spend limit is currently enforcing.

40 

41 - `:inactive`

42 

43 - `:enforcing`

44 

45 - `interval: String | :month`

46 

47 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

48 

49 - `String = String`

50 

51 - `Interval = :month`

52 

53 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

54 

55 - `:month`

56 

57 - `object: :"organization.spend_limit"`

58 

59 The object type, which is always `organization.spend_limit`.

60 

61 - `:"organization.spend_limit"`

62 

63 - `threshold_amount: Integer`

64 

65 The hard spend limit amount, in cents.

66 

67### Example

68 

69```ruby

70require "openai"

71 

72openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")

73 

74organization_spend_limit = openai.admin.organization.spend_limit.retrieve

75 

76puts(organization_spend_limit)

77```

78 

79#### Response

80 

81```json

82{

83 "currency": "USD",

84 "enforcement": {

85 "status": "inactive"

86 },

87 "interval": "month",

88 "object": "organization.spend_limit",

89 "threshold_amount": 0

90}

91```

Details

1## Update organization spend limit

2 

3`admin.organization.spend_limit.update(**kwargs) -> OrganizationSpendLimit`

4 

5**post** `/organization/spend_limit`

6 

7Create or replace the organization's hard spend limit.

8 

9### Parameters

10 

11- `currency: :USD`

12 

13 The currency for the threshold amount. Currently, only `USD` is supported.

14 

15 - `:USD`

16 

17- `interval: :month`

18 

19 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

20 

21 - `:month`

22 

23- `threshold_amount: Integer`

24 

25 The hard spend limit amount, in cents.

26 

27### Returns

28 

29- `class OrganizationSpendLimit`

30 

31 Represents a hard spend limit configured at the organization level.

32 

33 - `currency: String | :USD`

34 

35 The currency for the threshold amount. Currently, only `USD` is supported.

36 

37 - `String = String`

38 

39 - `Currency = :USD`

40 

41 The currency for the threshold amount. Currently, only `USD` is supported.

42 

43 - `:USD`

44 

45 - `enforcement: Enforcement{ status}`

46 

47 The current enforcement state of the hard spend limit.

48 

49 - `status: String | :inactive | :enforcing`

50 

51 Whether the hard spend limit is currently enforcing.

52 

53 - `String = String`

54 

55 - `Status = :inactive | :enforcing`

56 

57 Whether the hard spend limit is currently enforcing.

58 

59 - `:inactive`

60 

61 - `:enforcing`

62 

63 - `interval: String | :month`

64 

65 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

66 

67 - `String = String`

68 

69 - `Interval = :month`

70 

71 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

72 

73 - `:month`

74 

75 - `object: :"organization.spend_limit"`

76 

77 The object type, which is always `organization.spend_limit`.

78 

79 - `:"organization.spend_limit"`

80 

81 - `threshold_amount: Integer`

82 

83 The hard spend limit amount, in cents.

84 

85### Example

86 

87```ruby

88require "openai"

89 

90openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")

91 

92organization_spend_limit = openai.admin.organization.spend_limit.update(currency: :USD, interval: :month, threshold_amount: 1)

93 

94puts(organization_spend_limit)

95```

96 

97#### Response

98 

99```json

100{

101 "currency": "USD",

102 "enforcement": {

103 "status": "inactive"

104 },

105 "interval": "month",

106 "object": "organization.spend_limit",

107 "threshold_amount": 0

108}

109```

Details

32 32 

33 An error object returned when the model fails to generate a Response.33 An error object returned when the model fails to generate a Response.

34 34 

35 - `code: :server_error | :rate_limit_exceeded | :invalid_prompt | 16 more`35 - `code: :server_error | :rate_limit_exceeded | :invalid_prompt | 17 more`

36 36 

37 The error code for the response.37 The error code for the response.

38 38 


42 42 

43 - `:invalid_prompt`43 - `:invalid_prompt`

44 44 

45 - `:data_residency_mismatch`

46 

45 - `:bio_policy`47 - `:bio_policy`

46 48 

47 - `:vector_store_timeout`49 - `:vector_store_timeout`


6175 - `context: :auto | :current_turn | :all_turns`6177 - `context: :auto | :current_turn | :all_turns`

6176 6178 

6177 Controls which reasoning items are rendered back to the model on later turns.6179 Controls which reasoning items are rendered back to the model on later turns.

6180 If omitted or set to `auto`, the model determines the context mode. The

6181 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

6182 `current_turn`.

6183 

6178 When returned on a response, this is the effective reasoning context mode6184 When returned on a response, this is the effective reasoning context mode

6179 used for the response.6185 used for the response.

6180 6186 


6382 6388 

6383 Constrains the verbosity of the model's response. Lower values will result in6389 Constrains the verbosity of the model's response. Lower values will result in

6384 more concise responses, while higher values will result in more verbose responses.6390 more concise responses, while higher values will result in more verbose responses.

6385 Currently supported values are `low`, `medium`, and `high`.6391 Currently supported values are `low`, `medium`, and `high`. The default is

6392 `medium`.

6386 6393 

6387 - `:low`6394 - `:low`

6388 6395 

Details

4270 - `context: :auto | :current_turn | :all_turns`4270 - `context: :auto | :current_turn | :all_turns`

4271 4271 

4272 Controls which reasoning items are rendered back to the model on later turns.4272 Controls which reasoning items are rendered back to the model on later turns.

4273 If omitted or set to `auto`, the model determines the context mode. The

4274 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

4275 `current_turn`.

4276 

4273 When returned on a response, this is the effective reasoning context mode4277 When returned on a response, this is the effective reasoning context mode

4274 used for the response.4278 used for the response.

4275 4279 


4491 4495 

4492 Constrains the verbosity of the model's response. Lower values will result in4496 Constrains the verbosity of the model's response. Lower values will result in

4493 more concise responses, while higher values will result in more verbose responses.4497 more concise responses, while higher values will result in more verbose responses.

4494 Currently supported values are `low`, `medium`, and `high`.4498 Currently supported values are `low`, `medium`, and `high`. The default is

4499 `medium`.

4495 4500 

4496 - `:low`4501 - `:low`

4497 4502 


4809 4814 

4810 An error object returned when the model fails to generate a Response.4815 An error object returned when the model fails to generate a Response.

4811 4816 

4812 - `code: :server_error | :rate_limit_exceeded | :invalid_prompt | 16 more`4817 - `code: :server_error | :rate_limit_exceeded | :invalid_prompt | 17 more`

4813 4818 

4814 The error code for the response.4819 The error code for the response.

4815 4820 


4819 4824 

4820 - `:invalid_prompt`4825 - `:invalid_prompt`

4821 4826 

4827 - `:data_residency_mismatch`

4828 

4822 - `:bio_policy`4829 - `:bio_policy`

4823 4830 

4824 - `:vector_store_timeout`4831 - `:vector_store_timeout`


10952 - `context: :auto | :current_turn | :all_turns`10959 - `context: :auto | :current_turn | :all_turns`

10953 10960 

10954 Controls which reasoning items are rendered back to the model on later turns.10961 Controls which reasoning items are rendered back to the model on later turns.

10962 If omitted or set to `auto`, the model determines the context mode. The

10963 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

10964 `current_turn`.

10965 

10955 When returned on a response, this is the effective reasoning context mode10966 When returned on a response, this is the effective reasoning context mode

10956 used for the response.10967 used for the response.

10957 10968 


11159 11170 

11160 Constrains the verbosity of the model's response. Lower values will result in11171 Constrains the verbosity of the model's response. Lower values will result in

11161 more concise responses, while higher values will result in more verbose responses.11172 more concise responses, while higher values will result in more verbose responses.

11162 Currently supported values are `low`, `medium`, and `high`.11173 Currently supported values are `low`, `medium`, and `high`. The default is

11174 `medium`.

11163 11175 

11164 - `:low`11176 - `:low`

11165 11177 

Details

72 72 

73 An error object returned when the model fails to generate a Response.73 An error object returned when the model fails to generate a Response.

74 74 

75 - `code: :server_error | :rate_limit_exceeded | :invalid_prompt | 16 more`75 - `code: :server_error | :rate_limit_exceeded | :invalid_prompt | 17 more`

76 76 

77 The error code for the response.77 The error code for the response.

78 78 


82 82 

83 - `:invalid_prompt`83 - `:invalid_prompt`

84 84 

85 - `:data_residency_mismatch`

86 

85 - `:bio_policy`87 - `:bio_policy`

86 88 

87 - `:vector_store_timeout`89 - `:vector_store_timeout`


6215 - `context: :auto | :current_turn | :all_turns`6217 - `context: :auto | :current_turn | :all_turns`

6216 6218 

6217 Controls which reasoning items are rendered back to the model on later turns.6219 Controls which reasoning items are rendered back to the model on later turns.

6220 If omitted or set to `auto`, the model determines the context mode. The

6221 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

6222 `current_turn`.

6223 

6218 When returned on a response, this is the effective reasoning context mode6224 When returned on a response, this is the effective reasoning context mode

6219 used for the response.6225 used for the response.

6220 6226 


6422 6428 

6423 Constrains the verbosity of the model's response. Lower values will result in6429 Constrains the verbosity of the model's response. Lower values will result in

6424 more concise responses, while higher values will result in more verbose responses.6430 more concise responses, while higher values will result in more verbose responses.

6425 Currently supported values are `low`, `medium`, and `high`.6431 Currently supported values are `low`, `medium`, and `high`. The default is

6432 `medium`.

6426 6433 

6427 - `:low`6434 - `:low`

6428 6435 

Details

3879 - `context: :auto | :current_turn | :all_turns`3879 - `context: :auto | :current_turn | :all_turns`

3880 3880 

3881 Controls which reasoning items are rendered back to the model on later turns.3881 Controls which reasoning items are rendered back to the model on later turns.

3882 If omitted or set to `auto`, the model determines the context mode. The

3883 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

3884 `current_turn`.

3885 

3882 When returned on a response, this is the effective reasoning context mode3886 When returned on a response, this is the effective reasoning context mode

3883 used for the response.3887 used for the response.

3884 3888 


4043 4047 

4044 Constrains the verbosity of the model's response. Lower values will result in4048 Constrains the verbosity of the model's response. Lower values will result in

4045 more concise responses, while higher values will result in more verbose responses.4049 more concise responses, while higher values will result in more verbose responses.

4046 Currently supported values are `low`, `medium`, and `high`.4050 Currently supported values are `low`, `medium`, and `high`. The default is

4051 `medium`.

4047 4052 

4048 - `:low`4053 - `:low`

4049 4054 

Details

1324 1324 

1325 Constrains the verbosity of the model's response. Lower values will result in1325 Constrains the verbosity of the model's response. Lower values will result in

1326 more concise responses, while higher values will result in more verbose responses.1326 more concise responses, while higher values will result in more verbose responses.

1327 Currently supported values are `low`, `medium`, and `high`.1327 Currently supported values are `low`, `medium`, and `high`. The default is

1328 `medium`.

1328 1329 

1329 - `:low`1330 - `:low`

1330 1331 

Details

28 28 

29 An error object returned when the model fails to generate a Response.29 An error object returned when the model fails to generate a Response.

30 30 

31 - `code: :server_error | :rate_limit_exceeded | :invalid_prompt | 16 more`31 - `code: :server_error | :rate_limit_exceeded | :invalid_prompt | 17 more`

32 32 

33 The error code for the response.33 The error code for the response.

34 34 


38 38 

39 - `:invalid_prompt`39 - `:invalid_prompt`

40 40 

41 - `:data_residency_mismatch`

42 

41 - `:bio_policy`43 - `:bio_policy`

42 44 

43 - `:vector_store_timeout`45 - `:vector_store_timeout`


5398 - `context: :auto | :current_turn | :all_turns`5400 - `context: :auto | :current_turn | :all_turns`

5399 5401 

5400 Controls which reasoning items are rendered back to the model on later turns.5402 Controls which reasoning items are rendered back to the model on later turns.

5403 If omitted or set to `auto`, the model determines the context mode. The

5404 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

5405 `current_turn`.

5406 

5401 When returned on a response, this is the effective reasoning context mode5407 When returned on a response, this is the effective reasoning context mode

5402 used for the response.5408 used for the response.

5403 5409 


5605 5611 

5606 Constrains the verbosity of the model's response. Lower values will result in5612 Constrains the verbosity of the model's response. Lower values will result in

5607 more concise responses, while higher values will result in more verbose responses.5613 more concise responses, while higher values will result in more verbose responses.

5608 Currently supported values are `low`, `medium`, and `high`.5614 Currently supported values are `low`, `medium`, and `high`. The default is

5615 `medium`.

5609 5616 

5610 - `:low`5617 - `:low`

5611 5618 

Details

3882 - `context: :auto | :current_turn | :all_turns`3882 - `context: :auto | :current_turn | :all_turns`

3883 3883 

3884 Controls which reasoning items are rendered back to the model on later turns.3884 Controls which reasoning items are rendered back to the model on later turns.

3885 If omitted or set to `auto`, the model determines the context mode. The

3886 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

3887 `current_turn`.

3888 

3885 When returned on a response, this is the effective reasoning context mode3889 When returned on a response, this is the effective reasoning context mode

3886 used for the response.3890 used for the response.

3887 3891 


4103 4107 

4104 Constrains the verbosity of the model's response. Lower values will result in4108 Constrains the verbosity of the model's response. Lower values will result in

4105 more concise responses, while higher values will result in more verbose responses.4109 more concise responses, while higher values will result in more verbose responses.

4106 Currently supported values are `low`, `medium`, and `high`.4110 Currently supported values are `low`, `medium`, and `high`. The default is

4111 `medium`.

4107 4112 

4108 - `:low`4113 - `:low`

4109 4114 


4417 4422 

4418 An error object returned when the model fails to generate a Response.4423 An error object returned when the model fails to generate a Response.

4419 4424 

4420 - `code: :server_error | :rate_limit_exceeded | :invalid_prompt | 16 more`4425 - `code: :server_error | :rate_limit_exceeded | :invalid_prompt | 17 more`

4421 4426 

4422 The error code for the response.4427 The error code for the response.

4423 4428 


4427 4432 

4428 - `:invalid_prompt`4433 - `:invalid_prompt`

4429 4434 

4435 - `:data_residency_mismatch`

4436 

4430 - `:bio_policy`4437 - `:bio_policy`

4431 4438 

4432 - `:vector_store_timeout`4439 - `:vector_store_timeout`


9787 - `context: :auto | :current_turn | :all_turns`9794 - `context: :auto | :current_turn | :all_turns`

9788 9795 

9789 Controls which reasoning items are rendered back to the model on later turns.9796 Controls which reasoning items are rendered back to the model on later turns.

9797 If omitted or set to `auto`, the model determines the context mode. The

9798 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

9799 `current_turn`.

9800 

9790 When returned on a response, this is the effective reasoning context mode9801 When returned on a response, this is the effective reasoning context mode

9791 used for the response.9802 used for the response.

9792 9803 


9994 10005 

9995 Constrains the verbosity of the model's response. Lower values will result in10006 Constrains the verbosity of the model's response. Lower values will result in

9996 more concise responses, while higher values will result in more verbose responses.10007 more concise responses, while higher values will result in more verbose responses.

9997 Currently supported values are `low`, `medium`, and `high`.10008 Currently supported values are `low`, `medium`, and `high`. The default is

10009 `medium`.

9998 10010 

9999 - `:low`10011 - `:low`

10000 10012 

Details

68 68 

69 An error object returned when the model fails to generate a Response.69 An error object returned when the model fails to generate a Response.

70 70 

71 - `code: :server_error | :rate_limit_exceeded | :invalid_prompt | 16 more`71 - `code: :server_error | :rate_limit_exceeded | :invalid_prompt | 17 more`

72 72 

73 The error code for the response.73 The error code for the response.

74 74 


78 78 

79 - `:invalid_prompt`79 - `:invalid_prompt`

80 80 

81 - `:data_residency_mismatch`

82 

81 - `:bio_policy`83 - `:bio_policy`

82 84 

83 - `:vector_store_timeout`85 - `:vector_store_timeout`


5438 - `context: :auto | :current_turn | :all_turns`5440 - `context: :auto | :current_turn | :all_turns`

5439 5441 

5440 Controls which reasoning items are rendered back to the model on later turns.5442 Controls which reasoning items are rendered back to the model on later turns.

5443 If omitted or set to `auto`, the model determines the context mode. The

5444 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

5445 `current_turn`.

5446 

5441 When returned on a response, this is the effective reasoning context mode5447 When returned on a response, this is the effective reasoning context mode

5442 used for the response.5448 used for the response.

5443 5449 


5645 5651 

5646 Constrains the verbosity of the model's response. Lower values will result in5652 Constrains the verbosity of the model's response. Lower values will result in

5647 more concise responses, while higher values will result in more verbose responses.5653 more concise responses, while higher values will result in more verbose responses.

5648 Currently supported values are `low`, `medium`, and `high`.5654 Currently supported values are `low`, `medium`, and `high`. The default is

5655 `medium`.

5649 5656 

5650 - `:low`5657 - `:low`

5651 5658 

Details

3507 - `context: :auto | :current_turn | :all_turns`3507 - `context: :auto | :current_turn | :all_turns`

3508 3508 

3509 Controls which reasoning items are rendered back to the model on later turns.3509 Controls which reasoning items are rendered back to the model on later turns.

3510 If omitted or set to `auto`, the model determines the context mode. The

3511 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

3512 `current_turn`.

3513 

3510 When returned on a response, this is the effective reasoning context mode3514 When returned on a response, this is the effective reasoning context mode

3511 used for the response.3515 used for the response.

3512 3516 


3671 3675 

3672 Constrains the verbosity of the model's response. Lower values will result in3676 Constrains the verbosity of the model's response. Lower values will result in

3673 more concise responses, while higher values will result in more verbose responses.3677 more concise responses, while higher values will result in more verbose responses.

3674 Currently supported values are `low`, `medium`, and `high`.3678 Currently supported values are `low`, `medium`, and `high`. The default is

3679 `medium`.

3675 3680 

3676 - `:low`3681 - `:low`

3677 3682 

Details

611 - `context?: "auto" | "current_turn" | "all_turns" | null`611 - `context?: "auto" | "current_turn" | "all_turns" | null`

612 612 

613 Controls which reasoning items are rendered back to the model on later turns.613 Controls which reasoning items are rendered back to the model on later turns.

614 If omitted or set to `auto`, the model determines the context mode. The

615 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

616 `current_turn`.

617 

614 When returned on a response, this is the effective reasoning context mode618 When returned on a response, this is the effective reasoning context mode

615 used for the response.619 used for the response.

616 620 

Details

10 10 

11- `serviceAccountID: string`11- `serviceAccountID: string`

12 12 

13 The ID of the service account.

14 

13- `params: APIKeyCreateParams`15- `params: APIKeyCreateParams`

14 16 

15 - `project_id: string`17 - `project_id: string`


30 32 

31 - `id: string`33 - `id: string`

32 34 

35 The identifier of the API key.

36 

33 - `created_at: number`37 - `created_at: number`

34 38 

39 The Unix timestamp (in seconds) when the API key was created.

40 

35 - `name: string`41 - `name: string`

36 42 

43 The name of the API key.

44 

37 - `object: "organization.project.service_account.api_key"`45 - `object: "organization.project.service_account.api_key"`

38 46 

39 The object type, which is always `organization.project.service_account.api_key`47 The object type, which is always `organization.project.service_account.api_key`


42 50 

43 - `value: string`51 - `value: string`

44 52 

53 The unredacted API key value.

54 

45### Example55### Example

46 56 

47```typescript57```typescript

Details

1## Delete project spend limit

2 

3`client.admin.organization.projects.spendLimit.delete(stringprojectID, RequestOptionsoptions?): ProjectSpendLimitDeleted`

4 

5**delete** `/organization/projects/{project_id}/spend_limit`

6 

7Delete a project's hard spend limit.

8 

9### Parameters

10 

11- `projectID: string`

12 

13### Returns

14 

15- `ProjectSpendLimitDeleted`

16 

17 Confirmation payload returned after deleting a project hard spend limit.

18 

19 - `deleted: boolean`

20 

21 Whether the hard spend limit was deleted.

22 

23 - `object: "project.spend_limit.deleted"`

24 

25 The object type, which is always `project.spend_limit.deleted`.

26 

27 - `"project.spend_limit.deleted"`

28 

29### Example

30 

31```typescript

32import OpenAI from 'openai';

33 

34const client = new OpenAI({

35 adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted

36});

37 

38const projectSpendLimitDeleted = await client.admin.organization.projects.spendLimit.delete(

39 'proj_123',

40);

41 

42console.log(projectSpendLimitDeleted.deleted);

43```

44 

45#### Response

46 

47```json

48{

49 "deleted": true,

50 "object": "project.spend_limit.deleted"

51}

52```

Details

1## Retrieve project spend limit

2 

3`client.admin.organization.projects.spendLimit.retrieve(stringprojectID, RequestOptionsoptions?): ProjectSpendLimit`

4 

5**get** `/organization/projects/{project_id}/spend_limit`

6 

7Get a project's hard spend limit.

8 

9### Parameters

10 

11- `projectID: string`

12 

13### Returns

14 

15- `ProjectSpendLimit`

16 

17 Represents a hard spend limit configured at the project level.

18 

19 - `currency: (string & {}) | "USD"`

20 

21 The currency for the threshold amount. Currently, only `USD` is supported.

22 

23 - `(string & {})`

24 

25 - `"USD"`

26 

27 - `"USD"`

28 

29 - `enforcement: Enforcement`

30 

31 The current enforcement state of the hard spend limit.

32 

33 - `status: (string & {}) | "inactive" | "enforcing"`

34 

35 Whether the hard spend limit is currently enforcing.

36 

37 - `(string & {})`

38 

39 - `"inactive" | "enforcing"`

40 

41 - `"inactive"`

42 

43 - `"enforcing"`

44 

45 - `interval: (string & {}) | "month"`

46 

47 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

48 

49 - `(string & {})`

50 

51 - `"month"`

52 

53 - `"month"`

54 

55 - `object: "project.spend_limit"`

56 

57 The object type, which is always `project.spend_limit`.

58 

59 - `"project.spend_limit"`

60 

61 - `threshold_amount: number`

62 

63 The hard spend limit amount, in cents.

64 

65### Example

66 

67```typescript

68import OpenAI from 'openai';

69 

70const client = new OpenAI({

71 adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted

72});

73 

74const projectSpendLimit = await client.admin.organization.projects.spendLimit.retrieve('proj_123');

75 

76console.log(projectSpendLimit.currency);

77```

78 

79#### Response

80 

81```json

82{

83 "currency": "USD",

84 "enforcement": {

85 "status": "inactive"

86 },

87 "interval": "month",

88 "object": "project.spend_limit",

89 "threshold_amount": 0

90}

91```

Details

1## Update project spend limit

2 

3`client.admin.organization.projects.spendLimit.update(stringprojectID, SpendLimitUpdateParamsbody, RequestOptionsoptions?): ProjectSpendLimit`

4 

5**post** `/organization/projects/{project_id}/spend_limit`

6 

7Create or replace a project's hard spend limit.

8 

9### Parameters

10 

11- `projectID: string`

12 

13- `body: SpendLimitUpdateParams`

14 

15 - `currency: "USD"`

16 

17 The currency for the threshold amount. Currently, only `USD` is supported.

18 

19 - `"USD"`

20 

21 - `interval: "month"`

22 

23 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

24 

25 - `"month"`

26 

27 - `threshold_amount: number`

28 

29 The hard spend limit amount, in cents.

30 

31### Returns

32 

33- `ProjectSpendLimit`

34 

35 Represents a hard spend limit configured at the project level.

36 

37 - `currency: (string & {}) | "USD"`

38 

39 The currency for the threshold amount. Currently, only `USD` is supported.

40 

41 - `(string & {})`

42 

43 - `"USD"`

44 

45 - `"USD"`

46 

47 - `enforcement: Enforcement`

48 

49 The current enforcement state of the hard spend limit.

50 

51 - `status: (string & {}) | "inactive" | "enforcing"`

52 

53 Whether the hard spend limit is currently enforcing.

54 

55 - `(string & {})`

56 

57 - `"inactive" | "enforcing"`

58 

59 - `"inactive"`

60 

61 - `"enforcing"`

62 

63 - `interval: (string & {}) | "month"`

64 

65 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

66 

67 - `(string & {})`

68 

69 - `"month"`

70 

71 - `"month"`

72 

73 - `object: "project.spend_limit"`

74 

75 The object type, which is always `project.spend_limit`.

76 

77 - `"project.spend_limit"`

78 

79 - `threshold_amount: number`

80 

81 The hard spend limit amount, in cents.

82 

83### Example

84 

85```typescript

86import OpenAI from 'openai';

87 

88const client = new OpenAI({

89 adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted

90});

91 

92const projectSpendLimit = await client.admin.organization.projects.spendLimit.update('proj_123', {

93 currency: 'USD',

94 interval: 'month',

95 threshold_amount: 1,

96});

97 

98console.log(projectSpendLimit.currency);

99```

100 

101#### Response

102 

103```json

104{

105 "currency": "USD",

106 "enforcement": {

107 "status": "inactive"

108 },

109 "interval": "month",

110 "object": "project.spend_limit",

111 "threshold_amount": 0

112}

113```

Details

1## Delete organization spend limit

2 

3`client.admin.organization.spendLimit.delete(RequestOptionsoptions?): OrganizationSpendLimitDeleted`

4 

5**delete** `/organization/spend_limit`

6 

7Delete the organization's hard spend limit.

8 

9### Returns

10 

11- `OrganizationSpendLimitDeleted`

12 

13 Confirmation payload returned after deleting an organization hard spend limit.

14 

15 - `deleted: boolean`

16 

17 Whether the hard spend limit was deleted.

18 

19 - `object: "organization.spend_limit.deleted"`

20 

21 The object type, which is always `organization.spend_limit.deleted`.

22 

23 - `"organization.spend_limit.deleted"`

24 

25### Example

26 

27```typescript

28import OpenAI from 'openai';

29 

30const client = new OpenAI({

31 adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted

32});

33 

34const organizationSpendLimitDeleted = await client.admin.organization.spendLimit.delete();

35 

36console.log(organizationSpendLimitDeleted.deleted);

37```

38 

39#### Response

40 

41```json

42{

43 "deleted": true,

44 "object": "organization.spend_limit.deleted"

45}

46```

Details

1## Retrieve organization spend limit

2 

3`client.admin.organization.spendLimit.retrieve(RequestOptionsoptions?): OrganizationSpendLimit`

4 

5**get** `/organization/spend_limit`

6 

7Get the organization's hard spend limit.

8 

9### Returns

10 

11- `OrganizationSpendLimit`

12 

13 Represents a hard spend limit configured at the organization level.

14 

15 - `currency: (string & {}) | "USD"`

16 

17 The currency for the threshold amount. Currently, only `USD` is supported.

18 

19 - `(string & {})`

20 

21 - `"USD"`

22 

23 - `"USD"`

24 

25 - `enforcement: Enforcement`

26 

27 The current enforcement state of the hard spend limit.

28 

29 - `status: (string & {}) | "inactive" | "enforcing"`

30 

31 Whether the hard spend limit is currently enforcing.

32 

33 - `(string & {})`

34 

35 - `"inactive" | "enforcing"`

36 

37 - `"inactive"`

38 

39 - `"enforcing"`

40 

41 - `interval: (string & {}) | "month"`

42 

43 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

44 

45 - `(string & {})`

46 

47 - `"month"`

48 

49 - `"month"`

50 

51 - `object: "organization.spend_limit"`

52 

53 The object type, which is always `organization.spend_limit`.

54 

55 - `"organization.spend_limit"`

56 

57 - `threshold_amount: number`

58 

59 The hard spend limit amount, in cents.

60 

61### Example

62 

63```typescript

64import OpenAI from 'openai';

65 

66const client = new OpenAI({

67 adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted

68});

69 

70const organizationSpendLimit = await client.admin.organization.spendLimit.retrieve();

71 

72console.log(organizationSpendLimit.currency);

73```

74 

75#### Response

76 

77```json

78{

79 "currency": "USD",

80 "enforcement": {

81 "status": "inactive"

82 },

83 "interval": "month",

84 "object": "organization.spend_limit",

85 "threshold_amount": 0

86}

87```

Details

1## Update organization spend limit

2 

3`client.admin.organization.spendLimit.update(SpendLimitUpdateParamsbody, RequestOptionsoptions?): OrganizationSpendLimit`

4 

5**post** `/organization/spend_limit`

6 

7Create or replace the organization's hard spend limit.

8 

9### Parameters

10 

11- `body: SpendLimitUpdateParams`

12 

13 - `currency: "USD"`

14 

15 The currency for the threshold amount. Currently, only `USD` is supported.

16 

17 - `"USD"`

18 

19 - `interval: "month"`

20 

21 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

22 

23 - `"month"`

24 

25 - `threshold_amount: number`

26 

27 The hard spend limit amount, in cents.

28 

29### Returns

30 

31- `OrganizationSpendLimit`

32 

33 Represents a hard spend limit configured at the organization level.

34 

35 - `currency: (string & {}) | "USD"`

36 

37 The currency for the threshold amount. Currently, only `USD` is supported.

38 

39 - `(string & {})`

40 

41 - `"USD"`

42 

43 - `"USD"`

44 

45 - `enforcement: Enforcement`

46 

47 The current enforcement state of the hard spend limit.

48 

49 - `status: (string & {}) | "inactive" | "enforcing"`

50 

51 Whether the hard spend limit is currently enforcing.

52 

53 - `(string & {})`

54 

55 - `"inactive" | "enforcing"`

56 

57 - `"inactive"`

58 

59 - `"enforcing"`

60 

61 - `interval: (string & {}) | "month"`

62 

63 The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

64 

65 - `(string & {})`

66 

67 - `"month"`

68 

69 - `"month"`

70 

71 - `object: "organization.spend_limit"`

72 

73 The object type, which is always `organization.spend_limit`.

74 

75 - `"organization.spend_limit"`

76 

77 - `threshold_amount: number`

78 

79 The hard spend limit amount, in cents.

80 

81### Example

82 

83```typescript

84import OpenAI from 'openai';

85 

86const client = new OpenAI({

87 adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted

88});

89 

90const organizationSpendLimit = await client.admin.organization.spendLimit.update({

91 currency: 'USD',

92 interval: 'month',

93 threshold_amount: 1,

94});

95 

96console.log(organizationSpendLimit.currency);

97```

98 

99#### Response

100 

101```json

102{

103 "currency": "USD",

104 "enforcement": {

105 "status": "inactive"

106 },

107 "interval": "month",

108 "object": "organization.spend_limit",

109 "threshold_amount": 0

110}

111```

Details

36 36 

37 An error object returned when the model fails to generate a Response.37 An error object returned when the model fails to generate a Response.

38 38 

39 - `code: "server_error" | "rate_limit_exceeded" | "invalid_prompt" | 16 more`39 - `code: "server_error" | "rate_limit_exceeded" | "invalid_prompt" | 17 more`

40 40 

41 The error code for the response.41 The error code for the response.

42 42 


46 46 

47 - `"invalid_prompt"`47 - `"invalid_prompt"`

48 48 

49 - `"data_residency_mismatch"`

50 

49 - `"bio_policy"`51 - `"bio_policy"`

50 52 

51 - `"vector_store_timeout"`53 - `"vector_store_timeout"`


6093 6095 

6094 Optional version of the prompt template.6096 Optional version of the prompt template.

6095 6097 

6096 - `prompt_cache_key?: string`6098 - `prompt_cache_key?: string | null`

6097 6099 

6098 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).6100 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

6099 6101 


6144 - `context?: "auto" | "current_turn" | "all_turns" | null`6146 - `context?: "auto" | "current_turn" | "all_turns" | null`

6145 6147 

6146 Controls which reasoning items are rendered back to the model on later turns.6148 Controls which reasoning items are rendered back to the model on later turns.

6149 If omitted or set to `auto`, the model determines the context mode. The

6150 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

6151 `current_turn`.

6152 

6147 When returned on a response, this is the effective reasoning context mode6153 When returned on a response, this is the effective reasoning context mode

6148 used for the response.6154 used for the response.

6149 6155 


6219 6225 

6220 - `"detailed"`6226 - `"detailed"`

6221 6227 

6222 - `safety_identifier?: string`6228 - `safety_identifier?: string | null`

6223 6229 

6224 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.6230 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.

6225 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).6231 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).


6347 6353 

6348 Constrains the verbosity of the model's response. Lower values will result in6354 Constrains the verbosity of the model's response. Lower values will result in

6349 more concise responses, while higher values will result in more verbose responses.6355 more concise responses, while higher values will result in more verbose responses.

6350 Currently supported values are `low`, `medium`, and `high`.6356 Currently supported values are `low`, `medium`, and `high`. The default is

6357 `medium`.

6351 6358 

6352 - `"low"`6359 - `"low"`

6353 6360 

Details

7821 "usage": {7821 "usage": {

7822 "input_tokens": 139,7822 "input_tokens": 139,

7823 "input_tokens_details": {7823 "input_tokens_details": {

7824 "cached_tokens": 07824 "cached_tokens": 0,

7825 "cache_write_tokens": 0

7825 },7826 },

7826 "output_tokens": 438,7827 "output_tokens": 438,

7827 "output_tokens_details": {7828 "output_tokens_details": {

Details

4193 4193 

4194 Optional version of the prompt template.4194 Optional version of the prompt template.

4195 4195 

4196 - `prompt_cache_key?: string`4196 - `prompt_cache_key?: string | null`

4197 4197 

4198 Body param: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).4198 Body param: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

4199 4199 


4244 - `context?: "auto" | "current_turn" | "all_turns" | null`4244 - `context?: "auto" | "current_turn" | "all_turns" | null`

4245 4245 

4246 Controls which reasoning items are rendered back to the model on later turns.4246 Controls which reasoning items are rendered back to the model on later turns.

4247 If omitted or set to `auto`, the model determines the context mode. The

4248 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

4249 `current_turn`.

4250 

4247 When returned on a response, this is the effective reasoning context mode4251 When returned on a response, this is the effective reasoning context mode

4248 used for the response.4252 used for the response.

4249 4253 


4319 4323 

4320 - `"detailed"`4324 - `"detailed"`

4321 4325 

4322 - `safety_identifier?: string`4326 - `safety_identifier?: string | null`

4323 4327 

4324 Body param: A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.4328 Body param: A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.

4325 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).4329 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).


4463 4467 

4464 Constrains the verbosity of the model's response. Lower values will result in4468 Constrains the verbosity of the model's response. Lower values will result in

4465 more concise responses, while higher values will result in more verbose responses.4469 more concise responses, while higher values will result in more verbose responses.

4466 Currently supported values are `low`, `medium`, and `high`.4470 Currently supported values are `low`, `medium`, and `high`. The default is

4471 `medium`.

4467 4472 

4468 - `"low"`4473 - `"low"`

4469 4474 


4803 4808 

4804 An error object returned when the model fails to generate a Response.4809 An error object returned when the model fails to generate a Response.

4805 4810 

4806 - `code: "server_error" | "rate_limit_exceeded" | "invalid_prompt" | 16 more`4811 - `code: "server_error" | "rate_limit_exceeded" | "invalid_prompt" | 17 more`

4807 4812 

4808 The error code for the response.4813 The error code for the response.

4809 4814 


4813 4818 

4814 - `"invalid_prompt"`4819 - `"invalid_prompt"`

4815 4820 

4821 - `"data_residency_mismatch"`

4822 

4816 - `"bio_policy"`4823 - `"bio_policy"`

4817 4824 

4818 - `"vector_store_timeout"`4825 - `"vector_store_timeout"`


10860 10867 

10861 Optional version of the prompt template.10868 Optional version of the prompt template.

10862 10869 

10863 - `prompt_cache_key?: string`10870 - `prompt_cache_key?: string | null`

10864 10871 

10865 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).10872 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

10866 10873 


10911 - `context?: "auto" | "current_turn" | "all_turns" | null`10918 - `context?: "auto" | "current_turn" | "all_turns" | null`

10912 10919 

10913 Controls which reasoning items are rendered back to the model on later turns.10920 Controls which reasoning items are rendered back to the model on later turns.

10921 If omitted or set to `auto`, the model determines the context mode. The

10922 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

10923 `current_turn`.

10924 

10914 When returned on a response, this is the effective reasoning context mode10925 When returned on a response, this is the effective reasoning context mode

10915 used for the response.10926 used for the response.

10916 10927 


10986 10997 

10987 - `"detailed"`10998 - `"detailed"`

10988 10999 

10989 - `safety_identifier?: string`11000 - `safety_identifier?: string | null`

10990 11001 

10991 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.11002 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.

10992 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).11003 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).


11114 11125 

11115 Constrains the verbosity of the model's response. Lower values will result in11126 Constrains the verbosity of the model's response. Lower values will result in

11116 more concise responses, while higher values will result in more verbose responses.11127 more concise responses, while higher values will result in more verbose responses.

11117 Currently supported values are `low`, `medium`, and `high`.11128 Currently supported values are `low`, `medium`, and `high`. The default is

11129 `medium`.

11118 11130 

11119 - `"low"`11131 - `"low"`

11120 11132 


11440 "usage": {11452 "usage": {

11441 "input_tokens": 36,11453 "input_tokens": 36,

11442 "input_tokens_details": {11454 "input_tokens_details": {

11443 "cached_tokens": 011455 "cached_tokens": 0,

11456 "cache_write_tokens": 0

11444 },11457 },

11445 "output_tokens": 87,11458 "output_tokens": 87,

11446 "output_tokens_details": {11459 "output_tokens_details": {


11529 "usage": {11542 "usage": {

11530 "input_tokens": 328,11543 "input_tokens": 328,

11531 "input_tokens_details": {11544 "input_tokens_details": {

11532 "cached_tokens": 011545 "cached_tokens": 0,

11546 "cache_write_tokens": 0

11533 },11547 },

11534 "output_tokens": 52,11548 "output_tokens": 52,

11535 "output_tokens_details": {11549 "output_tokens_details": {


11623 "usage": {11637 "usage": {

11624 "input_tokens": 8438,11638 "input_tokens": 8438,

11625 "input_tokens_details": {11639 "input_tokens_details": {

11626 "cached_tokens": 011640 "cached_tokens": 0,

11641 "cache_write_tokens": 0

11627 },11642 },

11628 "output_tokens": 398,11643 "output_tokens": 398,

11629 "output_tokens_details": {11644 "output_tokens_details": {


11741 "usage": {11756 "usage": {

11742 "input_tokens": 328,11757 "input_tokens": 328,

11743 "input_tokens_details": {11758 "input_tokens_details": {

11744 "cached_tokens": 011759 "cached_tokens": 0,

11760 "cache_write_tokens": 0

11745 },11761 },

11746 "output_tokens": 356,11762 "output_tokens": 356,

11747 "output_tokens_details": {11763 "output_tokens_details": {


11894 "usage": {11910 "usage": {

11895 "input_tokens": 18307,11911 "input_tokens": 18307,

11896 "input_tokens_details": {11912 "input_tokens_details": {

11897 "cached_tokens": 011913 "cached_tokens": 0,

11914 "cache_write_tokens": 0

11898 },11915 },

11899 "output_tokens": 348,11916 "output_tokens": 348,

11900 "output_tokens_details": {11917 "output_tokens_details": {


12142 "usage": {12159 "usage": {

12143 "input_tokens": 81,12160 "input_tokens": 81,

12144 "input_tokens_details": {12161 "input_tokens_details": {

12145 "cached_tokens": 012162 "cached_tokens": 0,

12163 "cache_write_tokens": 0

12146 },12164 },

12147 "output_tokens": 1035,12165 "output_tokens": 1035,

12148 "output_tokens_details": {12166 "output_tokens_details": {

Details

100 100 

101 An error object returned when the model fails to generate a Response.101 An error object returned when the model fails to generate a Response.

102 102 

103 - `code: "server_error" | "rate_limit_exceeded" | "invalid_prompt" | 16 more`103 - `code: "server_error" | "rate_limit_exceeded" | "invalid_prompt" | 17 more`

104 104 

105 The error code for the response.105 The error code for the response.

106 106 


110 110 

111 - `"invalid_prompt"`111 - `"invalid_prompt"`

112 112 

113 - `"data_residency_mismatch"`

114 

113 - `"bio_policy"`115 - `"bio_policy"`

114 116 

115 - `"vector_store_timeout"`117 - `"vector_store_timeout"`


6157 6159 

6158 Optional version of the prompt template.6160 Optional version of the prompt template.

6159 6161 

6160 - `prompt_cache_key?: string`6162 - `prompt_cache_key?: string | null`

6161 6163 

6162 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).6164 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

6163 6165 


6208 - `context?: "auto" | "current_turn" | "all_turns" | null`6210 - `context?: "auto" | "current_turn" | "all_turns" | null`

6209 6211 

6210 Controls which reasoning items are rendered back to the model on later turns.6212 Controls which reasoning items are rendered back to the model on later turns.

6213 If omitted or set to `auto`, the model determines the context mode. The

6214 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

6215 `current_turn`.

6216 

6211 When returned on a response, this is the effective reasoning context mode6217 When returned on a response, this is the effective reasoning context mode

6212 used for the response.6218 used for the response.

6213 6219 


6283 6289 

6284 - `"detailed"`6290 - `"detailed"`

6285 6291 

6286 - `safety_identifier?: string`6292 - `safety_identifier?: string | null`

6287 6293 

6288 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.6294 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.

6289 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).6295 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).


6411 6417 

6412 Constrains the verbosity of the model's response. Lower values will result in6418 Constrains the verbosity of the model's response. Lower values will result in

6413 more concise responses, while higher values will result in more verbose responses.6419 more concise responses, while higher values will result in more verbose responses.

6414 Currently supported values are `low`, `medium`, and `high`.6420 Currently supported values are `low`, `medium`, and `high`. The default is

6421 `medium`.

6415 6422 

6416 - `"low"`6423 - `"low"`

6417 6424 


6732 "usage": {6739 "usage": {

6733 "input_tokens": 32,6740 "input_tokens": 32,

6734 "input_tokens_details": {6741 "input_tokens_details": {

6735 "cached_tokens": 06742 "cached_tokens": 0,

6743 "cache_write_tokens": 0

6736 },6744 },

6737 "output_tokens": 18,6745 "output_tokens": 18,

6738 "output_tokens_details": {6746 "output_tokens_details": {

Details

3853 - `context?: "auto" | "current_turn" | "all_turns" | null`3853 - `context?: "auto" | "current_turn" | "all_turns" | null`

3854 3854 

3855 Controls which reasoning items are rendered back to the model on later turns.3855 Controls which reasoning items are rendered back to the model on later turns.

3856 If omitted or set to `auto`, the model determines the context mode. The

3857 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

3858 `current_turn`.

3859 

3856 When returned on a response, this is the effective reasoning context mode3860 When returned on a response, this is the effective reasoning context mode

3857 used for the response.3861 used for the response.

3858 3862 


4013 4017 

4014 Constrains the verbosity of the model's response. Lower values will result in4018 Constrains the verbosity of the model's response. Lower values will result in

4015 more concise responses, while higher values will result in more verbose responses.4019 more concise responses, while higher values will result in more verbose responses.

4016 Currently supported values are `low`, `medium`, and `high`.4020 Currently supported values are `low`, `medium`, and `high`. The default is

4021 `medium`.

4017 4022 

4018 - `"low"`4023 - `"low"`

4019 4024 

Details

856 whether they appear in the text so far, increasing the model's likelihood856 whether they appear in the text so far, increasing the model's likelihood

857 to talk about new topics.857 to talk about new topics.

858 858 

859 - `prompt_cache_key?: string`859 - `prompt_cache_key?: string | null`

860 860 

861 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).861 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

862 862 


995 995 

996 - `"json_object"`996 - `"json_object"`

997 997 

998 - `safety_identifier?: string`998 - `safety_identifier?: string | null`

999 999 

1000 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.1000 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.

1001 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).1001 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).


1301 1301 

1302 Constrains the verbosity of the model's response. Lower values will result in1302 Constrains the verbosity of the model's response. Lower values will result in

1303 more concise responses, while higher values will result in more verbose responses.1303 more concise responses, while higher values will result in more verbose responses.

1304 Currently supported values are `low`, `medium`, and `high`.1304 Currently supported values are `low`, `medium`, and `high`. The default is

1305 `medium`.

1305 1306 

1306 - `"low"`1307 - `"low"`

1307 1308 

Details

28 28 

29 An error object returned when the model fails to generate a Response.29 An error object returned when the model fails to generate a Response.

30 30 

31 - `code: "server_error" | "rate_limit_exceeded" | "invalid_prompt" | 16 more`31 - `code: "server_error" | "rate_limit_exceeded" | "invalid_prompt" | 17 more`

32 32 

33 The error code for the response.33 The error code for the response.

34 34 


38 38 

39 - `"invalid_prompt"`39 - `"invalid_prompt"`

40 40 

41 - `"data_residency_mismatch"`

42 

41 - `"bio_policy"`43 - `"bio_policy"`

42 44 

43 - `"vector_store_timeout"`45 - `"vector_store_timeout"`


5317 5319 

5318 Optional version of the prompt template.5320 Optional version of the prompt template.

5319 5321 

5320 - `prompt_cache_key?: string`5322 - `prompt_cache_key?: string | null`

5321 5323 

5322 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).5324 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

5323 5325 


5368 - `context?: "auto" | "current_turn" | "all_turns" | null`5370 - `context?: "auto" | "current_turn" | "all_turns" | null`

5369 5371 

5370 Controls which reasoning items are rendered back to the model on later turns.5372 Controls which reasoning items are rendered back to the model on later turns.

5373 If omitted or set to `auto`, the model determines the context mode. The

5374 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

5375 `current_turn`.

5376 

5371 When returned on a response, this is the effective reasoning context mode5377 When returned on a response, this is the effective reasoning context mode

5372 used for the response.5378 used for the response.

5373 5379 


5443 5449 

5444 - `"detailed"`5450 - `"detailed"`

5445 5451 

5446 - `safety_identifier?: string`5452 - `safety_identifier?: string | null`

5447 5453 

5448 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.5454 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.

5449 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).5455 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).


5571 5577 

5572 Constrains the verbosity of the model's response. Lower values will result in5578 Constrains the verbosity of the model's response. Lower values will result in

5573 more concise responses, while higher values will result in more verbose responses.5579 more concise responses, while higher values will result in more verbose responses.

5574 Currently supported values are `low`, `medium`, and `high`.5580 Currently supported values are `low`, `medium`, and `high`. The default is

5581 `medium`.

5575 5582 

5576 - `"low"`5583 - `"low"`

5577 5584 

Details

7084 "usage": {7084 "usage": {

7085 "input_tokens": 139,7085 "input_tokens": 139,

7086 "input_tokens_details": {7086 "input_tokens_details": {

7087 "cached_tokens": 07087 "cached_tokens": 0,

7088 "cache_write_tokens": 0

7088 },7089 },

7089 "output_tokens": 438,7090 "output_tokens": 438,

7090 "output_tokens_details": {7091 "output_tokens_details": {

Details

3810 3810 

3811 Optional version of the prompt template.3811 Optional version of the prompt template.

3812 3812 

3813 - `prompt_cache_key?: string`3813 - `prompt_cache_key?: string | null`

3814 3814 

3815 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).3815 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

3816 3816 


3861 - `context?: "auto" | "current_turn" | "all_turns" | null`3861 - `context?: "auto" | "current_turn" | "all_turns" | null`

3862 3862 

3863 Controls which reasoning items are rendered back to the model on later turns.3863 Controls which reasoning items are rendered back to the model on later turns.

3864 If omitted or set to `auto`, the model determines the context mode. The

3865 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

3866 `current_turn`.

3867 

3864 When returned on a response, this is the effective reasoning context mode3868 When returned on a response, this is the effective reasoning context mode

3865 used for the response.3869 used for the response.

3866 3870 


3936 3940 

3937 - `"detailed"`3941 - `"detailed"`

3938 3942 

3939 - `safety_identifier?: string`3943 - `safety_identifier?: string | null`

3940 3944 

3941 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.3945 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.

3942 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).3946 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).


4080 4084 

4081 Constrains the verbosity of the model's response. Lower values will result in4085 Constrains the verbosity of the model's response. Lower values will result in

4082 more concise responses, while higher values will result in more verbose responses.4086 more concise responses, while higher values will result in more verbose responses.

4083 Currently supported values are `low`, `medium`, and `high`.4087 Currently supported values are `low`, `medium`, and `high`. The default is

4088 `medium`.

4084 4089 

4085 - `"low"`4090 - `"low"`

4086 4091 


4414 4419 

4415 An error object returned when the model fails to generate a Response.4420 An error object returned when the model fails to generate a Response.

4416 4421 

4417 - `code: "server_error" | "rate_limit_exceeded" | "invalid_prompt" | 16 more`4422 - `code: "server_error" | "rate_limit_exceeded" | "invalid_prompt" | 17 more`

4418 4423 

4419 The error code for the response.4424 The error code for the response.

4420 4425 


4424 4429 

4425 - `"invalid_prompt"`4430 - `"invalid_prompt"`

4426 4431 

4432 - `"data_residency_mismatch"`

4433 

4427 - `"bio_policy"`4434 - `"bio_policy"`

4428 4435 

4429 - `"vector_store_timeout"`4436 - `"vector_store_timeout"`


9703 9710 

9704 Optional version of the prompt template.9711 Optional version of the prompt template.

9705 9712 

9706 - `prompt_cache_key?: string`9713 - `prompt_cache_key?: string | null`

9707 9714 

9708 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).9715 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

9709 9716 


9754 - `context?: "auto" | "current_turn" | "all_turns" | null`9761 - `context?: "auto" | "current_turn" | "all_turns" | null`

9755 9762 

9756 Controls which reasoning items are rendered back to the model on later turns.9763 Controls which reasoning items are rendered back to the model on later turns.

9764 If omitted or set to `auto`, the model determines the context mode. The

9765 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

9766 `current_turn`.

9767 

9757 When returned on a response, this is the effective reasoning context mode9768 When returned on a response, this is the effective reasoning context mode

9758 used for the response.9769 used for the response.

9759 9770 


9829 9840 

9830 - `"detailed"`9841 - `"detailed"`

9831 9842 

9832 - `safety_identifier?: string`9843 - `safety_identifier?: string | null`

9833 9844 

9834 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.9845 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.

9835 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).9846 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).


9957 9968 

9958 Constrains the verbosity of the model's response. Lower values will result in9969 Constrains the verbosity of the model's response. Lower values will result in

9959 more concise responses, while higher values will result in more verbose responses.9970 more concise responses, while higher values will result in more verbose responses.

9960 Currently supported values are `low`, `medium`, and `high`.9971 Currently supported values are `low`, `medium`, and `high`. The default is

9972 `medium`.

9961 9973 

9962 - `"low"`9974 - `"low"`

9963 9975 


10280 "usage": {10292 "usage": {

10281 "input_tokens": 36,10293 "input_tokens": 36,

10282 "input_tokens_details": {10294 "input_tokens_details": {

10283 "cached_tokens": 010295 "cached_tokens": 0,

10296 "cache_write_tokens": 0

10284 },10297 },

10285 "output_tokens": 87,10298 "output_tokens": 87,

10286 "output_tokens_details": {10299 "output_tokens_details": {


10369 "usage": {10382 "usage": {

10370 "input_tokens": 328,10383 "input_tokens": 328,

10371 "input_tokens_details": {10384 "input_tokens_details": {

10372 "cached_tokens": 010385 "cached_tokens": 0,

10386 "cache_write_tokens": 0

10373 },10387 },

10374 "output_tokens": 52,10388 "output_tokens": 52,

10375 "output_tokens_details": {10389 "output_tokens_details": {


10463 "usage": {10477 "usage": {

10464 "input_tokens": 8438,10478 "input_tokens": 8438,

10465 "input_tokens_details": {10479 "input_tokens_details": {

10466 "cached_tokens": 010480 "cached_tokens": 0,

10481 "cache_write_tokens": 0

10467 },10482 },

10468 "output_tokens": 398,10483 "output_tokens": 398,

10469 "output_tokens_details": {10484 "output_tokens_details": {


10581 "usage": {10596 "usage": {

10582 "input_tokens": 328,10597 "input_tokens": 328,

10583 "input_tokens_details": {10598 "input_tokens_details": {

10584 "cached_tokens": 010599 "cached_tokens": 0,

10600 "cache_write_tokens": 0

10585 },10601 },

10586 "output_tokens": 356,10602 "output_tokens": 356,

10587 "output_tokens_details": {10603 "output_tokens_details": {


10734 "usage": {10750 "usage": {

10735 "input_tokens": 18307,10751 "input_tokens": 18307,

10736 "input_tokens_details": {10752 "input_tokens_details": {

10737 "cached_tokens": 010753 "cached_tokens": 0,

10754 "cache_write_tokens": 0

10738 },10755 },

10739 "output_tokens": 348,10756 "output_tokens": 348,

10740 "output_tokens_details": {10757 "output_tokens_details": {


10982 "usage": {10999 "usage": {

10983 "input_tokens": 81,11000 "input_tokens": 81,

10984 "input_tokens_details": {11001 "input_tokens_details": {

10985 "cached_tokens": 011002 "cached_tokens": 0,

11003 "cache_write_tokens": 0

10986 },11004 },

10987 "output_tokens": 1035,11005 "output_tokens": 1035,

10988 "output_tokens_details": {11006 "output_tokens_details": {

Details

94 94 

95 An error object returned when the model fails to generate a Response.95 An error object returned when the model fails to generate a Response.

96 96 

97 - `code: "server_error" | "rate_limit_exceeded" | "invalid_prompt" | 16 more`97 - `code: "server_error" | "rate_limit_exceeded" | "invalid_prompt" | 17 more`

98 98 

99 The error code for the response.99 The error code for the response.

100 100 


104 104 

105 - `"invalid_prompt"`105 - `"invalid_prompt"`

106 106 

107 - `"data_residency_mismatch"`

108 

107 - `"bio_policy"`109 - `"bio_policy"`

108 110 

109 - `"vector_store_timeout"`111 - `"vector_store_timeout"`


5383 5385 

5384 Optional version of the prompt template.5386 Optional version of the prompt template.

5385 5387 

5386 - `prompt_cache_key?: string`5388 - `prompt_cache_key?: string | null`

5387 5389 

5388 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).5390 Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).

5389 5391 


5434 - `context?: "auto" | "current_turn" | "all_turns" | null`5436 - `context?: "auto" | "current_turn" | "all_turns" | null`

5435 5437 

5436 Controls which reasoning items are rendered back to the model on later turns.5438 Controls which reasoning items are rendered back to the model on later turns.

5439 If omitted or set to `auto`, the model determines the context mode. The

5440 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

5441 `current_turn`.

5442 

5437 When returned on a response, this is the effective reasoning context mode5443 When returned on a response, this is the effective reasoning context mode

5438 used for the response.5444 used for the response.

5439 5445 


5509 5515 

5510 - `"detailed"`5516 - `"detailed"`

5511 5517 

5512 - `safety_identifier?: string`5518 - `safety_identifier?: string | null`

5513 5519 

5514 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.5520 A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.

5515 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).5521 The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).


5637 5643 

5638 Constrains the verbosity of the model's response. Lower values will result in5644 Constrains the verbosity of the model's response. Lower values will result in

5639 more concise responses, while higher values will result in more verbose responses.5645 more concise responses, while higher values will result in more verbose responses.

5640 Currently supported values are `low`, `medium`, and `high`.5646 Currently supported values are `low`, `medium`, and `high`. The default is

5647 `medium`.

5641 5648 

5642 - `"low"`5649 - `"low"`

5643 5650 


5955 "usage": {5962 "usage": {

5956 "input_tokens": 32,5963 "input_tokens": 32,

5957 "input_tokens_details": {5964 "input_tokens_details": {

5958 "cached_tokens": 05965 "cached_tokens": 0,

5966 "cache_write_tokens": 0

5959 },5967 },

5960 "output_tokens": 18,5968 "output_tokens": 18,

5961 "output_tokens_details": {5969 "output_tokens_details": {

Details

3481 - `context?: "auto" | "current_turn" | "all_turns" | null`3481 - `context?: "auto" | "current_turn" | "all_turns" | null`

3482 3482 

3483 Controls which reasoning items are rendered back to the model on later turns.3483 Controls which reasoning items are rendered back to the model on later turns.

3484 If omitted or set to `auto`, the model determines the context mode. The

3485 `gpt-5.6` model family defaults to `all_turns`; earlier models default to

3486 `current_turn`.

3487 

3484 When returned on a response, this is the effective reasoning context mode3488 When returned on a response, this is the effective reasoning context mode

3485 used for the response.3489 used for the response.

3486 3490 


3641 3645 

3642 Constrains the verbosity of the model's response. Lower values will result in3646 Constrains the verbosity of the model's response. Lower values will result in

3643 more concise responses, while higher values will result in more verbose responses.3647 more concise responses, while higher values will result in more verbose responses.

3644 Currently supported values are `low`, `medium`, and `high`.3648 Currently supported values are `low`, `medium`, and `high`. The default is

3649 `medium`.

3645 3650 

3646 - `"low"`3651 - `"low"`

3647 3652