SpyBara
Go Premium

Reference 2026-11-02 23:58 UTC to 2026-11-03 22:58 UTC

30 files changed +2,020 −49. View all changes and history on the product overview
2026
Wed 25 23:57 Tue 24 23:00 Sat 21 23:57 Fri 20 23:59 Thu 19 22:59 Wed 18 22:59 Tue 17 22:57 Mon 16 23:00 Fri 13 23:58 Thu 12 22:57 Wed 11 23:57 Tue 10 23:02 Mon 9 23:02 Sat 7 22:59 Fri 6 23:00 Thu 5 23:00 Wed 4 22:58 Tue 3 22:58
Details

1> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

2 

3## Retrieve project service tier settings

4 

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

6 

7Retrieve the configured default and enabled service tiers for a project.

8 

9### Path Parameters

10 

11- `project_id: string`

12 

13 The ID of the project

14 

15### Returns

16 

17- `ProjectServiceTierSettings object { default, enabled_tiers, object }`

18 

19 - `default: "standard" or "fast" or "scale"`

20 

21 Default tier for requests that omit service_tier or use auto.

22 

23 - `"standard"`

24 

25 - `"fast"`

26 

27 - `"scale"`

28 

29 - `enabled_tiers: "all" or array of ProjectOptionalServiceTier`

30 

31 Additional service tiers enabled for this project. "all" includes future tiers. An empty array allows only Standard. Organization policy and eligibility still apply.

32 

33 - `"all"`

34 

35 - `"all"`

36 

37 - `array of ProjectOptionalServiceTier`

38 

39 - `"flex"`

40 

41 - `"fast"`

42 

43 - `"ultrafast"`

44 

45 - `object: "project.service_tier_settings" (default: "project.service_tier_settings")`

46 

47 - `"project.service_tier_settings"`

48 

49### Example

50 

51```http

52curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/service_tier_settings \

53 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

54```

55 

56#### 200 — Example

57 

58```json

59{

60 "default": "standard",

61 "enabled_tiers": "all",

62 "object": "project.service_tier_settings"

63}

64```

65 

66### Example

67 

68```http

69curl https://api.openai.com/v1/organization/projects/proj_abc/service_tier_settings \

70 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

71```

72 

73#### Response example

74 

75```json

76{

77 "object": "project.service_tier_settings",

78 "default": "standard",

79 "enabled_tiers": "all"

80}

81```

Details

1> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

2 

3## Update project service tier settings

4 

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

6 

7Update the default or enabled service tiers atomically. Supply at least one field. Omitted fields keep their current values.

8 

9### Path Parameters

10 

11- `project_id: string`

12 

13 The ID of the project

14 

15### Body Parameters

16 

17Content type: `application/json`

18 

19- `default: optional "standard" or "fast" or "scale"`

20 

21 Default tier for requests that omit service_tier or use auto.

22 

23 - `"standard"`

24 

25 - `"fast"`

26 

27 - `"scale"`

28 

29- `enabled_tiers: optional "all" or array of ProjectOptionalServiceTier`

30 

31 Additional service tiers enabled for this project. "all" includes future tiers. An empty array allows only Standard. Organization policy and eligibility still apply.

32 

33 - `"all"`

34 

35 - `"all"`

36 

37 - `array of ProjectOptionalServiceTier`

38 

39 - `"flex"`

40 

41 - `"fast"`

42 

43 - `"ultrafast"`

44 

45### Returns

46 

47- `ProjectServiceTierSettings object { default, enabled_tiers, object }`

48 

49 - `default: "standard" or "fast" or "scale"`

50 

51 Default tier for requests that omit service_tier or use auto.

52 

53 - `"standard"`

54 

55 - `"fast"`

56 

57 - `"scale"`

58 

59 - `enabled_tiers: "all" or array of ProjectOptionalServiceTier`

60 

61 Additional service tiers enabled for this project. "all" includes future tiers. An empty array allows only Standard. Organization policy and eligibility still apply.

62 

63 - `"all"`

64 

65 - `"all"`

66 

67 - `array of ProjectOptionalServiceTier`

68 

69 - `"flex"`

70 

71 - `"fast"`

72 

73 - `"ultrafast"`

74 

75 - `object: "project.service_tier_settings" (default: "project.service_tier_settings")`

76 

77 - `"project.service_tier_settings"`

78 

79### Example

80 

81```http

82curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/service_tier_settings \

83 -H 'Content-Type: application/json' \

84 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

85 -d '{

86 "default": "standard"

87 }'

88```

89 

90#### 200 — Example

91 

92```json

93{

94 "default": "standard",

95 "enabled_tiers": "all",

96 "object": "project.service_tier_settings"

97}

98```

99 

100### Example

101 

102```http

103curl https://api.openai.com/v1/organization/projects/proj_abc/service_tier_settings \

104 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

105 -H "Content-Type: application/json" \

106 -d '{"default":"standard","enabled_tiers":[]}'

107```

108 

109#### Response example

110 

111```json

112{

113 "object": "project.service_tier_settings",

114 "default": "standard",

115 "enabled_tiers": []

116}

117```

Details

1> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

2 

3## Create Platform workload identity provider

4 

5**post** `/organization/workload_identity_providers`

6 

7Register an OIDC provider for keyless project service-account authentication.

8 

9### Body Parameters

10 

11Content type: `application/json`

12 

13- `audience: string`

14 

15 `minLength: 1`

16 

17- `issuer: string`

18 

19 `minLength: 1`

20 

21- `name: string`

22 

23 `minLength: 1`

24 

25- `type: "oidc" (default: "oidc")`

26 

27 - `"oidc"`

28 

29- `attribute_transformations: optional array of object { attribute, expression }`

30 

31 `maxItems: 20`

32 

33 - `attribute: string`

34 

35 `minLength: 1`, `maxLength: 256`

36 

37 - `expression: string`

38 

39 `minLength: 1`, `maxLength: 4096`

40 

41- `description: optional string`

42 

43- `enabled: optional boolean`

44 

45- `verification: optional DiscoveryVerificationParam { discovery_url, type } or UploadedJwksVerificationParam { jwks, type }`

46 

47 - `DiscoveryVerificationParam object { discovery_url, type }`

48 

49 - `discovery_url: string or null`

50 

51 - `type: "discovery" (default: "discovery")`

52 

53 - `"discovery"`

54 

55 - `UploadedJwksVerificationParam object { jwks, type }`

56 

57 - `jwks: map[unknown]`

58 

59 - `type: "uploaded_jwks" (default: "uploaded_jwks")`

60 

61 - `"uploaded_jwks"`

62 

63### Returns

64 

65- `WorkloadIdentityProvider object { id, attribute_transformations, audience, 9 more }`

66 

67 - `id: string`

68 

69 - `attribute_transformations: array of object { attribute, expression }`

70 

71 - `attribute: string`

72 

73 - `expression: string`

74 

75 - `audience: string`

76 

77 - `created_at: integer`

78 

79 - `description: string or null`

80 

81 - `enabled: boolean`

82 

83 - `issuer: string`

84 

85 - `name: string`

86 

87 - `object: "organization.workload_identity_provider" (default: "organization.workload_identity_provider")`

88 

89 - `"organization.workload_identity_provider"`

90 

91 - `type: "oidc" (default: "oidc")`

92 

93 - `"oidc"`

94 

95 - `updated_at: integer`

96 

97 - `verification: DiscoveryVerification { discovery_url, type } or UploadedJwksVerification { jwks, type }`

98 

99 - `DiscoveryVerification object { discovery_url, type }`

100 

101 - `discovery_url: string or null`

102 

103 - `type: "discovery" (default: "discovery")`

104 

105 - `"discovery"`

106 

107 - `UploadedJwksVerification object { jwks, type }`

108 

109 - `jwks: map[unknown]`

110 

111 - `type: "uploaded_jwks" (default: "uploaded_jwks")`

112 

113 - `"uploaded_jwks"`

114 

115### Example

116 

117```http

118curl https://api.openai.com/v1/organization/workload_identity_providers \

119 -H 'Content-Type: application/json' \

120 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

121 -d '{

122 "audience": "x",

123 "issuer": "x",

124 "name": "x",

125 "type": "oidc"

126 }'

127```

128 

129#### 200 — Example

130 

131```json

132{

133 "id": "id",

134 "attribute_transformations": [

135 {

136 "attribute": "attribute",

137 "expression": "expression"

138 }

139 ],

140 "audience": "audience",

141 "created_at": 0,

142 "description": "description",

143 "enabled": true,

144 "issuer": "issuer",

145 "name": "name",

146 "object": "organization.workload_identity_provider",

147 "type": "oidc",

148 "updated_at": 0,

149 "verification": {

150 "discovery_url": "discovery_url",

151 "type": "discovery"

152 }

153}

154```

155 

156### Example

157 

158```http

159curl -X POST "https://api.openai.com/v1/organization/workload_identity_providers" \

160 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

161 -H "Content-Type: application/json" \

162 -d '{

163 "name": "CI provider",

164 "type": "oidc",

165 "issuer": "https://issuer.example.com",

166 "audience": "openai"

167}'

168```

169 

170#### Response example

171 

172```json

173{

174 "object": "organization.workload_identity_provider",

175 "id": "wip_example",

176 "type": "oidc",

177 "name": "CI provider",

178 "issuer": "https://issuer.example.com",

179 "audience": "openai",

180 "verification": {

181 "type": "discovery",

182 "discovery_url": null

183 },

184 "description": null,

185 "attribute_transformations": [],

186 "enabled": true,

187 "created_at": 1793664000,

188 "updated_at": 1793664000

189}

190```

Details

1> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

2 

3## Delete Platform workload identity provider

4 

5**delete** `/organization/workload_identity_providers/{workload_identity_provider_id}`

6 

7Delete a provider after deleting all its federation rules.

8 

9### Path Parameters

10 

11- `workload_identity_provider_id: string`

12 

13 `minLength: 1`

14 

15### Returns

16 

17- `WorkloadIdentityProviderDeleted object { id, deleted, object }`

18 

19 - `id: string`

20 

21 - `deleted: boolean`

22 

23 - `object: "organization.workload_identity_provider.deleted" (default: "organization.workload_identity_provider.deleted")`

24 

25 - `"organization.workload_identity_provider.deleted"`

26 

27### Example

28 

29```http

30curl https://api.openai.com/v1/organization/workload_identity_providers/$WORKLOAD_IDENTITY_PROVIDER_ID \

31 -X DELETE \

32 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

33```

34 

35#### 200 — Example

36 

37```json

38{

39 "id": "id",

40 "deleted": true,

41 "object": "organization.workload_identity_provider.deleted"

42}

43```

44 

45### Example

46 

47```http

48curl -X DELETE "https://api.openai.com/v1/organization/workload_identity_providers/wip_example" \

49 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

50```

51 

52#### Response example

53 

54```json

55{

56 "object": "organization.workload_identity_provider.deleted",

57 "id": "wip_example",

58 "deleted": true

59}

60```

Details

1> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

2 

3## List Platform workload identity providers

4 

5**get** `/organization/workload_identity_providers`

6 

7List OIDC providers in the authenticated Admin API key's organization.

8 

9### Query Parameters

10 

11- `after: optional string`

12 

13 `minLength: 1`

14 

15- `limit: optional integer`

16 

17 `minimum: 1`, `maximum: 100`

18 

19- `order: optional "asc" or "desc"`

20 

21 - `"asc" or "desc"`

22 

23 - `"asc"`

24 

25 - `"desc"`

26 

27### Returns

28 

29- `data: array of WorkloadIdentityProvider`

30 

31 - `id: string`

32 

33 - `attribute_transformations: array of object { attribute, expression }`

34 

35 - `attribute: string`

36 

37 - `expression: string`

38 

39 - `audience: string`

40 

41 - `created_at: integer`

42 

43 - `description: string or null`

44 

45 - `enabled: boolean`

46 

47 - `issuer: string`

48 

49 - `name: string`

50 

51 - `object: "organization.workload_identity_provider" (default: "organization.workload_identity_provider")`

52 

53 - `"organization.workload_identity_provider"`

54 

55 - `type: "oidc" (default: "oidc")`

56 

57 - `"oidc"`

58 

59 - `updated_at: integer`

60 

61 - `verification: DiscoveryVerification { discovery_url, type } or UploadedJwksVerification { jwks, type }`

62 

63 - `DiscoveryVerification object { discovery_url, type }`

64 

65 - `discovery_url: string or null`

66 

67 - `type: "discovery" (default: "discovery")`

68 

69 - `"discovery"`

70 

71 - `UploadedJwksVerification object { jwks, type }`

72 

73 - `jwks: map[unknown]`

74 

75 - `type: "uploaded_jwks" (default: "uploaded_jwks")`

76 

77 - `"uploaded_jwks"`

78 

79- `first_id: string or null`

80 

81- `has_more: boolean`

82 

83- `last_id: string or null`

84 

85- `object: "list" (default: "list")`

86 

87 - `"list"`

88 

89### Example

90 

91```http

92curl https://api.openai.com/v1/organization/workload_identity_providers \

93 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

94```

95 

96#### 200 — Example

97 

98```json

99{

100 "data": [

101 {

102 "id": "id",

103 "attribute_transformations": [

104 {

105 "attribute": "attribute",

106 "expression": "expression"

107 }

108 ],

109 "audience": "audience",

110 "created_at": 0,

111 "description": "description",

112 "enabled": true,

113 "issuer": "issuer",

114 "name": "name",

115 "object": "organization.workload_identity_provider",

116 "type": "oidc",

117 "updated_at": 0,

118 "verification": {

119 "discovery_url": "discovery_url",

120 "type": "discovery"

121 }

122 }

123 ],

124 "first_id": "first_id",

125 "has_more": true,

126 "last_id": "last_id",

127 "object": "list"

128}

129```

130 

131### Example

132 

133```http

134curl -X GET "https://api.openai.com/v1/organization/workload_identity_providers?limit=20&order=asc" \

135 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

136```

137 

138#### Response example

139 

140```json

141{

142 "object": "list",

143 "data": [

144 {

145 "object": "organization.workload_identity_provider",

146 "id": "wip_example",

147 "type": "oidc",

148 "name": "CI provider",

149 "issuer": "https://issuer.example.com",

150 "audience": "openai",

151 "verification": {

152 "type": "discovery",

153 "discovery_url": null

154 },

155 "description": null,

156 "attribute_transformations": [],

157 "enabled": true,

158 "created_at": 1793664000,

159 "updated_at": 1793664000

160 }

161 ],

162 "first_id": "wip_example",

163 "last_id": "wip_example",

164 "has_more": false

165}

166```

Details

1> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

2 

3## Retrieve Platform workload identity provider

4 

5**get** `/organization/workload_identity_providers/{workload_identity_provider_id}`

6 

7Retrieve an OIDC provider in the authenticated organization.

8 

9### Path Parameters

10 

11- `workload_identity_provider_id: string`

12 

13 `minLength: 1`

14 

15### Returns

16 

17- `WorkloadIdentityProvider object { id, attribute_transformations, audience, 9 more }`

18 

19 - `id: string`

20 

21 - `attribute_transformations: array of object { attribute, expression }`

22 

23 - `attribute: string`

24 

25 - `expression: string`

26 

27 - `audience: string`

28 

29 - `created_at: integer`

30 

31 - `description: string or null`

32 

33 - `enabled: boolean`

34 

35 - `issuer: string`

36 

37 - `name: string`

38 

39 - `object: "organization.workload_identity_provider" (default: "organization.workload_identity_provider")`

40 

41 - `"organization.workload_identity_provider"`

42 

43 - `type: "oidc" (default: "oidc")`

44 

45 - `"oidc"`

46 

47 - `updated_at: integer`

48 

49 - `verification: DiscoveryVerification { discovery_url, type } or UploadedJwksVerification { jwks, type }`

50 

51 - `DiscoveryVerification object { discovery_url, type }`

52 

53 - `discovery_url: string or null`

54 

55 - `type: "discovery" (default: "discovery")`

56 

57 - `"discovery"`

58 

59 - `UploadedJwksVerification object { jwks, type }`

60 

61 - `jwks: map[unknown]`

62 

63 - `type: "uploaded_jwks" (default: "uploaded_jwks")`

64 

65 - `"uploaded_jwks"`

66 

67### Example

68 

69```http

70curl https://api.openai.com/v1/organization/workload_identity_providers/$WORKLOAD_IDENTITY_PROVIDER_ID \

71 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

72```

73 

74#### 200 — Example

75 

76```json

77{

78 "id": "id",

79 "attribute_transformations": [

80 {

81 "attribute": "attribute",

82 "expression": "expression"

83 }

84 ],

85 "audience": "audience",

86 "created_at": 0,

87 "description": "description",

88 "enabled": true,

89 "issuer": "issuer",

90 "name": "name",

91 "object": "organization.workload_identity_provider",

92 "type": "oidc",

93 "updated_at": 0,

94 "verification": {

95 "discovery_url": "discovery_url",

96 "type": "discovery"

97 }

98}

99```

100 

101### Example

102 

103```http

104curl -X GET "https://api.openai.com/v1/organization/workload_identity_providers/wip_example" \

105 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

106```

107 

108#### Response example

109 

110```json

111{

112 "object": "organization.workload_identity_provider",

113 "id": "wip_example",

114 "type": "oidc",

115 "name": "CI provider",

116 "issuer": "https://issuer.example.com",

117 "audience": "openai",

118 "verification": {

119 "type": "discovery",

120 "discovery_url": null

121 },

122 "description": null,

123 "attribute_transformations": [],

124 "enabled": true,

125 "created_at": 1793664000,

126 "updated_at": 1793664000

127}

128```

Details

1> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

2 

3## Update Platform workload identity provider

4 

5**post** `/organization/workload_identity_providers/{workload_identity_provider_id}`

6 

7Update supplied provider fields, preserving omitted fields.

8 

9### Path Parameters

10 

11- `workload_identity_provider_id: string`

12 

13 `minLength: 1`

14 

15### Body Parameters

16 

17Content type: `application/json`

18 

19- `attribute_transformations: optional array of object { attribute, expression }`

20 

21 `maxItems: 20`

22 

23 - `attribute: string`

24 

25 `minLength: 1`, `maxLength: 256`

26 

27 - `expression: string`

28 

29 `minLength: 1`, `maxLength: 4096`

30 

31- `audience: optional string`

32 

33 `minLength: 1`

34 

35- `description: optional string or null`

36 

37- `enabled: optional boolean`

38 

39- `issuer: optional string`

40 

41 `minLength: 1`

42 

43- `name: optional string`

44 

45 `minLength: 1`

46 

47- `verification: optional DiscoveryVerificationParam { discovery_url, type } or UploadedJwksVerificationParam { jwks, type }`

48 

49 - `DiscoveryVerificationParam object { discovery_url, type }`

50 

51 - `discovery_url: string or null`

52 

53 - `type: "discovery" (default: "discovery")`

54 

55 - `"discovery"`

56 

57 - `UploadedJwksVerificationParam object { jwks, type }`

58 

59 - `jwks: map[unknown]`

60 

61 - `type: "uploaded_jwks" (default: "uploaded_jwks")`

62 

63 - `"uploaded_jwks"`

64 

65### Returns

66 

67- `WorkloadIdentityProvider object { id, attribute_transformations, audience, 9 more }`

68 

69 - `id: string`

70 

71 - `attribute_transformations: array of object { attribute, expression }`

72 

73 - `attribute: string`

74 

75 - `expression: string`

76 

77 - `audience: string`

78 

79 - `created_at: integer`

80 

81 - `description: string or null`

82 

83 - `enabled: boolean`

84 

85 - `issuer: string`

86 

87 - `name: string`

88 

89 - `object: "organization.workload_identity_provider" (default: "organization.workload_identity_provider")`

90 

91 - `"organization.workload_identity_provider"`

92 

93 - `type: "oidc" (default: "oidc")`

94 

95 - `"oidc"`

96 

97 - `updated_at: integer`

98 

99 - `verification: DiscoveryVerification { discovery_url, type } or UploadedJwksVerification { jwks, type }`

100 

101 - `DiscoveryVerification object { discovery_url, type }`

102 

103 - `discovery_url: string or null`

104 

105 - `type: "discovery" (default: "discovery")`

106 

107 - `"discovery"`

108 

109 - `UploadedJwksVerification object { jwks, type }`

110 

111 - `jwks: map[unknown]`

112 

113 - `type: "uploaded_jwks" (default: "uploaded_jwks")`

114 

115 - `"uploaded_jwks"`

116 

117### Example

118 

119```http

120curl https://api.openai.com/v1/organization/workload_identity_providers/$WORKLOAD_IDENTITY_PROVIDER_ID \

121 -X POST \

122 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

123```

124 

125#### 200 — Example

126 

127```json

128{

129 "id": "id",

130 "attribute_transformations": [

131 {

132 "attribute": "attribute",

133 "expression": "expression"

134 }

135 ],

136 "audience": "audience",

137 "created_at": 0,

138 "description": "description",

139 "enabled": true,

140 "issuer": "issuer",

141 "name": "name",

142 "object": "organization.workload_identity_provider",

143 "type": "oidc",

144 "updated_at": 0,

145 "verification": {

146 "discovery_url": "discovery_url",

147 "type": "discovery"

148 }

149}

150```

151 

152### Example

153 

154```http

155curl -X POST "https://api.openai.com/v1/organization/workload_identity_providers/wip_example" \

156 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

157 -H "Content-Type: application/json" \

158 -d '{

159 "enabled": false

160}'

161```

162 

163#### Response example

164 

165```json

166{

167 "object": "organization.workload_identity_provider",

168 "id": "wip_example",

169 "type": "oidc",

170 "name": "CI provider",

171 "issuer": "https://issuer.example.com",

172 "audience": "openai",

173 "verification": {

174 "type": "discovery",

175 "discovery_url": null

176 },

177 "description": null,

178 "attribute_transformations": [],

179 "enabled": false,

180 "created_at": 1793664000,

181 "updated_at": 1793664000

182}

183```

Details

1> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

2 

3## Create Platform workload identity federation rule

4 

5**post** `/organization/workload_identity_providers/{workload_identity_provider_id}/federation_rules`

6 

7Bind verified token attributes to an existing project service account.

8 

9### Path Parameters

10 

11- `workload_identity_provider_id: string`

12 

13 `minLength: 1`

14 

15### Body Parameters

16 

17Content type: `application/json`

18 

19- `attribute_matchers: map[string or boolean or number or number]`

20 

21 - `string`

22 

23 - `boolean`

24 

25 - `number or number`

26 

27 - `number`

28 

29 - `number`

30 

31- `project_id: string`

32 

33 `minLength: 1`

34 

35- `service_account_id: string`

36 

37 `minLength: 1`

38 

39- `description: optional string`

40 

41- `enabled: optional boolean`

42 

43- `name: optional string`

44 

45- `permissions: optional DefaultPermissionsParam { type } or RestrictedPermissionsParam { scopes, type }`

46 

47 - `DefaultPermissionsParam object { type }`

48 

49 - `type: "service_account_default" (default: "service_account_default")`

50 

51 - `"service_account_default"`

52 

53 - `RestrictedPermissionsParam object { scopes, type }`

54 

55 - `scopes: array of string`

56 

57 `minItems: 1`

58 

59 - `type: "restricted" (default: "restricted")`

60 

61 - `"restricted"`

62 

63### Returns

64 

65- `FederationRule object { id, attribute_matchers, created_at, 9 more }`

66 

67 - `id: string`

68 

69 - `attribute_matchers: map[string or boolean or number or number]`

70 

71 - `string`

72 

73 - `boolean`

74 

75 - `number or number`

76 

77 - `number`

78 

79 - `number`

80 

81 - `created_at: integer`

82 

83 - `description: string or null`

84 

85 - `enabled: boolean`

86 

87 - `name: string or null`

88 

89 - `object: "organization.workload_identity_federation_rule" (default: "organization.workload_identity_federation_rule")`

90 

91 - `"organization.workload_identity_federation_rule"`

92 

93 - `permissions: DefaultPermissions { type } or RestrictedPermissions { scopes, type }`

94 

95 - `DefaultPermissions object { type }`

96 

97 - `type: "service_account_default" (default: "service_account_default")`

98 

99 - `"service_account_default"`

100 

101 - `RestrictedPermissions object { scopes, type }`

102 

103 - `scopes: array of string`

104 

105 - `type: "restricted" (default: "restricted")`

106 

107 - `"restricted"`

108 

109 - `project_id: string`

110 

111 - `service_account_id: string`

112 

113 - `updated_at: integer`

114 

115 - `workload_identity_provider_id: string`

116 

117### Example

118 

119```http

120curl https://api.openai.com/v1/organization/workload_identity_providers/$WORKLOAD_IDENTITY_PROVIDER_ID/federation_rules \

121 -H 'Content-Type: application/json' \

122 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

123 -d '{

124 "attribute_matchers": {

125 "foo": "string"

126 },

127 "project_id": "x",

128 "service_account_id": "x"

129 }'

130```

131 

132#### 200 — Example

133 

134```json

135{

136 "id": "id",

137 "attribute_matchers": {

138 "foo": "string"

139 },

140 "created_at": 0,

141 "description": "description",

142 "enabled": true,

143 "name": "name",

144 "object": "organization.workload_identity_federation_rule",

145 "permissions": {

146 "type": "service_account_default"

147 },

148 "project_id": "project_id",

149 "service_account_id": "service_account_id",

150 "updated_at": 0,

151 "workload_identity_provider_id": "workload_identity_provider_id"

152}

153```

154 

155### Example

156 

157```http

158curl -X POST "https://api.openai.com/v1/organization/workload_identity_providers/wip_example/federation_rules" \

159 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

160 -H "Content-Type: application/json" \

161 -d '{

162 "project_id": "proj_example",

163 "service_account_id": "svc_acct_example",

164 "attribute_matchers": {

165 "sub": "ci:release"

166 }

167}'

168```

169 

170#### Response example

171 

172```json

173{

174 "object": "organization.workload_identity_federation_rule",

175 "id": "wifr_example",

176 "workload_identity_provider_id": "wip_example",

177 "project_id": "proj_example",

178 "service_account_id": "svc_acct_example",

179 "name": null,

180 "description": null,

181 "attribute_matchers": {

182 "sub": "ci:release"

183 },

184 "permissions": {

185 "type": "service_account_default"

186 },

187 "enabled": true,

188 "created_at": 1793664000,

189 "updated_at": 1793664000

190}

191```

Details

1> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

2 

3## Delete Platform workload identity federation rule

4 

5**delete** `/organization/workload_identity_providers/{workload_identity_provider_id}/federation_rules/{workload_identity_federation_rule_id}`

6 

7Delete a federation rule to a project service account.

8 

9### Path Parameters

10 

11- `workload_identity_provider_id: string`

12 

13 `minLength: 1`

14 

15- `workload_identity_federation_rule_id: string`

16 

17 `minLength: 1`

18 

19### Returns

20 

21- `FederationRuleDeleted object { id, deleted, object }`

22 

23 - `id: string`

24 

25 - `deleted: boolean`

26 

27 - `object: "organization.workload_identity_federation_rule.deleted" (default: "organization.workload_identity_federation_rule.deleted")`

28 

29 - `"organization.workload_identity_federation_rule.deleted"`

30 

31### Example

32 

33```http

34curl https://api.openai.com/v1/organization/workload_identity_providers/$WORKLOAD_IDENTITY_PROVIDER_ID/federation_rules/$WORKLOAD_IDENTITY_FEDERATION_RULE_ID \

35 -X DELETE \

36 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

37```

38 

39#### 200 — Example

40 

41```json

42{

43 "id": "id",

44 "deleted": true,

45 "object": "organization.workload_identity_federation_rule.deleted"

46}

47```

48 

49### Example

50 

51```http

52curl -X DELETE "https://api.openai.com/v1/organization/workload_identity_providers/wip_example/federation_rules/wifr_example" \

53 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

54```

55 

56#### Response example

57 

58```json

59{

60 "object": "organization.workload_identity_federation_rule.deleted",

61 "id": "wifr_example",

62 "deleted": true

63}

64```

Details

1> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

2 

3## List Platform workload identity federation rules

4 

5**get** `/organization/workload_identity_providers/{workload_identity_provider_id}/federation_rules`

6 

7List the provider's federation rules to project service accounts.

8 

9### Path Parameters

10 

11- `workload_identity_provider_id: string`

12 

13 `minLength: 1`

14 

15### Query Parameters

16 

17- `after: optional string`

18 

19 `minLength: 1`

20 

21- `limit: optional integer`

22 

23 `minimum: 1`, `maximum: 100`

24 

25- `order: optional "asc" or "desc"`

26 

27 - `"asc" or "desc"`

28 

29 - `"asc"`

30 

31 - `"desc"`

32 

33- `service_account_id: optional string`

34 

35 `minLength: 1`

36 

37### Returns

38 

39- `data: array of FederationRule`

40 

41 - `id: string`

42 

43 - `attribute_matchers: map[string or boolean or number or number]`

44 

45 - `string`

46 

47 - `boolean`

48 

49 - `number or number`

50 

51 - `number`

52 

53 - `number`

54 

55 - `created_at: integer`

56 

57 - `description: string or null`

58 

59 - `enabled: boolean`

60 

61 - `name: string or null`

62 

63 - `object: "organization.workload_identity_federation_rule" (default: "organization.workload_identity_federation_rule")`

64 

65 - `"organization.workload_identity_federation_rule"`

66 

67 - `permissions: DefaultPermissions { type } or RestrictedPermissions { scopes, type }`

68 

69 - `DefaultPermissions object { type }`

70 

71 - `type: "service_account_default" (default: "service_account_default")`

72 

73 - `"service_account_default"`

74 

75 - `RestrictedPermissions object { scopes, type }`

76 

77 - `scopes: array of string`

78 

79 - `type: "restricted" (default: "restricted")`

80 

81 - `"restricted"`

82 

83 - `project_id: string`

84 

85 - `service_account_id: string`

86 

87 - `updated_at: integer`

88 

89 - `workload_identity_provider_id: string`

90 

91- `first_id: string or null`

92 

93- `has_more: boolean`

94 

95- `last_id: string or null`

96 

97- `object: "list" (default: "list")`

98 

99 - `"list"`

100 

101### Example

102 

103```http

104curl https://api.openai.com/v1/organization/workload_identity_providers/$WORKLOAD_IDENTITY_PROVIDER_ID/federation_rules \

105 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

106```

107 

108#### 200 — Example

109 

110```json

111{

112 "data": [

113 {

114 "id": "id",

115 "attribute_matchers": {

116 "foo": "string"

117 },

118 "created_at": 0,

119 "description": "description",

120 "enabled": true,

121 "name": "name",

122 "object": "organization.workload_identity_federation_rule",

123 "permissions": {

124 "type": "service_account_default"

125 },

126 "project_id": "project_id",

127 "service_account_id": "service_account_id",

128 "updated_at": 0,

129 "workload_identity_provider_id": "workload_identity_provider_id"

130 }

131 ],

132 "first_id": "first_id",

133 "has_more": true,

134 "last_id": "last_id",

135 "object": "list"

136}

137```

138 

139### Example

140 

141```http

142curl -X GET "https://api.openai.com/v1/organization/workload_identity_providers/wip_example/federation_rules?limit=20&order=asc" \

143 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

144```

145 

146#### Response example

147 

148```json

149{

150 "object": "list",

151 "data": [

152 {

153 "object": "organization.workload_identity_federation_rule",

154 "id": "wifr_example",

155 "workload_identity_provider_id": "wip_example",

156 "project_id": "proj_example",

157 "service_account_id": "svc_acct_example",

158 "name": null,

159 "description": null,

160 "attribute_matchers": {

161 "sub": "ci:release"

162 },

163 "permissions": {

164 "type": "service_account_default"

165 },

166 "enabled": true,

167 "created_at": 1793664000,

168 "updated_at": 1793664000

169 }

170 ],

171 "first_id": "wifr_example",

172 "last_id": "wifr_example",

173 "has_more": false

174}

175```

Details

1> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

2 

3## Retrieve Platform workload identity federation rule

4 

5**get** `/organization/workload_identity_providers/{workload_identity_provider_id}/federation_rules/{workload_identity_federation_rule_id}`

6 

7Retrieve a federation rule owned by the authenticated organization and provider.

8 

9### Path Parameters

10 

11- `workload_identity_provider_id: string`

12 

13 `minLength: 1`

14 

15- `workload_identity_federation_rule_id: string`

16 

17 `minLength: 1`

18 

19### Returns

20 

21- `FederationRule object { id, attribute_matchers, created_at, 9 more }`

22 

23 - `id: string`

24 

25 - `attribute_matchers: map[string or boolean or number or number]`

26 

27 - `string`

28 

29 - `boolean`

30 

31 - `number or number`

32 

33 - `number`

34 

35 - `number`

36 

37 - `created_at: integer`

38 

39 - `description: string or null`

40 

41 - `enabled: boolean`

42 

43 - `name: string or null`

44 

45 - `object: "organization.workload_identity_federation_rule" (default: "organization.workload_identity_federation_rule")`

46 

47 - `"organization.workload_identity_federation_rule"`

48 

49 - `permissions: DefaultPermissions { type } or RestrictedPermissions { scopes, type }`

50 

51 - `DefaultPermissions object { type }`

52 

53 - `type: "service_account_default" (default: "service_account_default")`

54 

55 - `"service_account_default"`

56 

57 - `RestrictedPermissions object { scopes, type }`

58 

59 - `scopes: array of string`

60 

61 - `type: "restricted" (default: "restricted")`

62 

63 - `"restricted"`

64 

65 - `project_id: string`

66 

67 - `service_account_id: string`

68 

69 - `updated_at: integer`

70 

71 - `workload_identity_provider_id: string`

72 

73### Example

74 

75```http

76curl https://api.openai.com/v1/organization/workload_identity_providers/$WORKLOAD_IDENTITY_PROVIDER_ID/federation_rules/$WORKLOAD_IDENTITY_FEDERATION_RULE_ID \

77 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

78```

79 

80#### 200 — Example

81 

82```json

83{

84 "id": "id",

85 "attribute_matchers": {

86 "foo": "string"

87 },

88 "created_at": 0,

89 "description": "description",

90 "enabled": true,

91 "name": "name",

92 "object": "organization.workload_identity_federation_rule",

93 "permissions": {

94 "type": "service_account_default"

95 },

96 "project_id": "project_id",

97 "service_account_id": "service_account_id",

98 "updated_at": 0,

99 "workload_identity_provider_id": "workload_identity_provider_id"

100}

101```

102 

103### Example

104 

105```http

106curl -X GET "https://api.openai.com/v1/organization/workload_identity_providers/wip_example/federation_rules/wifr_example" \

107 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

108```

109 

110#### Response example

111 

112```json

113{

114 "object": "organization.workload_identity_federation_rule",

115 "id": "wifr_example",

116 "workload_identity_provider_id": "wip_example",

117 "project_id": "proj_example",

118 "service_account_id": "svc_acct_example",

119 "name": null,

120 "description": null,

121 "attribute_matchers": {

122 "sub": "ci:release"

123 },

124 "permissions": {

125 "type": "service_account_default"

126 },

127 "enabled": true,

128 "created_at": 1793664000,

129 "updated_at": 1793664000

130}

131```

Details

1> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

2 

3## Update Platform workload identity federation rule

4 

5**post** `/organization/workload_identity_providers/{workload_identity_provider_id}/federation_rules/{workload_identity_federation_rule_id}`

6 

7Update supplied matcher, permission, metadata, or enabled fields.

8 

9### Path Parameters

10 

11- `workload_identity_provider_id: string`

12 

13 `minLength: 1`

14 

15- `workload_identity_federation_rule_id: string`

16 

17 `minLength: 1`

18 

19### Body Parameters

20 

21Content type: `application/json`

22 

23- `attribute_matchers: optional map[string or boolean or number or number]`

24 

25 - `string`

26 

27 - `boolean`

28 

29 - `number or number`

30 

31 - `number`

32 

33 - `number`

34 

35- `description: optional string or null`

36 

37- `enabled: optional boolean`

38 

39- `name: optional string or null`

40 

41- `permissions: optional DefaultPermissionsParam { type } or RestrictedPermissionsParam { scopes, type }`

42 

43 - `DefaultPermissionsParam object { type }`

44 

45 - `type: "service_account_default" (default: "service_account_default")`

46 

47 - `"service_account_default"`

48 

49 - `RestrictedPermissionsParam object { scopes, type }`

50 

51 - `scopes: array of string`

52 

53 `minItems: 1`

54 

55 - `type: "restricted" (default: "restricted")`

56 

57 - `"restricted"`

58 

59### Returns

60 

61- `FederationRule object { id, attribute_matchers, created_at, 9 more }`

62 

63 - `id: string`

64 

65 - `attribute_matchers: map[string or boolean or number or number]`

66 

67 - `string`

68 

69 - `boolean`

70 

71 - `number or number`

72 

73 - `number`

74 

75 - `number`

76 

77 - `created_at: integer`

78 

79 - `description: string or null`

80 

81 - `enabled: boolean`

82 

83 - `name: string or null`

84 

85 - `object: "organization.workload_identity_federation_rule" (default: "organization.workload_identity_federation_rule")`

86 

87 - `"organization.workload_identity_federation_rule"`

88 

89 - `permissions: DefaultPermissions { type } or RestrictedPermissions { scopes, type }`

90 

91 - `DefaultPermissions object { type }`

92 

93 - `type: "service_account_default" (default: "service_account_default")`

94 

95 - `"service_account_default"`

96 

97 - `RestrictedPermissions object { scopes, type }`

98 

99 - `scopes: array of string`

100 

101 - `type: "restricted" (default: "restricted")`

102 

103 - `"restricted"`

104 

105 - `project_id: string`

106 

107 - `service_account_id: string`

108 

109 - `updated_at: integer`

110 

111 - `workload_identity_provider_id: string`

112 

113### Example

114 

115```http

116curl https://api.openai.com/v1/organization/workload_identity_providers/$WORKLOAD_IDENTITY_PROVIDER_ID/federation_rules/$WORKLOAD_IDENTITY_FEDERATION_RULE_ID \

117 -X POST \

118 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

119```

120 

121#### 200 — Example

122 

123```json

124{

125 "id": "id",

126 "attribute_matchers": {

127 "foo": "string"

128 },

129 "created_at": 0,

130 "description": "description",

131 "enabled": true,

132 "name": "name",

133 "object": "organization.workload_identity_federation_rule",

134 "permissions": {

135 "type": "service_account_default"

136 },

137 "project_id": "project_id",

138 "service_account_id": "service_account_id",

139 "updated_at": 0,

140 "workload_identity_provider_id": "workload_identity_provider_id"

141}

142```

143 

144### Example

145 

146```http

147curl -X POST "https://api.openai.com/v1/organization/workload_identity_providers/wip_example/federation_rules/wifr_example" \

148 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

149 -H "Content-Type: application/json" \

150 -d '{

151 "enabled": false

152}'

153```

154 

155#### Response example

156 

157```json

158{

159 "object": "organization.workload_identity_federation_rule",

160 "id": "wifr_example",

161 "workload_identity_provider_id": "wip_example",

162 "project_id": "proj_example",

163 "service_account_id": "svc_acct_example",

164 "name": null,

165 "description": null,

166 "attribute_matchers": {

167 "sub": "ci:release"

168 },

169 "permissions": {

170 "type": "service_account_default"

171 },

172 "enabled": false,

173 "created_at": 1793664000,

174 "updated_at": 1793664000

175}

176```

Details

1653 1653 

1654 A customer-safe error. Non-null only for a failed turn.1654 A customer-safe error. Non-null only for a failed turn.

1655 1655 

1656 - `code: "context_length_exceeded" or "session_budget_exceeded" or "usage_limit_exceeded" or 20 more`1656 - `code: "context_length_exceeded" or "max_output_tokens" or "session_budget_exceeded" or 21 more`

1657 1657 

1658 A stable, machine-readable failure category.1658 A stable, machine-readable failure category.

1659 1659 


1661 1661 

1662 The request exceeds the model's context window.1662 The request exceeds the model's context window.

1663 1663 

1664 - `"max_output_tokens"`

1665 

1666 The model reached its output token limit before finishing the response.

1667 

1664 - `"session_budget_exceeded"`1668 - `"session_budget_exceeded"`

1665 1669 

1666 The session has reached its usage budget.1670 The session has reached its usage budget.


1952 1956 

1953 A customer-safe error. Non-null only for a failed turn.1957 A customer-safe error. Non-null only for a failed turn.

1954 1958 

1955 - `code: "context_length_exceeded" or "session_budget_exceeded" or "usage_limit_exceeded" or 20 more`1959 - `code: "context_length_exceeded" or "max_output_tokens" or "session_budget_exceeded" or 21 more`

1956 1960 

1957 A stable, machine-readable failure category.1961 A stable, machine-readable failure category.

1958 1962 


1960 1964 

1961 The request exceeds the model's context window.1965 The request exceeds the model's context window.

1962 1966 

1967 - `"max_output_tokens"`

1968 

1969 The model reached its output token limit before finishing the response.

1970 

1963 - `"session_budget_exceeded"`1971 - `"session_budget_exceeded"`

1964 1972 

1965 The session has reached its usage budget.1973 The session has reached its usage budget.


2251 2259 

2252 A customer-safe error. Non-null only for a failed turn.2260 A customer-safe error. Non-null only for a failed turn.

2253 2261 

2254 - `code: "context_length_exceeded" or "session_budget_exceeded" or "usage_limit_exceeded" or 20 more`2262 - `code: "context_length_exceeded" or "max_output_tokens" or "session_budget_exceeded" or 21 more`

2255 2263 

2256 A stable, machine-readable failure category.2264 A stable, machine-readable failure category.

2257 2265 


2259 2267 

2260 The request exceeds the model's context window.2268 The request exceeds the model's context window.

2261 2269 

2270 - `"max_output_tokens"`

2271 

2272 The model reached its output token limit before finishing the response.

2273 

2262 - `"session_budget_exceeded"`2274 - `"session_budget_exceeded"`

2263 2275 

2264 The session has reached its usage budget.2276 The session has reached its usage budget.


2565 2577 

2566 A customer-safe error. Non-null only for a failed turn.2578 A customer-safe error. Non-null only for a failed turn.

2567 2579 

2568 - `code: "context_length_exceeded" or "session_budget_exceeded" or "usage_limit_exceeded" or 20 more`2580 - `code: "context_length_exceeded" or "max_output_tokens" or "session_budget_exceeded" or 21 more`

2569 2581 

2570 A stable, machine-readable failure category.2582 A stable, machine-readable failure category.

2571 2583 


2573 2585 

2574 The request exceeds the model's context window.2586 The request exceeds the model's context window.

2575 2587 

2588 - `"max_output_tokens"`

2589 

2590 The model reached its output token limit before finishing the response.

2591 

2576 - `"session_budget_exceeded"`2592 - `"session_budget_exceeded"`

2577 2593 

2578 The session has reached its usage budget.2594 The session has reached its usage budget.


2879 2895 

2880 A customer-safe error. Non-null only for a failed turn.2896 A customer-safe error. Non-null only for a failed turn.

2881 2897 

2882 - `code: "context_length_exceeded" or "session_budget_exceeded" or "usage_limit_exceeded" or 20 more`2898 - `code: "context_length_exceeded" or "max_output_tokens" or "session_budget_exceeded" or 21 more`

2883 2899 

2884 A stable, machine-readable failure category.2900 A stable, machine-readable failure category.

2885 2901 


2887 2903 

2888 The request exceeds the model's context window.2904 The request exceeds the model's context window.

2889 2905 

2906 - `"max_output_tokens"`

2907 

2908 The model reached its output token limit before finishing the response.

2909 

2890 - `"session_budget_exceeded"`2910 - `"session_budget_exceeded"`

2891 2911 

2892 The session has reached its usage budget.2912 The session has reached its usage budget.

Details

1352 1352 

1353 A customer-safe error. Non-null only for a failed turn.1353 A customer-safe error. Non-null only for a failed turn.

1354 1354 

1355 - `code: "context_length_exceeded" or "session_budget_exceeded" or "usage_limit_exceeded" or 20 more`1355 - `code: "context_length_exceeded" or "max_output_tokens" or "session_budget_exceeded" or 21 more`

1356 1356 

1357 A stable, machine-readable failure category.1357 A stable, machine-readable failure category.

1358 1358 


1360 1360 

1361 The request exceeds the model's context window.1361 The request exceeds the model's context window.

1362 1362 

1363 - `"max_output_tokens"`

1364 

1365 The model reached its output token limit before finishing the response.

1366 

1363 - `"session_budget_exceeded"`1367 - `"session_budget_exceeded"`

1364 1368 

1365 The session has reached its usage budget.1369 The session has reached its usage budget.

Details

82 82 

83 A customer-safe error. Non-null only for a failed turn.83 A customer-safe error. Non-null only for a failed turn.

84 84 

85 - `code: "context_length_exceeded" or "session_budget_exceeded" or "usage_limit_exceeded" or 20 more`85 - `code: "context_length_exceeded" or "max_output_tokens" or "session_budget_exceeded" or 21 more`

86 86 

87 A stable, machine-readable failure category.87 A stable, machine-readable failure category.

88 88 


90 90 

91 The request exceeds the model's context window.91 The request exceeds the model's context window.

92 92 

93 - `"max_output_tokens"`

94 

95 The model reached its output token limit before finishing the response.

96 

93 - `"session_budget_exceeded"`97 - `"session_budget_exceeded"`

94 98 

95 The session has reached its usage budget.99 The session has reached its usage budget.

Details

60 60 

61 A customer-safe error. Non-null only for a failed turn.61 A customer-safe error. Non-null only for a failed turn.

62 62 

63 - `code: "context_length_exceeded" or "session_budget_exceeded" or "usage_limit_exceeded" or 20 more`63 - `code: "context_length_exceeded" or "max_output_tokens" or "session_budget_exceeded" or 21 more`

64 64 

65 A stable, machine-readable failure category.65 A stable, machine-readable failure category.

66 66 


68 68 

69 The request exceeds the model's context window.69 The request exceeds the model's context window.

70 70 

71 - `"max_output_tokens"`

72 

73 The model reached its output token limit before finishing the response.

74 

71 - `"session_budget_exceeded"`75 - `"session_budget_exceeded"`

72 76 

73 The session has reached its usage budget.77 The session has reached its usage budget.

Details

76 76 

77 A customer-safe error. Non-null only for a failed turn.77 A customer-safe error. Non-null only for a failed turn.

78 78 

79 - `code: "context_length_exceeded" or "session_budget_exceeded" or "usage_limit_exceeded" or 20 more`79 - `code: "context_length_exceeded" or "max_output_tokens" or "session_budget_exceeded" or 21 more`

80 80 

81 A stable, machine-readable failure category.81 A stable, machine-readable failure category.

82 82 


84 84 

85 The request exceeds the model's context window.85 The request exceeds the model's context window.

86 86 

87 - `"max_output_tokens"`

88 

89 The model reached its output token limit before finishing the response.

90 

87 - `"session_budget_exceeded"`91 - `"session_budget_exceeded"`

88 92 

89 The session has reached its usage budget.93 The session has reached its usage budget.

Details

54 54 

55 A customer-safe error. Non-null only for a failed turn.55 A customer-safe error. Non-null only for a failed turn.

56 56 

57 - `code: "context_length_exceeded" or "session_budget_exceeded" or "usage_limit_exceeded" or 20 more`57 - `code: "context_length_exceeded" or "max_output_tokens" or "session_budget_exceeded" or 21 more`

58 58 

59 A stable, machine-readable failure category.59 A stable, machine-readable failure category.

60 60 


62 62 

63 The request exceeds the model's context window.63 The request exceeds the model's context window.

64 64 

65 - `"max_output_tokens"`

66 

67 The model reached its output token limit before finishing the response.

68 

65 - `"session_budget_exceeded"`69 - `"session_budget_exceeded"`

66 70 

67 The session has reached its usage budget.71 The session has reached its usage budget.

Details

114 114 

115 Identifier of the workflow backing the session.115 Identifier of the workflow backing the session.

116 116 

117 - `state_variables: map[string or boolean or number] or null`117 - `state_variables: map[string or number or boolean or number] or null`

118 118 

119 State variable key-value pairs applied when invoking the workflow. Defaults to null when no overrides were provided.119 State variable key-value pairs applied when invoking the workflow. Defaults to null when no overrides were provided.

120 120 

121 - `string`121 - `string`

122 122 

123 - `number`

124 

123 - `boolean`125 - `boolean`

124 126 

125 - `number`127 - `number`

Details

24 24 

25 Identifier for the workflow invoked by the session.25 Identifier for the workflow invoked by the session.

26 26 

27 - `state_variables: optional map[string or boolean or number]`27 - `state_variables: optional map[string or number or boolean or number]`

28 28 

29 State variables forwarded to the workflow. Keys may be up to 64 characters, values must be primitive types, and the map defaults to an empty object.29 State variables forwarded to the workflow. Keys may be up to 64 characters, values must be primitive types, and the map defaults to an empty object.

30 30 


32 32 

33 `maxLength: 10485760`33 `maxLength: 10485760`

34 34 

35 - `number`

36 

35 - `boolean`37 - `boolean`

36 38 

37 - `number`39 - `number`


220 222 

221 Identifier of the workflow backing the session.223 Identifier of the workflow backing the session.

222 224 

223 - `state_variables: map[string or boolean or number] or null`225 - `state_variables: map[string or number or boolean or number] or null`

224 226 

225 State variable key-value pairs applied when invoking the workflow. Defaults to null when no overrides were provided.227 State variable key-value pairs applied when invoking the workflow. Defaults to null when no overrides were provided.

226 228 

227 - `string`229 - `string`

228 230 

231 - `number`

232 

229 - `boolean`233 - `boolean`

230 234 

231 - `number`235 - `number`

Details

22 22 

23### Returns23### Returns

24 24 

25- `BetaResponse object { id, access_programs, created_at, 35 more }`25- `BetaResponse object { id, access_programs, created_at, 36 more }`

26 26 

27 - `id: string`27 - `id: string`

28 28 


11071 11071 

11072 The unique ID of the conversation that this response was associated with.11072 The unique ID of the conversation that this response was associated with.

11073 11073 

11074 - `image: optional object { context_compression }`

11075 

11076 - `context_compression: "enabled" or "disabled"`

11077 

11078 Effective image context optimization policy.

11079 

11080 - `"enabled"`

11081 

11082 - `"disabled"`

11083 

11074 - `max_output_tokens: optional integer or null`11084 - `max_output_tokens: optional integer or null`

11075 11085 

11076 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/api/docs/guides/reasoning).11086 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/api/docs/guides/reasoning).


11314 11324 

11315 - `"explicit"`11325 - `"explicit"`

11316 11326 

11317 - `ttl: "30m"`11327 - `ttl: "30m" or "12h"`

11318 11328 

11319 The minimum lifetime applied to each cache breakpoint.11329 The minimum lifetime applied to each cache breakpoint.

11320 11330 

11321 - `"30m"`11331 - `"30m"`

11322 11332 

11333 - `"12h"`

11334 

11323 - `comparison_response_id: optional string or null`11335 - `comparison_response_id: optional string or null`

11324 11336 

11325 The response ID supplied as the prompt cache diagnostics comparison.11337 The response ID supplied as the prompt cache diagnostics comparison.


11653 11665 

11654 The number of input tokens.11666 The number of input tokens.

11655 11667 

11656 - `input_tokens_details: object { cache_write_tokens, cached_tokens }`11668 - `input_tokens_details: object { cache_write_tokens, cached_tokens, cache_write_tokens_details }`

11657 11669 

11658 A detailed breakdown of the input tokens.11670 A detailed breakdown of the input tokens.

11659 11671 


11666 The number of tokens that were retrieved from the cache.11678 The number of tokens that were retrieved from the cache.

11667 [More on prompt caching](/api/docs/guides/prompt-caching).11679 [More on prompt caching](/api/docs/guides/prompt-caching).

11668 11680 

11681 - `cache_write_tokens_details: optional object { ttl_12h_tokens, ttl_30m_tokens }`

11682 

11683 - `ttl_12h_tokens: integer`

11684 

11685 The number of input tokens written with 12-hour retention.

11686 

11687 - `ttl_30m_tokens: integer`

11688 

11689 The number of input tokens written with 30-minute retention.

11690 

11669 - `output_tokens: integer`11691 - `output_tokens: integer`

11670 11692 

11671 The number of output tokens.11693 The number of output tokens.


11780 "conversation": {11802 "conversation": {

11781 "id": "id"11803 "id": "id"

11782 },11804 },

11805 "image": {

11806 "context_compression": "enabled"

11807 },

11783 "moderation": {11808 "moderation": {

11784 "input": {11809 "input": {

11785 "categories": {11810 "categories": {

Details

248 248 

249 - `string`249 - `string`

250 250 

251- `image: optional object { context_compression }`

252 

253 Request level image options.

254 

255 - `context_compression: optional "auto" or "enabled" or "disabled"`

256 

257 Controls image context optimization. Defaults to `auto`, which uses the model, transport, and input to select a policy. Use `enabled` to require compression support or `disabled` to turn it off.

258 

259 - `"auto"`

260 

261 - `"enabled"`

262 

263 - `"disabled"`

264 

251- `input: optional string or array of BetaEasyInputMessage or Message { content, role, agent, 2 more } or BetaResponseOutputMessage or 33 more or null`265- `input: optional string or array of BetaEasyInputMessage or Message { content, role, agent, 2 more } or BetaResponseOutputMessage or 33 more or null`

252 266 

253 Text, image, or file inputs to the model, used to generate a response267 Text, image, or file inputs to the model, used to generate a response


5535 5549 

5536- `prompt_cache_options: optional object { mode, ttl } or null`5550- `prompt_cache_options: optional object { mode, ttl } or null`

5537 5551 

5538 Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](/api/docs/guides/prompt-caching) for current details.5552 Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the [prompt caching guide](/api/docs/guides/prompt-caching) for current details.

5539 5553 

5540 - `mode: optional "implicit" or "explicit"`5554 - `mode: optional "implicit" or "explicit"`

5541 5555 


5576 5590 

5577### Returns5591### Returns

5578 5592 

5579- `BetaCompactedResponse object { id, created_at, object, 2 more }`5593- `BetaCompactedResponse object { id, created_at, object, 3 more }`

5580 5594 

5581 - `id: string`5595 - `id: string`

5582 5596 


10597 10611 

10598 The number of input tokens.10612 The number of input tokens.

10599 10613 

10600 - `input_tokens_details: object { cache_write_tokens, cached_tokens }`10614 - `input_tokens_details: object { cache_write_tokens, cached_tokens, cache_write_tokens_details }`

10601 10615 

10602 A detailed breakdown of the input tokens.10616 A detailed breakdown of the input tokens.

10603 10617 


10610 The number of tokens that were retrieved from the cache.10624 The number of tokens that were retrieved from the cache.

10611 [More on prompt caching](/api/docs/guides/prompt-caching).10625 [More on prompt caching](/api/docs/guides/prompt-caching).

10612 10626 

10627 - `cache_write_tokens_details: optional object { ttl_12h_tokens, ttl_30m_tokens }`

10628 

10629 - `ttl_12h_tokens: integer`

10630 

10631 The number of input tokens written with 12-hour retention.

10632 

10633 - `ttl_30m_tokens: integer`

10634 

10635 The number of input tokens written with 30-minute retention.

10636 

10613 - `output_tokens: integer`10637 - `output_tokens: integer`

10614 10638 

10615 The number of output tokens.10639 The number of output tokens.


10626 10650 

10627 The total number of tokens used.10651 The total number of tokens used.

10628 10652 

10653 - `image: optional object { context_compression }`

10654 

10655 - `context_compression: "enabled" or "disabled"`

10656 

10657 Effective image context optimization policy.

10658 

10659 - `"enabled"`

10660 

10661 - `"disabled"`

10662 

10629### Example10663### Example

10630 10664 

10631```http10665```http


10680 "input_tokens": 42897,10714 "input_tokens": 42897,

10681 "input_tokens_details": {10715 "input_tokens_details": {

10682 "cache_write_tokens": 0,10716 "cache_write_tokens": 0,

10683 "cached_tokens": 010717 "cached_tokens": 0,

10718 "cache_write_tokens_details": {

10719 "ttl_12h_tokens": 0,

10720 "ttl_30m_tokens": 0

10721 }

10684 },10722 },

10685 "output_tokens": 12000,10723 "output_tokens": 12000,

10686 "output_tokens_details": {10724 "output_tokens_details": {

10687 "reasoning_tokens": 010725 "reasoning_tokens": 0

10688 },10726 },

10689 "total_tokens": 5489710727 "total_tokens": 54897

10728 },

10729 "image": {

10730 "context_compression": "disabled"

10690 }10731 }

10691}10732}

10692```10733```

Details

74 74 

75 The unique ID of the conversation.75 The unique ID of the conversation.

76 76 

77- `image: optional object { context_compression }`

78 

79 Request level image options.

80 

81 - `context_compression: optional "auto" or "enabled" or "disabled"`

82 

83 Controls image context optimization. Defaults to `auto`, which uses the model, transport, and input to select a policy. Use `enabled` to require compression support or `disabled` to turn it off.

84 

85 - `"auto"`

86 

87 - `"enabled"`

88 

89 - `"disabled"`

90 

77- `include: optional array of BetaResponseIncludable or null`91- `include: optional array of BetaResponseIncludable or null`

78 92 

79 Specify additional output data to include in the model response. Currently supported values are:93 Specify additional output data to include in the model response. Currently supported values are:


5737 5751 

5738- `prompt_cache_options: optional object { comparison_response_id, mode, prewarm, ttl }`5752- `prompt_cache_options: optional object { comparison_response_id, mode, prewarm, ttl }`

5739 5753 

5740 Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](/api/docs/guides/prompt-caching) for current details.5754 Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the [prompt caching guide](/api/docs/guides/prompt-caching) for current details.

5741 5755 

5742 - `comparison_response_id: optional string or null`5756 - `comparison_response_id: optional string or null`

5743 5757 


5755 5769 

5756 Prepares the prompt cache without generating output. Defaults to `false`. When set to `true`, overrides the `generate` field to `false`.5770 Prepares the prompt cache without generating output. Defaults to `false`. When set to `true`, overrides the `generate` field to `false`.

5757 5771 

5758 - `ttl: optional "30m"`5772 - `ttl: optional "30m" or "12h"`

5759 5773 

5760 The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to `30m`, which is currently the only supported value. The backend may retain cache entries for longer.5774 The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Supported values are `30m` (the default) and `12h`. The backend may retain cache entries for longer.

5761 5775 

5762 - `"30m"`5776 - `"30m"`

5763 5777 

5778 - `"12h"`

5779 

5764- `prompt_cache_retention: optional "in_memory" or "24h" or null`5780- `prompt_cache_retention: optional "in_memory" or "24h" or null`

5765 5781 

5766 Deprecated. Use `prompt_cache_options.ttl` instead.5782 Deprecated. Use `prompt_cache_options.ttl` instead.


7252 7268 

7253### Returns7269### Returns

7254 7270 

7255- `BetaResponse object { id, access_programs, created_at, 35 more }`7271- `BetaResponse object { id, access_programs, created_at, 36 more }`

7256 7272 

7257 - `id: string`7273 - `id: string`

7258 7274 


18301 18317 

18302 The unique ID of the conversation that this response was associated with.18318 The unique ID of the conversation that this response was associated with.

18303 18319 

18320 - `image: optional object { context_compression }`

18321 

18322 - `context_compression: "enabled" or "disabled"`

18323 

18324 Effective image context optimization policy.

18325 

18326 - `"enabled"`

18327 

18328 - `"disabled"`

18329 

18304 - `max_output_tokens: optional integer or null`18330 - `max_output_tokens: optional integer or null`

18305 18331 

18306 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/api/docs/guides/reasoning).18332 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/api/docs/guides/reasoning).


18544 18570 

18545 - `"explicit"`18571 - `"explicit"`

18546 18572 

18547 - `ttl: "30m"`18573 - `ttl: "30m" or "12h"`

18548 18574 

18549 The minimum lifetime applied to each cache breakpoint.18575 The minimum lifetime applied to each cache breakpoint.

18550 18576 

18551 - `"30m"`18577 - `"30m"`

18552 18578 

18579 - `"12h"`

18580 

18553 - `comparison_response_id: optional string or null`18581 - `comparison_response_id: optional string or null`

18554 18582 

18555 The response ID supplied as the prompt cache diagnostics comparison.18583 The response ID supplied as the prompt cache diagnostics comparison.


18883 18911 

18884 The number of input tokens.18912 The number of input tokens.

18885 18913 

18886 - `input_tokens_details: object { cache_write_tokens, cached_tokens }`18914 - `input_tokens_details: object { cache_write_tokens, cached_tokens, cache_write_tokens_details }`

18887 18915 

18888 A detailed breakdown of the input tokens.18916 A detailed breakdown of the input tokens.

18889 18917 


18896 The number of tokens that were retrieved from the cache.18924 The number of tokens that were retrieved from the cache.

18897 [More on prompt caching](/api/docs/guides/prompt-caching).18925 [More on prompt caching](/api/docs/guides/prompt-caching).

18898 18926 

18927 - `cache_write_tokens_details: optional object { ttl_12h_tokens, ttl_30m_tokens }`

18928 

18929 - `ttl_12h_tokens: integer`

18930 

18931 The number of input tokens written with 12-hour retention.

18932 

18933 - `ttl_30m_tokens: integer`

18934 

18935 The number of input tokens written with 30-minute retention.

18936 

18899 - `output_tokens: integer`18937 - `output_tokens: integer`

18900 18938 

18901 The number of output tokens.18939 The number of output tokens.


19011 "conversation": {19049 "conversation": {

19012 "id": "id"19050 "id": "id"

19013 },19051 },

19052 "image": {

19053 "context_compression": "enabled"

19054 },

19014 "moderation": {19055 "moderation": {

19015 "input": {19056 "input": {

19016 "categories": {19057 "categories": {

Details

66 66 

67### Returns67### Returns

68 68 

69- `BetaResponse object { id, access_programs, created_at, 35 more }`69- `BetaResponse object { id, access_programs, created_at, 36 more }`

70 70 

71 - `id: string`71 - `id: string`

72 72 


11115 11115 

11116 The unique ID of the conversation that this response was associated with.11116 The unique ID of the conversation that this response was associated with.

11117 11117 

11118 - `image: optional object { context_compression }`

11119 

11120 - `context_compression: "enabled" or "disabled"`

11121 

11122 Effective image context optimization policy.

11123 

11124 - `"enabled"`

11125 

11126 - `"disabled"`

11127 

11118 - `max_output_tokens: optional integer or null`11128 - `max_output_tokens: optional integer or null`

11119 11129 

11120 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/api/docs/guides/reasoning).11130 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/api/docs/guides/reasoning).


11358 11368 

11359 - `"explicit"`11369 - `"explicit"`

11360 11370 

11361 - `ttl: "30m"`11371 - `ttl: "30m" or "12h"`

11362 11372 

11363 The minimum lifetime applied to each cache breakpoint.11373 The minimum lifetime applied to each cache breakpoint.

11364 11374 

11365 - `"30m"`11375 - `"30m"`

11366 11376 

11377 - `"12h"`

11378 

11367 - `comparison_response_id: optional string or null`11379 - `comparison_response_id: optional string or null`

11368 11380 

11369 The response ID supplied as the prompt cache diagnostics comparison.11381 The response ID supplied as the prompt cache diagnostics comparison.


11697 11709 

11698 The number of input tokens.11710 The number of input tokens.

11699 11711 

11700 - `input_tokens_details: object { cache_write_tokens, cached_tokens }`11712 - `input_tokens_details: object { cache_write_tokens, cached_tokens, cache_write_tokens_details }`

11701 11713 

11702 A detailed breakdown of the input tokens.11714 A detailed breakdown of the input tokens.

11703 11715 


11710 The number of tokens that were retrieved from the cache.11722 The number of tokens that were retrieved from the cache.

11711 [More on prompt caching](/api/docs/guides/prompt-caching).11723 [More on prompt caching](/api/docs/guides/prompt-caching).

11712 11724 

11725 - `cache_write_tokens_details: optional object { ttl_12h_tokens, ttl_30m_tokens }`

11726 

11727 - `ttl_12h_tokens: integer`

11728 

11729 The number of input tokens written with 12-hour retention.

11730 

11731 - `ttl_30m_tokens: integer`

11732 

11733 The number of input tokens written with 30-minute retention.

11734 

11713 - `output_tokens: integer`11735 - `output_tokens: integer`

11714 11736 

11715 The number of output tokens.11737 The number of output tokens.


11823 "conversation": {11845 "conversation": {

11824 "id": "id"11846 "id": "id"

11825 },11847 },

11848 "image": {

11849 "context_compression": "enabled"

11850 },

11826 "moderation": {11851 "moderation": {

11827 "input": {11852 "input": {

11828 "categories": {11853 "categories": {

Details

972 972 

973- `prompt_cache_options: optional object { mode, ttl }`973- `prompt_cache_options: optional object { mode, ttl }`

974 974 

975 Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](/api/docs/guides/prompt-caching) for current details.975 Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the [prompt caching guide](/api/docs/guides/prompt-caching) for current details.

976 976 

977 - `mode: optional "implicit" or "explicit"`977 - `mode: optional "implicit" or "explicit"`

978 978 

Details

10for trunk setup and call monitoring.10for trunk setup and call monitoring.

11 11 

12Set transport.type to `webrtc` and supply an SDP offer, or set it to `sip`12Set transport.type to `webrtc` and supply an SDP offer, or set it to `sip`

13and supply an E.164 destination and trunk credentials. Outbound SIP calling13and supply an E.164 destination and trunk credentials.

14must be enabled for your organization.

15Ringing is limited to 3 minutes and connected calls to 2 hours; these limits14Ringing is limited to 3 minutes and connected calls to 2 hours; these limits

16are not configurable in the request.15are not configurable in the request.

17 16 


1257 1256 

1258 - `Sip object { destination, trunk, type }`1257 - `Sip object { destination, trunk, type }`

1259 1258 

1260 Place an outbound SIP call using your provider's trunk. Outbound SIP calling must be enabled for your organization. The trunk must support TLS signaling, Opus audio, and SDES-SRTP media. See [Telephony and SIP](/api/docs/guides/voice-sip?api=live#place-an-outbound-call).1259 Place an outbound SIP call using your provider's trunk. The trunk must support TLS signaling, Opus audio, and SDES-SRTP media. See [Telephony and SIP](/api/docs/guides/voice-sip?api=live#place-an-outbound-call).

1261 1260 

1262 - `destination: string`1261 - `destination: string`

1263 1262 

Details

16 16 

17### Returns17### Returns

18 18 

19- `Response object { id, access_programs, created_at, 35 more }`19- `Response object { id, access_programs, created_at, 36 more }`

20 20 

21 - `id: string`21 - `id: string`

22 22 


9626 9626 

9627 The unique ID of the conversation that this response was associated with.9627 The unique ID of the conversation that this response was associated with.

9628 9628 

9629 - `image: optional object { context_compression }`

9630 

9631 - `context_compression: "enabled" or "disabled"`

9632 

9633 Effective image context optimization policy.

9634 

9635 - `"enabled"`

9636 

9637 - `"disabled"`

9638 

9629 - `max_output_tokens: optional integer or null`9639 - `max_output_tokens: optional integer or null`

9630 9640 

9631 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/api/docs/guides/reasoning).9641 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/api/docs/guides/reasoning).


9869 9879 

9870 - `"explicit"`9880 - `"explicit"`

9871 9881 

9872 - `ttl: "30m"`9882 - `ttl: "30m" or "12h"`

9873 9883 

9874 The minimum lifetime applied to each cache breakpoint.9884 The minimum lifetime applied to each cache breakpoint.

9875 9885 

9876 - `"30m"`9886 - `"30m"`

9877 9887 

9888 - `"12h"`

9889 

9878 - `comparison_response_id: optional string or null`9890 - `comparison_response_id: optional string or null`

9879 9891 

9880 The response ID supplied as the prompt cache diagnostics comparison.9892 The response ID supplied as the prompt cache diagnostics comparison.


10188 10200 

10189 The number of input tokens.10201 The number of input tokens.

10190 10202 

10191 - `input_tokens_details: object { cache_write_tokens, cached_tokens }`10203 - `input_tokens_details: object { cache_write_tokens, cached_tokens, cache_write_tokens_details }`

10192 10204 

10193 A detailed breakdown of the input tokens.10205 A detailed breakdown of the input tokens.

10194 10206 


10201 The number of tokens that were retrieved from the cache.10213 The number of tokens that were retrieved from the cache.

10202 [More on prompt caching](/api/docs/guides/prompt-caching).10214 [More on prompt caching](/api/docs/guides/prompt-caching).

10203 10215 

10216 - `cache_write_tokens_details: optional object { ttl_12h_tokens, ttl_30m_tokens }`

10217 

10218 - `ttl_12h_tokens: integer`

10219 

10220 The number of input tokens written with 12-hour retention.

10221 

10222 - `ttl_30m_tokens: integer`

10223 

10224 The number of input tokens written with 30-minute retention.

10225 

10204 - `output_tokens: integer`10226 - `output_tokens: integer`

10205 10227 

10206 The number of output tokens.10228 The number of output tokens.


10315 "conversation": {10337 "conversation": {

10316 "id": "id"10338 "id": "id"

10317 },10339 },

10340 "image": {

10341 "context_compression": "enabled"

10342 },

10318 "moderation": {10343 "moderation": {

10319 "input": {10344 "input": {

10320 "categories": {10345 "categories": {

Details

242 242 

243 - `string`243 - `string`

244 244 

245- `image: optional object { context_compression }`

246 

247 Request level image options.

248 

249 - `context_compression: optional "auto" or "enabled" or "disabled"`

250 

251 Controls image context optimization. Defaults to `auto`, which uses the model, transport, and input to select a policy. Use `enabled` to require compression support or `disabled` to turn it off.

252 

253 - `"auto"`

254 

255 - `"enabled"`

256 

257 - `"disabled"`

258 

245- `input: optional string or array of EasyInputMessage or Message { content, role, status, type } or ResponseOutputMessage or 30 more or null`259- `input: optional string or array of EasyInputMessage or Message { content, role, status, type } or ResponseOutputMessage or 30 more or null`

246 260 

247 Text, image, or file inputs to the model, used to generate a response261 Text, image, or file inputs to the model, used to generate a response


4898 4912 

4899- `prompt_cache_options: optional object { mode, ttl } or null`4913- `prompt_cache_options: optional object { mode, ttl } or null`

4900 4914 

4901 Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](/api/docs/guides/prompt-caching) for current details.4915 Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the [prompt caching guide](/api/docs/guides/prompt-caching) for current details.

4902 4916 

4903 - `mode: optional "implicit" or "explicit"`4917 - `mode: optional "implicit" or "explicit"`

4904 4918 


4939 4953 

4940### Returns4954### Returns

4941 4955 

4942- `CompactedResponse object { id, created_at, object, 2 more }`4956- `CompactedResponse object { id, created_at, object, 3 more }`

4943 4957 

4944 - `id: string`4958 - `id: string`

4945 4959 


9347 9361 

9348 The number of input tokens.9362 The number of input tokens.

9349 9363 

9350 - `input_tokens_details: object { cache_write_tokens, cached_tokens }`9364 - `input_tokens_details: object { cache_write_tokens, cached_tokens, cache_write_tokens_details }`

9351 9365 

9352 A detailed breakdown of the input tokens.9366 A detailed breakdown of the input tokens.

9353 9367 


9360 The number of tokens that were retrieved from the cache.9374 The number of tokens that were retrieved from the cache.

9361 [More on prompt caching](/api/docs/guides/prompt-caching).9375 [More on prompt caching](/api/docs/guides/prompt-caching).

9362 9376 

9377 - `cache_write_tokens_details: optional object { ttl_12h_tokens, ttl_30m_tokens }`

9378 

9379 - `ttl_12h_tokens: integer`

9380 

9381 The number of input tokens written with 12-hour retention.

9382 

9383 - `ttl_30m_tokens: integer`

9384 

9385 The number of input tokens written with 30-minute retention.

9386 

9363 - `output_tokens: integer`9387 - `output_tokens: integer`

9364 9388 

9365 The number of output tokens.9389 The number of output tokens.


9376 9400 

9377 The total number of tokens used.9401 The total number of tokens used.

9378 9402 

9403 - `image: optional object { context_compression }`

9404 

9405 - `context_compression: "enabled" or "disabled"`

9406 

9407 Effective image context optimization policy.

9408 

9409 - `"enabled"`

9410 

9411 - `"disabled"`

9412 

9379### Example9413### Example

9380 9414 

9381```http9415```http


9430 "input_tokens": 42897,9464 "input_tokens": 42897,

9431 "input_tokens_details": {9465 "input_tokens_details": {

9432 "cache_write_tokens": 0,9466 "cache_write_tokens": 0,

9433 "cached_tokens": 09467 "cached_tokens": 0,

9468 "cache_write_tokens_details": {

9469 "ttl_12h_tokens": 0,

9470 "ttl_30m_tokens": 0

9471 }

9434 },9472 },

9435 "output_tokens": 12000,9473 "output_tokens": 12000,

9436 "output_tokens_details": {9474 "output_tokens_details": {

9437 "reasoning_tokens": 09475 "reasoning_tokens": 0

9438 },9476 },

9439 "total_tokens": 548979477 "total_tokens": 54897

9478 },

9479 "image": {

9480 "context_compression": "disabled"

9440 }9481 }

9441}9482}

9442```9483```

Details

68 68 

69 The unique ID of the conversation.69 The unique ID of the conversation.

70 70 

71- `image: optional object { context_compression }`

72 

73 Request level image options.

74 

75 - `context_compression: optional "auto" or "enabled" or "disabled"`

76 

77 Controls image context optimization. Defaults to `auto`, which uses the model, transport, and input to select a policy. Use `enabled` to require compression support or `disabled` to turn it off.

78 

79 - `"auto"`

80 

81 - `"enabled"`

82 

83 - `"disabled"`

84 

71- `include: optional array of ResponseIncludable or null`85- `include: optional array of ResponseIncludable or null`

72 86 

73 Specify additional output data to include in the model response. Currently supported values are:87 Specify additional output data to include in the model response. Currently supported values are:


5082 5096 

5083- `prompt_cache_options: optional object { comparison_response_id, mode, prewarm, ttl }`5097- `prompt_cache_options: optional object { comparison_response_id, mode, prewarm, ttl }`

5084 5098 

5085 Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](/api/docs/guides/prompt-caching) for current details.5099 Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the [prompt caching guide](/api/docs/guides/prompt-caching) for current details.

5086 5100 

5087 - `comparison_response_id: optional string or null`5101 - `comparison_response_id: optional string or null`

5088 5102 


5100 5114 

5101 Prepares the prompt cache without generating output. Defaults to `false`. When set to `true`, overrides the `generate` field to `false`.5115 Prepares the prompt cache without generating output. Defaults to `false`. When set to `true`, overrides the `generate` field to `false`.

5102 5116 

5103 - `ttl: optional "30m"`5117 - `ttl: optional "30m" or "12h"`

5104 5118 

5105 The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to `30m`, which is currently the only supported value. The backend may retain cache entries for longer.5119 The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Supported values are `30m` (the default) and `12h`. The backend may retain cache entries for longer.

5106 5120 

5107 - `"30m"`5121 - `"30m"`

5108 5122 

5123 - `"12h"`

5124 

5109- `prompt_cache_retention: optional "in_memory" or "24h" or null`5125- `prompt_cache_retention: optional "in_memory" or "24h" or null`

5110 5126 

5111 Deprecated. Use `prompt_cache_options.ttl` instead.5127 Deprecated. Use `prompt_cache_options.ttl` instead.


6464 6480 

6465### Returns6481### Returns

6466 6482 

6467- `Response object { id, access_programs, created_at, 35 more }`6483- `Response object { id, access_programs, created_at, 36 more }`

6468 6484 

6469 - `id: string`6485 - `id: string`

6470 6486 


16074 16090 

16075 The unique ID of the conversation that this response was associated with.16091 The unique ID of the conversation that this response was associated with.

16076 16092 

16093 - `image: optional object { context_compression }`

16094 

16095 - `context_compression: "enabled" or "disabled"`

16096 

16097 Effective image context optimization policy.

16098 

16099 - `"enabled"`

16100 

16101 - `"disabled"`

16102 

16077 - `max_output_tokens: optional integer or null`16103 - `max_output_tokens: optional integer or null`

16078 16104 

16079 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/api/docs/guides/reasoning).16105 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/api/docs/guides/reasoning).


16317 16343 

16318 - `"explicit"`16344 - `"explicit"`

16319 16345 

16320 - `ttl: "30m"`16346 - `ttl: "30m" or "12h"`

16321 16347 

16322 The minimum lifetime applied to each cache breakpoint.16348 The minimum lifetime applied to each cache breakpoint.

16323 16349 

16324 - `"30m"`16350 - `"30m"`

16325 16351 

16352 - `"12h"`

16353 

16326 - `comparison_response_id: optional string or null`16354 - `comparison_response_id: optional string or null`

16327 16355 

16328 The response ID supplied as the prompt cache diagnostics comparison.16356 The response ID supplied as the prompt cache diagnostics comparison.


16636 16664 

16637 The number of input tokens.16665 The number of input tokens.

16638 16666 

16639 - `input_tokens_details: object { cache_write_tokens, cached_tokens }`16667 - `input_tokens_details: object { cache_write_tokens, cached_tokens, cache_write_tokens_details }`

16640 16668 

16641 A detailed breakdown of the input tokens.16669 A detailed breakdown of the input tokens.

16642 16670 


16649 The number of tokens that were retrieved from the cache.16677 The number of tokens that were retrieved from the cache.

16650 [More on prompt caching](/api/docs/guides/prompt-caching).16678 [More on prompt caching](/api/docs/guides/prompt-caching).

16651 16679 

16680 - `cache_write_tokens_details: optional object { ttl_12h_tokens, ttl_30m_tokens }`

16681 

16682 - `ttl_12h_tokens: integer`

16683 

16684 The number of input tokens written with 12-hour retention.

16685 

16686 - `ttl_30m_tokens: integer`

16687 

16688 The number of input tokens written with 30-minute retention.

16689 

16652 - `output_tokens: integer`16690 - `output_tokens: integer`

16653 16691 

16654 The number of output tokens.16692 The number of output tokens.


16764 "conversation": {16802 "conversation": {

16765 "id": "id"16803 "id": "id"

16766 },16804 },

16805 "image": {

16806 "context_compression": "enabled"

16807 },

16767 "moderation": {16808 "moderation": {

16768 "input": {16809 "input": {

16769 "categories": {16810 "categories": {

Details

60 60 

61### Returns61### Returns

62 62 

63- `Response object { id, access_programs, created_at, 35 more }`63- `Response object { id, access_programs, created_at, 36 more }`

64 64 

65 - `id: string`65 - `id: string`

66 66 


9670 9670 

9671 The unique ID of the conversation that this response was associated with.9671 The unique ID of the conversation that this response was associated with.

9672 9672 

9673 - `image: optional object { context_compression }`

9674 

9675 - `context_compression: "enabled" or "disabled"`

9676 

9677 Effective image context optimization policy.

9678 

9679 - `"enabled"`

9680 

9681 - `"disabled"`

9682 

9673 - `max_output_tokens: optional integer or null`9683 - `max_output_tokens: optional integer or null`

9674 9684 

9675 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/api/docs/guides/reasoning).9685 An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](/api/docs/guides/reasoning).


9913 9923 

9914 - `"explicit"`9924 - `"explicit"`

9915 9925 

9916 - `ttl: "30m"`9926 - `ttl: "30m" or "12h"`

9917 9927 

9918 The minimum lifetime applied to each cache breakpoint.9928 The minimum lifetime applied to each cache breakpoint.

9919 9929 

9920 - `"30m"`9930 - `"30m"`

9921 9931 

9932 - `"12h"`

9933 

9922 - `comparison_response_id: optional string or null`9934 - `comparison_response_id: optional string or null`

9923 9935 

9924 The response ID supplied as the prompt cache diagnostics comparison.9936 The response ID supplied as the prompt cache diagnostics comparison.


10232 10244 

10233 The number of input tokens.10245 The number of input tokens.

10234 10246 

10235 - `input_tokens_details: object { cache_write_tokens, cached_tokens }`10247 - `input_tokens_details: object { cache_write_tokens, cached_tokens, cache_write_tokens_details }`

10236 10248 

10237 A detailed breakdown of the input tokens.10249 A detailed breakdown of the input tokens.

10238 10250 


10245 The number of tokens that were retrieved from the cache.10257 The number of tokens that were retrieved from the cache.

10246 [More on prompt caching](/api/docs/guides/prompt-caching).10258 [More on prompt caching](/api/docs/guides/prompt-caching).

10247 10259 

10260 - `cache_write_tokens_details: optional object { ttl_12h_tokens, ttl_30m_tokens }`

10261 

10262 - `ttl_12h_tokens: integer`

10263 

10264 The number of input tokens written with 12-hour retention.

10265 

10266 - `ttl_30m_tokens: integer`

10267 

10268 The number of input tokens written with 30-minute retention.

10269 

10248 - `output_tokens: integer`10270 - `output_tokens: integer`

10249 10271 

10250 The number of output tokens.10272 The number of output tokens.


10358 "conversation": {10380 "conversation": {

10359 "id": "id"10381 "id": "id"

10360 },10382 },

10383 "image": {

10384 "context_compression": "enabled"

10385 },

10361 "moderation": {10386 "moderation": {

10362 "input": {10387 "input": {

10363 "categories": {10388 "categories": {