SpyBara
Go Premium

Reference 2026-04-28 06:15 UTC to 2026-04-30 06:13 UTC

60 files changed +1,025 −225. View all changes and history on the product overview
2026
Thu 30 06:13 Tue 28 06:15 Thu 23 05:56 Wed 15 05:55 Sat 11 05:41 Sat 4 05:38
Details

Previously: resources/organization/subresources/admin_api_keys/methods/create/index.md

10 10 

11### Returns11### Returns

12 12 

13- `id: string`13- `AdminAPIKey object { id, created_at, last_used_at, 5 more }`

14 

15 Represents an individual Admin API key in an org.

16 

17 - `id: string`

14 18 

15 The identifier, which can be referenced in API endpoints19 The identifier, which can be referenced in API endpoints

16 20 

17- `created_at: number`21 - `created_at: number`

18 22 

19 The Unix timestamp (in seconds) of when the API key was created23 The Unix timestamp (in seconds) of when the API key was created

20 24 

21- `last_used_at: number`25 - `last_used_at: number`

22 26 

23 The Unix timestamp (in seconds) of when the API key was last used27 The Unix timestamp (in seconds) of when the API key was last used

24 28 

25- `name: string`29 - `name: string`

26 30 

27 The name of the API key31 The name of the API key

28 32 

29- `object: string`33 - `object: string`

30 34 

31 The object type, which is always `organization.admin_api_key`35 The object type, which is always `organization.admin_api_key`

32 36 

33- `owner: object { id, created_at, name, 3 more }`37 - `owner: object { id, created_at, name, 3 more }`

34 38 

35 - `id: optional string`39 - `id: optional string`

36 40 


56 60 

57 Always `user`61 Always `user`

58 62 

59- `redacted_value: string`63 - `redacted_value: string`

60 64 

61 The redacted value of the API key65 The redacted value of the API key

62 66 

63- `value: optional string`67 - `value: optional string`

64 68 

65 The value of the API key. Only shown on create.69 The value of the API key. Only shown on create.

66 70 


69```http73```http

70curl https://api.openai.com/v1/organization/admin_api_keys \74curl https://api.openai.com/v1/organization/admin_api_keys \

71 -H 'Content-Type: application/json' \75 -H 'Content-Type: application/json' \

72 -H "Authorization: Bearer $OPENAI_API_KEY" \76 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

73 -d '{77 -d '{

74 "name": "New Admin Key"78 "name": "New Admin Key"

75 }'79 }'

Details

Previously: resources/organization/subresources/admin_api_keys/methods/delete/index.md

23```http23```http

24curl https://api.openai.com/v1/organization/admin_api_keys/$KEY_ID \24curl https://api.openai.com/v1/organization/admin_api_keys/$KEY_ID \

25 -X DELETE \25 -X DELETE \

26 -H "Authorization: Bearer $OPENAI_API_KEY"26 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

27```27```

28 28 

29#### Response29#### Response

Details

Previously: resources/organization/subresources/admin_api_keys/methods/list/index.md

24 24 

25### Returns25### Returns

26 26 

27- `data: optional array of object { id, created_at, last_used_at, 5 more }`27- `data: optional array of AdminAPIKey`

28 28 

29 - `id: string`29 - `id: string`

30 30 


92 92 

93```http93```http

94curl https://api.openai.com/v1/organization/admin_api_keys \94curl https://api.openai.com/v1/organization/admin_api_keys \

95 -H "Authorization: Bearer $OPENAI_API_KEY"95 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

96```96```

97 97 

98#### Response98#### Response

Details

Previously: resources/organization/subresources/admin_api_keys/methods/retrieve/index.md

12 12 

13### Returns13### Returns

14 14 

15- `id: string`15- `AdminAPIKey object { id, created_at, last_used_at, 5 more }`

16 

17 Represents an individual Admin API key in an org.

18 

19 - `id: string`

16 20 

17 The identifier, which can be referenced in API endpoints21 The identifier, which can be referenced in API endpoints

18 22 

19- `created_at: number`23 - `created_at: number`

20 24 

21 The Unix timestamp (in seconds) of when the API key was created25 The Unix timestamp (in seconds) of when the API key was created

22 26 

23- `last_used_at: number`27 - `last_used_at: number`

24 28 

25 The Unix timestamp (in seconds) of when the API key was last used29 The Unix timestamp (in seconds) of when the API key was last used

26 30 

27- `name: string`31 - `name: string`

28 32 

29 The name of the API key33 The name of the API key

30 34 

31- `object: string`35 - `object: string`

32 36 

33 The object type, which is always `organization.admin_api_key`37 The object type, which is always `organization.admin_api_key`

34 38 

35- `owner: object { id, created_at, name, 3 more }`39 - `owner: object { id, created_at, name, 3 more }`

36 40 

37 - `id: optional string`41 - `id: optional string`

38 42 


58 62 

59 Always `user`63 Always `user`

60 64 

61- `redacted_value: string`65 - `redacted_value: string`

62 66 

63 The redacted value of the API key67 The redacted value of the API key

64 68 

65- `value: optional string`69 - `value: optional string`

66 70 

67 The value of the API key. Only shown on create.71 The value of the API key. Only shown on create.

68 72 


70 74 

71```http75```http

72curl https://api.openai.com/v1/organization/admin_api_keys/$KEY_ID \76curl https://api.openai.com/v1/organization/admin_api_keys/$KEY_ID \

73 -H "Authorization: Bearer $OPENAI_API_KEY"77 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

74```78```

75 79 

76#### Response80#### Response

Details

Previously: resources/organization/subresources/audit_logs/methods/list/index.md

1064 1064 

1065```http1065```http

1066curl https://api.openai.com/v1/organization/audit_logs \1066curl https://api.openai.com/v1/organization/audit_logs \

1067 -H "Authorization: Bearer $OPENAI_API_KEY"1067 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

1068```1068```

1069 1069 

1070#### Response1070#### Response

Details

Previously: resources/organization/subresources/groups/methods/create/index.md

12 12 

13### Returns13### Returns

14 14 

15- `id: string`15- `Group object { id, created_at, is_scim_managed, name }`

16 

17 Details about an organization group.

18 

19 - `id: string`

16 20 

17 Identifier for the group.21 Identifier for the group.

18 22 

19- `created_at: number`23 - `created_at: number`

20 24 

21 Unix timestamp (in seconds) when the group was created.25 Unix timestamp (in seconds) when the group was created.

22 26 

23- `is_scim_managed: boolean`27 - `is_scim_managed: boolean`

24 28 

25 Whether the group is managed through SCIM and controlled by your identity provider.29 Whether the group is managed through SCIM and controlled by your identity provider.

26 30 

27- `name: string`31 - `name: string`

28 32 

29 Display name of the group.33 Display name of the group.

30 34 


33```http37```http

34curl https://api.openai.com/v1/organization/groups \38curl https://api.openai.com/v1/organization/groups \

35 -H 'Content-Type: application/json' \39 -H 'Content-Type: application/json' \

36 -H "Authorization: Bearer $OPENAI_API_KEY" \40 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

37 -d '{41 -d '{

38 "name": "x"42 "name": "x"

39 }'43 }'

Details

Previously: resources/organization/subresources/groups/methods/delete/index.md

29```http29```http

30curl https://api.openai.com/v1/organization/groups/$GROUP_ID \30curl https://api.openai.com/v1/organization/groups/$GROUP_ID \

31 -X DELETE \31 -X DELETE \

32 -H "Authorization: Bearer $OPENAI_API_KEY"32 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

33```33```

34 34 

35#### Response35#### Response

Details

Previously: resources/organization/subresources/groups/methods/list/index.md

24 24 

25### Returns25### Returns

26 26 

27- `data: array of object { id, created_at, is_scim_managed, name }`27- `data: array of Group`

28 28 

29 Groups returned in the current page.29 Groups returned in the current page.

30 30 


62 62 

63```http63```http

64curl https://api.openai.com/v1/organization/groups \64curl https://api.openai.com/v1/organization/groups \

65 -H "Authorization: Bearer $OPENAI_API_KEY"65 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

66```66```

67 67 

68#### Response68#### Response

Details

Previously: resources/organization/subresources/groups/methods/update/index.md

37```http37```http

38curl https://api.openai.com/v1/organization/groups/$GROUP_ID \38curl https://api.openai.com/v1/organization/groups/$GROUP_ID \

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

40 -H "Authorization: Bearer $OPENAI_API_KEY" \40 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

41 -d '{41 -d '{

42 "name": "x"42 "name": "x"

43 }'43 }'

Details

Previously: resources/organization/subresources/groups/subresources/users/methods/create/index.md

35```http35```http

36curl https://api.openai.com/v1/organization/groups/$GROUP_ID/users \36curl https://api.openai.com/v1/organization/groups/$GROUP_ID/users \

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

38 -H "Authorization: Bearer $OPENAI_API_KEY" \38 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

39 -d '{39 -d '{

40 "user_id": "user_id"40 "user_id": "user_id"

41 }'41 }'

Details

Previously: resources/organization/subresources/groups/subresources/users/methods/delete/index.md

27```http27```http

28curl https://api.openai.com/v1/organization/groups/$GROUP_ID/users/$USER_ID \28curl https://api.openai.com/v1/organization/groups/$GROUP_ID/users/$USER_ID \

29 -X DELETE \29 -X DELETE \

30 -H "Authorization: Bearer $OPENAI_API_KEY"30 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

31```31```

32 32 

33#### Response33#### Response

Details

Previously: resources/organization/subresources/groups/subresources/users/methods/list/index.md

28 28 

29### Returns29### Returns

30 30 

31- `data: array of User`31- `data: array of OrganizationUser`

32 32 

33 Users in the current page.33 Users in the current page.

34 34 


80 80 

81```http81```http

82curl https://api.openai.com/v1/organization/groups/$GROUP_ID/users \82curl https://api.openai.com/v1/organization/groups/$GROUP_ID/users \

83 -H "Authorization: Bearer $OPENAI_API_KEY"83 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

84```84```

85 85 

86#### Response86#### Response

Details

Previously: resources/organization/subresources/invites/methods/create/index.md

105```http105```http

106curl https://api.openai.com/v1/organization/invites \106curl https://api.openai.com/v1/organization/invites \

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

108 -H "Authorization: Bearer $OPENAI_API_KEY" \108 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

109 -d '{109 -d '{

110 "email": "email",110 "email": "email",

111 "role": "reader"111 "role": "reader"

Details

Previously: resources/organization/subresources/invites/methods/delete/index.md

25```http25```http

26curl https://api.openai.com/v1/organization/invites/$INVITE_ID \26curl https://api.openai.com/v1/organization/invites/$INVITE_ID \

27 -X DELETE \27 -X DELETE \

28 -H "Authorization: Bearer $OPENAI_API_KEY"28 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

29```29```

30 30 

31#### Response31#### Response

Details

Previously: resources/organization/subresources/invites/methods/list/index.md

100 100 

101```http101```http

102curl https://api.openai.com/v1/organization/invites \102curl https://api.openai.com/v1/organization/invites \

103 -H "Authorization: Bearer $OPENAI_API_KEY"103 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

104```104```

105 105 

106#### Response106#### Response

Details

Previously: resources/organization/subresources/invites/methods/retrieve/index.md

78 78 

79```http79```http

80curl https://api.openai.com/v1/organization/invites/$INVITE_ID \80curl https://api.openai.com/v1/organization/invites/$INVITE_ID \

81 -H "Authorization: Bearer $OPENAI_API_KEY"81 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

82```82```

83 83 

84#### Response84#### Response

Details

Previously: resources/organization/subresources/projects/methods/create/index.md

71```http71```http

72curl https://api.openai.com/v1/organization/projects \72curl https://api.openai.com/v1/organization/projects \

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

74 -H "Authorization: Bearer $OPENAI_API_KEY" \74 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

75 -d '{75 -d '{

76 "name": "name"76 "name": "name"

77 }'77 }'

Details

Previously: resources/organization/subresources/projects/methods/retrieve/index.md

48 48 

49```http49```http

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

51 -H "Authorization: Bearer $OPENAI_API_KEY"51 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

52```52```

53 53 

54#### Response54#### Response

Details

Previously: resources/organization/subresources/projects/methods/update/index.md

55```http55```http

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

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

58 -H "Authorization: Bearer $OPENAI_API_KEY" \58 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

59 -d '{59 -d '{

60 "name": "name"60 "name": "name"

61 }'61 }'

Details

Previously: resources/organization/subresources/projects/subresources/api_keys/methods/delete/index.md

28```http28```http

29curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/api_keys/$KEY_ID \29curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/api_keys/$KEY_ID \

30 -X DELETE \30 -X DELETE \

31 -H "Authorization: Bearer $OPENAI_API_KEY"31 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

32```32```

33 33 

34#### Response34#### Response

Details

Previously: resources/organization/subresources/projects/subresources/api_keys/methods/list/index.md

20 20 

21### Returns21### Returns

22 22 

23- `data: array of ProjectAPIEy`23- `data: array of ProjectAPIKey`

24 24 

25 - `id: string`25 - `id: string`

26 26 


136 136 

137```http137```http

138curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/api_keys \138curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/api_keys \

139 -H "Authorization: Bearer $OPENAI_API_KEY"139 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

140```140```

141 141 

142#### Response142#### Response

Details

Previously: resources/organization/subresources/projects/subresources/api_keys/methods/retrieve/index.md

12 12 

13### Returns13### Returns

14 14 

15- `ProjectAPIEy object { id, created_at, last_used_at, 4 more }`15- `ProjectAPIKey object { id, created_at, last_used_at, 4 more }`

16 16 

17 Represents an individual API key in a project.17 Represents an individual API key in a project.

18 18 


120 120 

121```http121```http

122curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/api_keys/$KEY_ID \122curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/api_keys/$KEY_ID \

123 -H "Authorization: Bearer $OPENAI_API_KEY"123 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

124```124```

125 125 

126#### Response126#### Response

Details

Previously: resources/organization/subresources/projects/subresources/groups/methods/delete/index.md

27```http27```http

28curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/groups/$GROUP_ID \28curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/groups/$GROUP_ID \

29 -X DELETE \29 -X DELETE \

30 -H "Authorization: Bearer $OPENAI_API_KEY"30 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

31```31```

32 32 

33#### Response33#### Response

Details

Previously: resources/organization/subresources/projects/subresources/groups/methods/list/index.md

28 28 

29### Returns29### Returns

30 30 

31- `data: array of object { created_at, group_id, group_name, 2 more }`31- `data: array of ProjectGroup`

32 32 

33 Project group memberships returned in the current page.33 Project group memberships returned in the current page.

34 34 


72 72 

73```http73```http

74curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/groups \74curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/groups \

75 -H "Authorization: Bearer $OPENAI_API_KEY"75 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

76```76```

77 77 

78#### Response78#### Response

Details

Previously: resources/organization/subresources/projects/subresources/groups/subresources/roles/methods/create/index.md

50 50 

51 - `"group.role"`51 - `"group.role"`

52 52 

53- `role: object { id, description, name, 4 more }`53- `role: Role`

54 54 

55 Details about a role that can be assigned through the public Roles API.55 Details about a role that can be assigned through the public Roles API.

56 56 


89```http89```http

90curl https://api.openai.com/v1/projects/$PROJECT_ID/groups/$GROUP_ID/roles \90curl https://api.openai.com/v1/projects/$PROJECT_ID/groups/$GROUP_ID/roles \

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

92 -H "Authorization: Bearer $OPENAI_API_KEY" \92 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

93 -d '{93 -d '{

94 "role_id": "role_id"94 "role_id": "role_id"

95 }'95 }'

Details

Previously: resources/organization/subresources/projects/subresources/groups/subresources/roles/methods/delete/index.md

27```http27```http

28curl https://api.openai.com/v1/projects/$PROJECT_ID/groups/$GROUP_ID/roles/$ROLE_ID \28curl https://api.openai.com/v1/projects/$PROJECT_ID/groups/$GROUP_ID/roles/$ROLE_ID \

29 -X DELETE \29 -X DELETE \

30 -H "Authorization: Bearer $OPENAI_API_KEY"30 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

31```31```

32 32 

33#### Response33#### Response

Details

Previously: resources/organization/subresources/projects/subresources/groups/subresources/roles/methods/list/index.md

96 96 

97```http97```http

98curl https://api.openai.com/v1/projects/$PROJECT_ID/groups/$GROUP_ID/roles \98curl https://api.openai.com/v1/projects/$PROJECT_ID/groups/$GROUP_ID/roles \

99 -H "Authorization: Bearer $OPENAI_API_KEY"99 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

100```100```

101 101 

102#### Response102#### Response

Details

Previously: resources/organization/subresources/projects/subresources/rate_limits/index.md

26 26 

27### Returns27### Returns

28 28 

29- `data: array of object { id, max_requests_per_1_minute, max_tokens_per_1_minute, 6 more }`29- `data: array of ProjectRateLimit`

30 30 

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

32 32 


80 80 

81```http81```http

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

83 -H "Authorization: Bearer $OPENAI_API_KEY"83 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

84```84```

85 85 

86#### Response86#### Response


176 176 

177### Returns177### Returns

178 178 

179- `id: string`179- `ProjectRateLimit object { id, max_requests_per_1_minute, max_tokens_per_1_minute, 6 more }`

180 

181 Represents a project rate limit config.

182 

183 - `id: string`

180 184 

181 The identifier, which can be referenced in API endpoints.185 The identifier, which can be referenced in API endpoints.

182 186 

183- `max_requests_per_1_minute: number`187 - `max_requests_per_1_minute: number`

184 188 

185 The maximum requests per minute.189 The maximum requests per minute.

186 190 

187- `max_tokens_per_1_minute: number`191 - `max_tokens_per_1_minute: number`

188 192 

189 The maximum tokens per minute.193 The maximum tokens per minute.

190 194 

191- `model: string`195 - `model: string`

192 196 

193 The model this rate limit applies to.197 The model this rate limit applies to.

194 198 

195- `object: "project.rate_limit"`199 - `object: "project.rate_limit"`

196 200 

197 The object type, which is always `project.rate_limit`201 The object type, which is always `project.rate_limit`

198 202 

199 - `"project.rate_limit"`203 - `"project.rate_limit"`

200 204 

201- `batch_1_day_max_input_tokens: optional number`205 - `batch_1_day_max_input_tokens: optional number`

202 206 

203 The maximum batch input tokens per day. Only present for relevant models.207 The maximum batch input tokens per day. Only present for relevant models.

204 208 

205- `max_audio_megabytes_per_1_minute: optional number`209 - `max_audio_megabytes_per_1_minute: optional number`

206 210 

207 The maximum audio megabytes per minute. Only present for relevant models.211 The maximum audio megabytes per minute. Only present for relevant models.

208 212 

209- `max_images_per_1_minute: optional number`213 - `max_images_per_1_minute: optional number`

210 214 

211 The maximum images per minute. Only present for relevant models.215 The maximum images per minute. Only present for relevant models.

212 216 

213- `max_requests_per_1_day: optional number`217 - `max_requests_per_1_day: optional number`

214 218 

215 The maximum requests per day. Only present for relevant models.219 The maximum requests per day. Only present for relevant models.

216 220 


219```http223```http

220curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/rate_limits/$RATE_LIMIT_ID \224curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/rate_limits/$RATE_LIMIT_ID \

221 -H 'Content-Type: application/json' \225 -H 'Content-Type: application/json' \

222 -H "Authorization: Bearer $OPENAI_API_KEY" \226 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

223 -d '{}'227 -d '{}'

224```228```

225 229 


265 269 

266## Domain Types270## Domain Types

267 271 

268### Rate Limit List Rate Limits Response272### Project Rate Limit

269 

270- `RateLimitListRateLimitsResponse object { id, max_requests_per_1_minute, max_tokens_per_1_minute, 6 more }`

271 

272 Represents a project rate limit config.

273 

274 - `id: string`

275 

276 The identifier, which can be referenced in API endpoints.

277 

278 - `max_requests_per_1_minute: number`

279 

280 The maximum requests per minute.

281 

282 - `max_tokens_per_1_minute: number`

283 

284 The maximum tokens per minute.

285 

286 - `model: string`

287 

288 The model this rate limit applies to.

289 

290 - `object: "project.rate_limit"`

291 

292 The object type, which is always `project.rate_limit`

293 

294 - `"project.rate_limit"`

295 

296 - `batch_1_day_max_input_tokens: optional number`

297 

298 The maximum batch input tokens per day. Only present for relevant models.

299 

300 - `max_audio_megabytes_per_1_minute: optional number`

301 

302 The maximum audio megabytes per minute. Only present for relevant models.

303 

304 - `max_images_per_1_minute: optional number`

305 

306 The maximum images per minute. Only present for relevant models.

307 

308 - `max_requests_per_1_day: optional number`

309 

310 The maximum requests per day. Only present for relevant models.

311 

312### Rate Limit Update Rate Limit Response

313 273 

314- `RateLimitUpdateRateLimitResponse object { id, max_requests_per_1_minute, max_tokens_per_1_minute, 6 more }`274- `ProjectRateLimit object { id, max_requests_per_1_minute, max_tokens_per_1_minute, 6 more }`

315 275 

316 Represents a project rate limit config.276 Represents a project rate limit config.

317 277 

Details

Previously: resources/organization/subresources/projects/subresources/roles/methods/create/index.md

24 24 

25### Returns25### Returns

26 26 

27- `id: string`27- `Role object { id, description, name, 4 more }`

28 

29 Details about a role that can be assigned through the public Roles API.

30 

31 - `id: string`

28 32 

29 Identifier for the role.33 Identifier for the role.

30 34 

31- `description: string`35 - `description: string`

32 36 

33 Optional description of the role.37 Optional description of the role.

34 38 

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

36 40 

37 Unique name for the role.41 Unique name for the role.

38 42 

39- `object: "role"`43 - `object: "role"`

40 44 

41 Always `role`.45 Always `role`.

42 46 

43 - `"role"`47 - `"role"`

44 48 

45- `permissions: array of string`49 - `permissions: array of string`

46 50 

47 Permissions granted by the role.51 Permissions granted by the role.

48 52 

49- `predefined_role: boolean`53 - `predefined_role: boolean`

50 54 

51 Whether the role is predefined and managed by OpenAI.55 Whether the role is predefined and managed by OpenAI.

52 56 

53- `resource_type: string`57 - `resource_type: string`

54 58 

55 Resource type the role is bound to (for example `api.organization` or `api.project`).59 Resource type the role is bound to (for example `api.organization` or `api.project`).

56 60 


59```http63```http

60curl https://api.openai.com/v1/projects/$PROJECT_ID/roles \64curl https://api.openai.com/v1/projects/$PROJECT_ID/roles \

61 -H 'Content-Type: application/json' \65 -H 'Content-Type: application/json' \

62 -H "Authorization: Bearer $OPENAI_API_KEY" \66 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

63 -d '{67 -d '{

64 "permissions": [68 "permissions": [

65 "string"69 "string"

Details

Previously: resources/organization/subresources/projects/subresources/roles/methods/delete/index.md

31```http31```http

32curl https://api.openai.com/v1/projects/$PROJECT_ID/roles/$ROLE_ID \32curl https://api.openai.com/v1/projects/$PROJECT_ID/roles/$ROLE_ID \

33 -X DELETE \33 -X DELETE \

34 -H "Authorization: Bearer $OPENAI_API_KEY"34 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

35```35```

36 36 

37#### Response37#### Response

Details

Previously: resources/organization/subresources/projects/subresources/roles/methods/list/index.md

28 28 

29### Returns29### Returns

30 30 

31- `data: array of object { id, description, name, 4 more }`31- `data: array of Role`

32 32 

33 Roles returned in the current page.33 Roles returned in the current page.

34 34 


80 80 

81```http81```http

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

83 -H "Authorization: Bearer $OPENAI_API_KEY"83 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

84```84```

85 85 

86#### Response86#### Response

Details

Previously: resources/organization/subresources/projects/subresources/roles/methods/update/index.md

26 26 

27### Returns27### Returns

28 28 

29- `id: string`29- `Role object { id, description, name, 4 more }`

30 

31 Details about a role that can be assigned through the public Roles API.

32 

33 - `id: string`

30 34 

31 Identifier for the role.35 Identifier for the role.

32 36 

33- `description: string`37 - `description: string`

34 38 

35 Optional description of the role.39 Optional description of the role.

36 40 

37- `name: string`41 - `name: string`

38 42 

39 Unique name for the role.43 Unique name for the role.

40 44 

41- `object: "role"`45 - `object: "role"`

42 46 

43 Always `role`.47 Always `role`.

44 48 

45 - `"role"`49 - `"role"`

46 50 

47- `permissions: array of string`51 - `permissions: array of string`

48 52 

49 Permissions granted by the role.53 Permissions granted by the role.

50 54 

51- `predefined_role: boolean`55 - `predefined_role: boolean`

52 56 

53 Whether the role is predefined and managed by OpenAI.57 Whether the role is predefined and managed by OpenAI.

54 58 

55- `resource_type: string`59 - `resource_type: string`

56 60 

57 Resource type the role is bound to (for example `api.organization` or `api.project`).61 Resource type the role is bound to (for example `api.organization` or `api.project`).

58 62 


61```http65```http

62curl https://api.openai.com/v1/projects/$PROJECT_ID/roles/$ROLE_ID \66curl https://api.openai.com/v1/projects/$PROJECT_ID/roles/$ROLE_ID \

63 -H 'Content-Type: application/json' \67 -H 'Content-Type: application/json' \

64 -H "Authorization: Bearer $OPENAI_API_KEY" \68 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

65 -d '{}'69 -d '{}'

66```70```

67 71 

Details

Previously: resources/organization/subresources/projects/subresources/service_accounts/methods/create/index.md

53```http53```http

54curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/service_accounts \54curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/service_accounts \

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

56 -H "Authorization: Bearer $OPENAI_API_KEY" \56 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

57 -d '{57 -d '{

58 "name": "name"58 "name": "name"

59 }'59 }'

Details

Previously: resources/organization/subresources/projects/subresources/service_accounts/methods/delete/index.md

28```http28```http

29curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/service_accounts/$SERVICE_ACCOUNT_ID \29curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/service_accounts/$SERVICE_ACCOUNT_ID \

30 -X DELETE \30 -X DELETE \

31 -H "Authorization: Bearer $OPENAI_API_KEY"31 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

32```32```

33 33 

34#### Response34#### Response

Details

Previously: resources/organization/subresources/projects/subresources/service_accounts/methods/list/index.md

62 62 

63```http63```http

64curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/service_accounts \64curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/service_accounts \

65 -H "Authorization: Bearer $OPENAI_API_KEY"65 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

66```66```

67 67 

68#### Response68#### Response

Details

Previously: resources/organization/subresources/projects/subresources/service_accounts/methods/retrieve/index.md

46 46 

47```http47```http

48curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/service_accounts/$SERVICE_ACCOUNT_ID \48curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/service_accounts/$SERVICE_ACCOUNT_ID \

49 -H "Authorization: Bearer $OPENAI_API_KEY"49 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

50```50```

51 51 

52#### Response52#### Response

Details

Previously: resources/organization/subresources/projects/subresources/users/methods/create/index.md

63```http63```http

64curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/users \64curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/users \

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

66 -H "Authorization: Bearer $OPENAI_API_KEY" \66 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

67 -d '{67 -d '{

68 "role": "owner",68 "role": "owner",

69 "user_id": "user_id"69 "user_id": "user_id"

Details

Previously: resources/organization/subresources/projects/subresources/users/methods/delete/index.md

28```http28```http

29curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/users/$USER_ID \29curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/users/$USER_ID \

30 -X DELETE \30 -X DELETE \

31 -H "Authorization: Bearer $OPENAI_API_KEY"31 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

32```32```

33 33 

34#### Response34#### Response

Details

Previously: resources/organization/subresources/projects/subresources/users/methods/list/index.md

64 64 

65```http65```http

66curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/users \66curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/users \

67 -H "Authorization: Bearer $OPENAI_API_KEY"67 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

68```68```

69 69 

70#### Response70#### Response

Details

Previously: resources/organization/subresources/projects/subresources/users/methods/retrieve/index.md

50 50 

51```http51```http

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

53 -H "Authorization: Bearer $OPENAI_API_KEY"53 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

54```54```

55 55 

56#### Response56#### Response

Details

Previously: resources/organization/subresources/projects/subresources/users/methods/update/index.md

61```http61```http

62curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/users/$USER_ID \62curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/users/$USER_ID \

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

64 -H "Authorization: Bearer $OPENAI_API_KEY" \64 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

65 -d '{65 -d '{

66 "role": "owner"66 "role": "owner"

67 }'67 }'

Details

Previously: resources/organization/subresources/projects/subresources/users/subresources/roles/methods/create/index.md

24 24 

25 - `"user.role"`25 - `"user.role"`

26 26 

27- `role: object { id, description, name, 4 more }`27- `role: Role`

28 28 

29 Details about a role that can be assigned through the public Roles API.29 Details about a role that can be assigned through the public Roles API.

30 30 


58 58 

59 Resource type the role is bound to (for example `api.organization` or `api.project`).59 Resource type the role is bound to (for example `api.organization` or `api.project`).

60 60 

61- `user: User`61- `user: OrganizationUser`

62 62 

63 Represents an individual `user` within an organization.63 Represents an individual `user` within an organization.

64 64 


97```http97```http

98curl https://api.openai.com/v1/projects/$PROJECT_ID/users/$USER_ID/roles \98curl https://api.openai.com/v1/projects/$PROJECT_ID/users/$USER_ID/roles \

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

100 -H "Authorization: Bearer $OPENAI_API_KEY" \100 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

101 -d '{101 -d '{

102 "role_id": "role_id"102 "role_id": "role_id"

103 }'103 }'

Details

Previously: resources/organization/subresources/projects/subresources/users/subresources/roles/methods/delete/index.md

27```http27```http

28curl https://api.openai.com/v1/projects/$PROJECT_ID/users/$USER_ID/roles/$ROLE_ID \28curl https://api.openai.com/v1/projects/$PROJECT_ID/users/$USER_ID/roles/$ROLE_ID \

29 -X DELETE \29 -X DELETE \

30 -H "Authorization: Bearer $OPENAI_API_KEY"30 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

31```31```

32 32 

33#### Response33#### Response

Details

Previously: resources/organization/subresources/projects/subresources/users/subresources/roles/methods/list/index.md

96 96 

97```http97```http

98curl https://api.openai.com/v1/projects/$PROJECT_ID/users/$USER_ID/roles \98curl https://api.openai.com/v1/projects/$PROJECT_ID/users/$USER_ID/roles \

99 -H "Authorization: Bearer $OPENAI_API_KEY"99 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

100```100```

101 101 

102#### Response102#### Response

Details

Previously: resources/organization/subresources/roles/methods/create/index.md

20 20 

21### Returns21### Returns

22 22 

23- `id: string`23- `Role object { id, description, name, 4 more }`

24 

25 Details about a role that can be assigned through the public Roles API.

26 

27 - `id: string`

24 28 

25 Identifier for the role.29 Identifier for the role.

26 30 

27- `description: string`31 - `description: string`

28 32 

29 Optional description of the role.33 Optional description of the role.

30 34 

31- `name: string`35 - `name: string`

32 36 

33 Unique name for the role.37 Unique name for the role.

34 38 

35- `object: "role"`39 - `object: "role"`

36 40 

37 Always `role`.41 Always `role`.

38 42 

39 - `"role"`43 - `"role"`

40 44 

41- `permissions: array of string`45 - `permissions: array of string`

42 46 

43 Permissions granted by the role.47 Permissions granted by the role.

44 48 

45- `predefined_role: boolean`49 - `predefined_role: boolean`

46 50 

47 Whether the role is predefined and managed by OpenAI.51 Whether the role is predefined and managed by OpenAI.

48 52 

49- `resource_type: string`53 - `resource_type: string`

50 54 

51 Resource type the role is bound to (for example `api.organization` or `api.project`).55 Resource type the role is bound to (for example `api.organization` or `api.project`).

52 56 


55```http59```http

56curl https://api.openai.com/v1/organization/roles \60curl https://api.openai.com/v1/organization/roles \

57 -H 'Content-Type: application/json' \61 -H 'Content-Type: application/json' \

58 -H "Authorization: Bearer $OPENAI_API_KEY" \62 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

59 -d '{63 -d '{

60 "permissions": [64 "permissions": [

61 "string"65 "string"

Details

Previously: resources/organization/subresources/roles/methods/delete/index.md

29```http29```http

30curl https://api.openai.com/v1/organization/roles/$ROLE_ID \30curl https://api.openai.com/v1/organization/roles/$ROLE_ID \

31 -X DELETE \31 -X DELETE \

32 -H "Authorization: Bearer $OPENAI_API_KEY"32 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

33```33```

34 34 

35#### Response35#### Response

Details

Previously: resources/organization/subresources/roles/methods/list/index.md

24 24 

25### Returns25### Returns

26 26 

27- `data: array of object { id, description, name, 4 more }`27- `data: array of Role`

28 28 

29 Roles returned in the current page.29 Roles returned in the current page.

30 30 


76 76 

77```http77```http

78curl https://api.openai.com/v1/organization/roles \78curl https://api.openai.com/v1/organization/roles \

79 -H "Authorization: Bearer $OPENAI_API_KEY"79 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

80```80```

81 81 

82#### Response82#### Response

Details

Previously: resources/organization/subresources/roles/methods/update/index.md

24 24 

25### Returns25### Returns

26 26 

27- `id: string`27- `Role object { id, description, name, 4 more }`

28 

29 Details about a role that can be assigned through the public Roles API.

30 

31 - `id: string`

28 32 

29 Identifier for the role.33 Identifier for the role.

30 34 

31- `description: string`35 - `description: string`

32 36 

33 Optional description of the role.37 Optional description of the role.

34 38 

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

36 40 

37 Unique name for the role.41 Unique name for the role.

38 42 

39- `object: "role"`43 - `object: "role"`

40 44 

41 Always `role`.45 Always `role`.

42 46 

43 - `"role"`47 - `"role"`

44 48 

45- `permissions: array of string`49 - `permissions: array of string`

46 50 

47 Permissions granted by the role.51 Permissions granted by the role.

48 52 

49- `predefined_role: boolean`53 - `predefined_role: boolean`

50 54 

51 Whether the role is predefined and managed by OpenAI.55 Whether the role is predefined and managed by OpenAI.

52 56 

53- `resource_type: string`57 - `resource_type: string`

54 58 

55 Resource type the role is bound to (for example `api.organization` or `api.project`).59 Resource type the role is bound to (for example `api.organization` or `api.project`).

56 60 


59```http63```http

60curl https://api.openai.com/v1/organization/roles/$ROLE_ID \64curl https://api.openai.com/v1/organization/roles/$ROLE_ID \

61 -H 'Content-Type: application/json' \65 -H 'Content-Type: application/json' \

62 -H "Authorization: Bearer $OPENAI_API_KEY" \66 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

63 -d '{}'67 -d '{}'

64```68```

65 69 

Details

Previously: resources/organization/subresources/usage/index.md

334 334 

335 When `group_by=project_id`, this field provides the project ID of the grouped usage result.335 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

336 336 

337 - `CostsResult object { object, amount, line_item, project_id }`337 - `CostsResult object { object, amount, api_key_id, 2 more }`

338 338 

339 The aggregated costs details of the specific time bucket.339 The aggregated costs details of the specific time bucket.

340 340 


354 354 

355 The numeric value of the cost.355 The numeric value of the cost.

356 356 

357 - `api_key_id: optional string`

358 

359 When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.

360 

357 - `line_item: optional string`361 - `line_item: optional string`

358 362 

359 When `group_by=line_item`, this field provides the line item of the grouped costs result.363 When `group_by=line_item`, this field provides the line item of the grouped costs result.


376 380 

377```http381```http

378curl https://api.openai.com/v1/organization/usage/audio_speeches \382curl https://api.openai.com/v1/organization/usage/audio_speeches \

379 -H "Authorization: Bearer $OPENAI_API_KEY"383 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

380```384```

381 385 

382#### Response386#### Response


783 787 

784 When `group_by=project_id`, this field provides the project ID of the grouped usage result.788 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

785 789 

786 - `CostsResult object { object, amount, line_item, project_id }`790 - `CostsResult object { object, amount, api_key_id, 2 more }`

787 791 

788 The aggregated costs details of the specific time bucket.792 The aggregated costs details of the specific time bucket.

789 793 


803 807 

804 The numeric value of the cost.808 The numeric value of the cost.

805 809 

810 - `api_key_id: optional string`

811 

812 When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.

813 

806 - `line_item: optional string`814 - `line_item: optional string`

807 815 

808 When `group_by=line_item`, this field provides the line item of the grouped costs result.816 When `group_by=line_item`, this field provides the line item of the grouped costs result.


825 833 

826```http834```http

827curl https://api.openai.com/v1/organization/usage/audio_transcriptions \835curl https://api.openai.com/v1/organization/usage/audio_transcriptions \

828 -H "Authorization: Bearer $OPENAI_API_KEY"836 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

829```837```

830 838 

831#### Response839#### Response


1214 1222 

1215 When `group_by=project_id`, this field provides the project ID of the grouped usage result.1223 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

1216 1224 

1217 - `CostsResult object { object, amount, line_item, project_id }`1225 - `CostsResult object { object, amount, api_key_id, 2 more }`

1218 1226 

1219 The aggregated costs details of the specific time bucket.1227 The aggregated costs details of the specific time bucket.

1220 1228 


1234 1242 

1235 The numeric value of the cost.1243 The numeric value of the cost.

1236 1244 

1245 - `api_key_id: optional string`

1246 

1247 When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.

1248 

1237 - `line_item: optional string`1249 - `line_item: optional string`

1238 1250 

1239 When `group_by=line_item`, this field provides the line item of the grouped costs result.1251 When `group_by=line_item`, this field provides the line item of the grouped costs result.


1256 1268 

1257```http1269```http

1258curl https://api.openai.com/v1/organization/usage/code_interpreter_sessions \1270curl https://api.openai.com/v1/organization/usage/code_interpreter_sessions \

1259 -H "Authorization: Bearer $OPENAI_API_KEY"1271 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

1260```1272```

1261 1273 

1262#### Response1274#### Response


1667 1679 

1668 When `group_by=project_id`, this field provides the project ID of the grouped usage result.1680 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

1669 1681 

1670 - `CostsResult object { object, amount, line_item, project_id }`1682 - `CostsResult object { object, amount, api_key_id, 2 more }`

1671 1683 

1672 The aggregated costs details of the specific time bucket.1684 The aggregated costs details of the specific time bucket.

1673 1685 


1687 1699 

1688 The numeric value of the cost.1700 The numeric value of the cost.

1689 1701 

1702 - `api_key_id: optional string`

1703 

1704 When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.

1705 

1690 - `line_item: optional string`1706 - `line_item: optional string`

1691 1707 

1692 When `group_by=line_item`, this field provides the line item of the grouped costs result.1708 When `group_by=line_item`, this field provides the line item of the grouped costs result.


1709 1725 

1710```http1726```http

1711curl https://api.openai.com/v1/organization/usage/completions \1727curl https://api.openai.com/v1/organization/usage/completions \

1712 -H "Authorization: Bearer $OPENAI_API_KEY"1728 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

1713```1729```

1714 1730 

1715#### Response1731#### Response


2122 2138 

2123 When `group_by=project_id`, this field provides the project ID of the grouped usage result.2139 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

2124 2140 

2125 - `CostsResult object { object, amount, line_item, project_id }`2141 - `CostsResult object { object, amount, api_key_id, 2 more }`

2126 2142 

2127 The aggregated costs details of the specific time bucket.2143 The aggregated costs details of the specific time bucket.

2128 2144 


2142 2158 

2143 The numeric value of the cost.2159 The numeric value of the cost.

2144 2160 

2161 - `api_key_id: optional string`

2162 

2163 When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.

2164 

2145 - `line_item: optional string`2165 - `line_item: optional string`

2146 2166 

2147 When `group_by=line_item`, this field provides the line item of the grouped costs result.2167 When `group_by=line_item`, this field provides the line item of the grouped costs result.


2164 2184 

2165```http2185```http

2166curl https://api.openai.com/v1/organization/usage/embeddings \2186curl https://api.openai.com/v1/organization/usage/embeddings \

2167 -H "Authorization: Bearer $OPENAI_API_KEY"2187 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

2168```2188```

2169 2189 

2170#### Response2190#### Response


2599 2619 

2600 When `group_by=project_id`, this field provides the project ID of the grouped usage result.2620 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

2601 2621 

2602 - `CostsResult object { object, amount, line_item, project_id }`2622 - `CostsResult object { object, amount, api_key_id, 2 more }`

2603 2623 

2604 The aggregated costs details of the specific time bucket.2624 The aggregated costs details of the specific time bucket.

2605 2625 


2619 2639 

2620 The numeric value of the cost.2640 The numeric value of the cost.

2621 2641 

2642 - `api_key_id: optional string`

2643 

2644 When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.

2645 

2622 - `line_item: optional string`2646 - `line_item: optional string`

2623 2647 

2624 When `group_by=line_item`, this field provides the line item of the grouped costs result.2648 When `group_by=line_item`, this field provides the line item of the grouped costs result.


2641 2665 

2642```http2666```http

2643curl https://api.openai.com/v1/organization/usage/images \2667curl https://api.openai.com/v1/organization/usage/images \

2644 -H "Authorization: Bearer $OPENAI_API_KEY"2668 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

2645```2669```

2646 2670 

2647#### Response2671#### Response


3050 3074 

3051 When `group_by=project_id`, this field provides the project ID of the grouped usage result.3075 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

3052 3076 

3053 - `CostsResult object { object, amount, line_item, project_id }`3077 - `CostsResult object { object, amount, api_key_id, 2 more }`

3054 3078 

3055 The aggregated costs details of the specific time bucket.3079 The aggregated costs details of the specific time bucket.

3056 3080 


3070 3094 

3071 The numeric value of the cost.3095 The numeric value of the cost.

3072 3096 

3097 - `api_key_id: optional string`

3098 

3099 When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.

3100 

3073 - `line_item: optional string`3101 - `line_item: optional string`

3074 3102 

3075 When `group_by=line_item`, this field provides the line item of the grouped costs result.3103 When `group_by=line_item`, this field provides the line item of the grouped costs result.


3092 3120 

3093```http3121```http

3094curl https://api.openai.com/v1/organization/usage/moderations \3122curl https://api.openai.com/v1/organization/usage/moderations \

3095 -H "Authorization: Bearer $OPENAI_API_KEY"3123 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

3096```3124```

3097 3125 

3098#### Response3126#### Response


3481 3509 

3482 When `group_by=project_id`, this field provides the project ID of the grouped usage result.3510 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

3483 3511 

3484 - `CostsResult object { object, amount, line_item, project_id }`3512 - `CostsResult object { object, amount, api_key_id, 2 more }`

3485 3513 

3486 The aggregated costs details of the specific time bucket.3514 The aggregated costs details of the specific time bucket.

3487 3515 


3501 3529 

3502 The numeric value of the cost.3530 The numeric value of the cost.

3503 3531 

3532 - `api_key_id: optional string`

3533 

3534 When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.

3535 

3504 - `line_item: optional string`3536 - `line_item: optional string`

3505 3537 

3506 When `group_by=line_item`, this field provides the line item of the grouped costs result.3538 When `group_by=line_item`, this field provides the line item of the grouped costs result.


3523 3555 

3524```http3556```http

3525curl https://api.openai.com/v1/organization/usage/vector_stores \3557curl https://api.openai.com/v1/organization/usage/vector_stores \

3526 -H "Authorization: Bearer $OPENAI_API_KEY"3558 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

3527```3559```

3528 3560 

3529#### Response3561#### Response


3592}3624}

3593```3625```

3594 3626 

3595## Domain Types3627## Costs

3596 3628 

3597### Usage Get Audio Speeches Response3629**get** `/organization/costs`

3598 3630 

3599- `UsageGetAudioSpeechesResponse object { data, has_more, next_page, object }`3631Get costs details for the organization.

3600 3632 

3601 - `data: array of object { end_time, object, result, start_time }`3633### Query Parameters

3634 

3635- `start_time: number`

3636 

3637 Start time (Unix seconds) of the query time range, inclusive.

3638 

3639- `api_key_ids: optional array of string`

3640 

3641 Return only costs for these API keys.

3642 

3643- `bucket_width: optional "1d"`

3644 

3645 Width of each time bucket in response. Currently only `1d` is supported, default to `1d`.

3646 

3647 - `"1d"`

3648 

3649- `end_time: optional number`

3650 

3651 End time (Unix seconds) of the query time range, exclusive.

3652 

3653- `group_by: optional array of "project_id" or "line_item" or "api_key_id"`

3654 

3655 Group the costs by the specified fields. Support fields include `project_id`, `line_item`, `api_key_id` and any combination of them.

3656 

3657 - `"project_id"`

3658 

3659 - `"line_item"`

3660 

3661 - `"api_key_id"`

3662 

3663- `limit: optional number`

3664 

3665 A limit on the number of buckets to be returned. Limit can range between 1 and 180, and the default is 7.

3666 

3667- `page: optional string`

3668 

3669 A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.

3670 

3671- `project_ids: optional array of string`

3672 

3673 Return only costs for these projects.

3674 

3675### Returns

3676 

3677- `data: array of object { end_time, object, result, start_time }`

3602 3678 

3603 - `end_time: number`3679 - `end_time: number`

3604 3680 


3864 3940 

3865 When `group_by=project_id`, this field provides the project ID of the grouped usage result.3941 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

3866 3942 

3867 - `CostsResult object { object, amount, line_item, project_id }`3943 - `CostsResult object { object, amount, api_key_id, 2 more }`

3868 3944 

3869 The aggregated costs details of the specific time bucket.3945 The aggregated costs details of the specific time bucket.

3870 3946 


3884 3960 

3885 The numeric value of the cost.3961 The numeric value of the cost.

3886 3962 

3963 - `api_key_id: optional string`

3964 

3965 When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.

3966 

3887 - `line_item: optional string`3967 - `line_item: optional string`

3888 3968 

3889 When `group_by=line_item`, this field provides the line item of the grouped costs result.3969 When `group_by=line_item`, this field provides the line item of the grouped costs result.


3894 3974 

3895 - `start_time: number`3975 - `start_time: number`

3896 3976 

3897 - `has_more: boolean`3977- `has_more: boolean`

3898 3978 

3899 - `next_page: string`3979- `next_page: string`

3900 3980 

3901 - `object: "page"`3981- `object: "page"`

3902 3982 

3903 - `"page"`3983 - `"page"`

3904 3984 

3905### Usage Get Audio Transcriptions Response3985### Example

3986 

3987```http

3988curl https://api.openai.com/v1/organization/costs \

3989 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

3990```

3991 

3992#### Response

3993 

3994```json

3995{

3996 "data": [

3997 {

3998 "end_time": 0,

3999 "object": "bucket",

4000 "result": [

4001 {

4002 "input_tokens": 0,

4003 "num_model_requests": 0,

4004 "object": "organization.usage.completions.result",

4005 "output_tokens": 0,

4006 "api_key_id": "api_key_id",

4007 "batch": true,

4008 "input_audio_tokens": 0,

4009 "input_cached_tokens": 0,

4010 "model": "model",

4011 "output_audio_tokens": 0,

4012 "project_id": "project_id",

4013 "service_tier": "service_tier",

4014 "user_id": "user_id"

4015 }

4016 ],

4017 "start_time": 0

4018 }

4019 ],

4020 "has_more": true,

4021 "next_page": "next_page",

4022 "object": "page"

4023}

4024```

4025 

4026### Example

4027 

4028```http

4029curl "https://api.openai.com/v1/organization/costs?start_time=1730419200&limit=1" \

4030-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

4031-H "Content-Type: application/json"

4032```

4033 

4034#### Response

4035 

4036```json

4037{

4038 "object": "page",

4039 "data": [

4040 {

4041 "object": "bucket",

4042 "start_time": 1730419200,

4043 "end_time": 1730505600,

4044 "results": [

4045 {

4046 "object": "organization.costs.result",

4047 "amount": {

4048 "value": 0.06,

4049 "currency": "usd"

4050 },

4051 "line_item": null,

4052 "project_id": null,

4053 "api_key_id": null

4054 }

4055 ]

4056 }

4057 ],

4058 "has_more": false,

4059 "next_page": null

4060}

4061```

4062 

4063## Domain Types

4064 

4065### Usage Audio Speeches Response

3906 4066 

3907- `UsageGetAudioTranscriptionsResponse object { data, has_more, next_page, object }`4067- `UsageAudioSpeechesResponse object { data, has_more, next_page, object }`

3908 4068 

3909 - `data: array of object { end_time, object, result, start_time }`4069 - `data: array of object { end_time, object, result, start_time }`

3910 4070 


4172 4332 

4173 When `group_by=project_id`, this field provides the project ID of the grouped usage result.4333 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

4174 4334 

4175 - `CostsResult object { object, amount, line_item, project_id }`4335 - `CostsResult object { object, amount, api_key_id, 2 more }`

4176 4336 

4177 The aggregated costs details of the specific time bucket.4337 The aggregated costs details of the specific time bucket.

4178 4338 


4192 4352 

4193 The numeric value of the cost.4353 The numeric value of the cost.

4194 4354 

4355 - `api_key_id: optional string`

4356 

4357 When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.

4358 

4195 - `line_item: optional string`4359 - `line_item: optional string`

4196 4360 

4197 When `group_by=line_item`, this field provides the line item of the grouped costs result.4361 When `group_by=line_item`, this field provides the line item of the grouped costs result.


4210 4374 

4211 - `"page"`4375 - `"page"`

4212 4376 

4213### Usage Get Code Interpreter Sessions Response4377### Usage Audio Transcriptions Response

4214 4378 

4215- `UsageGetCodeInterpreterSessionsResponse object { data, has_more, next_page, object }`4379- `UsageAudioTranscriptionsResponse object { data, has_more, next_page, object }`

4216 4380 

4217 - `data: array of object { end_time, object, result, start_time }`4381 - `data: array of object { end_time, object, result, start_time }`

4218 4382 


4480 4644 

4481 When `group_by=project_id`, this field provides the project ID of the grouped usage result.4645 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

4482 4646 

4483 - `CostsResult object { object, amount, line_item, project_id }`4647 - `CostsResult object { object, amount, api_key_id, 2 more }`

4484 4648 

4485 The aggregated costs details of the specific time bucket.4649 The aggregated costs details of the specific time bucket.

4486 4650 


4500 4664 

4501 The numeric value of the cost.4665 The numeric value of the cost.

4502 4666 

4667 - `api_key_id: optional string`

4668 

4669 When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.

4670 

4503 - `line_item: optional string`4671 - `line_item: optional string`

4504 4672 

4505 When `group_by=line_item`, this field provides the line item of the grouped costs result.4673 When `group_by=line_item`, this field provides the line item of the grouped costs result.


4518 4686 

4519 - `"page"`4687 - `"page"`

4520 4688 

4521### Usage Get Completions Response4689### Usage Code Interpreter Sessions Response

4522 4690 

4523- `UsageGetCompletionsResponse object { data, has_more, next_page, object }`4691- `UsageCodeInterpreterSessionsResponse object { data, has_more, next_page, object }`

4524 4692 

4525 - `data: array of object { end_time, object, result, start_time }`4693 - `data: array of object { end_time, object, result, start_time }`

4526 4694 


4788 4956 

4789 When `group_by=project_id`, this field provides the project ID of the grouped usage result.4957 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

4790 4958 

4791 - `CostsResult object { object, amount, line_item, project_id }`4959 - `CostsResult object { object, amount, api_key_id, 2 more }`

4792 4960 

4793 The aggregated costs details of the specific time bucket.4961 The aggregated costs details of the specific time bucket.

4794 4962 


4808 4976 

4809 The numeric value of the cost.4977 The numeric value of the cost.

4810 4978 

4979 - `api_key_id: optional string`

4980 

4981 When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.

4982 

4811 - `line_item: optional string`4983 - `line_item: optional string`

4812 4984 

4813 When `group_by=line_item`, this field provides the line item of the grouped costs result.4985 When `group_by=line_item`, this field provides the line item of the grouped costs result.


4826 4998 

4827 - `"page"`4999 - `"page"`

4828 5000 

4829### Usage Get Embeddings Response5001### Usage Completions Response

4830 5002 

4831- `UsageGetEmbeddingsResponse object { data, has_more, next_page, object }`5003- `UsageCompletionsResponse object { data, has_more, next_page, object }`

4832 5004 

4833 - `data: array of object { end_time, object, result, start_time }`5005 - `data: array of object { end_time, object, result, start_time }`

4834 5006 


5096 5268 

5097 When `group_by=project_id`, this field provides the project ID of the grouped usage result.5269 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

5098 5270 

5099 - `CostsResult object { object, amount, line_item, project_id }`5271 - `CostsResult object { object, amount, api_key_id, 2 more }`

5100 5272 

5101 The aggregated costs details of the specific time bucket.5273 The aggregated costs details of the specific time bucket.

5102 5274 


5116 5288 

5117 The numeric value of the cost.5289 The numeric value of the cost.

5118 5290 

5291 - `api_key_id: optional string`

5292 

5293 When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.

5294 

5119 - `line_item: optional string`5295 - `line_item: optional string`

5120 5296 

5121 When `group_by=line_item`, this field provides the line item of the grouped costs result.5297 When `group_by=line_item`, this field provides the line item of the grouped costs result.


5134 5310 

5135 - `"page"`5311 - `"page"`

5136 5312 

5137### Usage Get Images Response5313### Usage Embeddings Response

5138 5314 

5139- `UsageGetImagesResponse object { data, has_more, next_page, object }`5315- `UsageEmbeddingsResponse object { data, has_more, next_page, object }`

5140 5316 

5141 - `data: array of object { end_time, object, result, start_time }`5317 - `data: array of object { end_time, object, result, start_time }`

5142 5318 


5404 5580 

5405 When `group_by=project_id`, this field provides the project ID of the grouped usage result.5581 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

5406 5582 

5407 - `CostsResult object { object, amount, line_item, project_id }`5583 - `CostsResult object { object, amount, api_key_id, 2 more }`

5408 5584 

5409 The aggregated costs details of the specific time bucket.5585 The aggregated costs details of the specific time bucket.

5410 5586 


5424 5600 

5425 The numeric value of the cost.5601 The numeric value of the cost.

5426 5602 

5603 - `api_key_id: optional string`

5604 

5605 When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.

5606 

5427 - `line_item: optional string`5607 - `line_item: optional string`

5428 5608 

5429 When `group_by=line_item`, this field provides the line item of the grouped costs result.5609 When `group_by=line_item`, this field provides the line item of the grouped costs result.


5442 5622 

5443 - `"page"`5623 - `"page"`

5444 5624 

5445### Usage Get Moderations Response5625### Usage Images Response

5446 5626 

5447- `UsageGetModerationsResponse object { data, has_more, next_page, object }`5627- `UsageImagesResponse object { data, has_more, next_page, object }`

5448 5628 

5449 - `data: array of object { end_time, object, result, start_time }`5629 - `data: array of object { end_time, object, result, start_time }`

5450 5630 


5712 5892 

5713 When `group_by=project_id`, this field provides the project ID of the grouped usage result.5893 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

5714 5894 

5715 - `CostsResult object { object, amount, line_item, project_id }`5895 - `CostsResult object { object, amount, api_key_id, 2 more }`

5716 5896 

5717 The aggregated costs details of the specific time bucket.5897 The aggregated costs details of the specific time bucket.

5718 5898 


5732 5912 

5733 The numeric value of the cost.5913 The numeric value of the cost.

5734 5914 

5915 - `api_key_id: optional string`

5916 

5917 When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.

5918 

5735 - `line_item: optional string`5919 - `line_item: optional string`

5736 5920 

5737 When `group_by=line_item`, this field provides the line item of the grouped costs result.5921 When `group_by=line_item`, this field provides the line item of the grouped costs result.


5750 5934 

5751 - `"page"`5935 - `"page"`

5752 5936 

5753### Usage Get Vector Stores Response5937### Usage Moderations Response

5754 5938 

5755- `UsageGetVectorStoresResponse object { data, has_more, next_page, object }`5939- `UsageModerationsResponse object { data, has_more, next_page, object }`

5756 5940 

5757 - `data: array of object { end_time, object, result, start_time }`5941 - `data: array of object { end_time, object, result, start_time }`

5758 5942 


6020 6204 

6021 When `group_by=project_id`, this field provides the project ID of the grouped usage result.6205 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

6022 6206 

6023 - `CostsResult object { object, amount, line_item, project_id }`6207 - `CostsResult object { object, amount, api_key_id, 2 more }`

6024 6208 

6025 The aggregated costs details of the specific time bucket.6209 The aggregated costs details of the specific time bucket.

6026 6210 


6040 6224 

6041 The numeric value of the cost.6225 The numeric value of the cost.

6042 6226 

6227 - `api_key_id: optional string`

6228 

6229 When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.

6230 

6231 - `line_item: optional string`

6232 

6233 When `group_by=line_item`, this field provides the line item of the grouped costs result.

6234 

6235 - `project_id: optional string`

6236 

6237 When `group_by=project_id`, this field provides the project ID of the grouped costs result.

6238 

6239 - `start_time: number`

6240 

6241 - `has_more: boolean`

6242 

6243 - `next_page: string`

6244 

6245 - `object: "page"`

6246 

6247 - `"page"`

6248 

6249### Usage Vector Stores Response

6250 

6251- `UsageVectorStoresResponse object { data, has_more, next_page, object }`

6252 

6253 - `data: array of object { end_time, object, result, start_time }`

6254 

6255 - `end_time: number`

6256 

6257 - `object: "bucket"`

6258 

6259 - `"bucket"`

6260 

6261 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`

6262 

6263 - `UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }`

6264 

6265 The aggregated completions usage details of the specific time bucket.

6266 

6267 - `input_tokens: number`

6268 

6269 The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

6270 

6271 - `num_model_requests: number`

6272 

6273 The count of requests made to the model.

6274 

6275 - `object: "organization.usage.completions.result"`

6276 

6277 - `"organization.usage.completions.result"`

6278 

6279 - `output_tokens: number`

6280 

6281 The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

6282 

6283 - `api_key_id: optional string`

6284 

6285 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.

6286 

6287 - `batch: optional boolean`

6288 

6289 When `group_by=batch`, this field tells whether the grouped usage result is batch or not.

6290 

6291 - `input_audio_tokens: optional number`

6292 

6293 The aggregated number of audio input tokens used, including cached tokens.

6294 

6295 - `input_cached_tokens: optional number`

6296 

6297 The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.

6298 

6299 - `model: optional string`

6300 

6301 When `group_by=model`, this field provides the model name of the grouped usage result.

6302 

6303 - `output_audio_tokens: optional number`

6304 

6305 The aggregated number of audio output tokens used.

6306 

6307 - `project_id: optional string`

6308 

6309 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

6310 

6311 - `service_tier: optional string`

6312 

6313 When `group_by=service_tier`, this field provides the service tier of the grouped usage result.

6314 

6315 - `user_id: optional string`

6316 

6317 When `group_by=user_id`, this field provides the user ID of the grouped usage result.

6318 

6319 - `UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }`

6320 

6321 The aggregated embeddings usage details of the specific time bucket.

6322 

6323 - `input_tokens: number`

6324 

6325 The aggregated number of input tokens used.

6326 

6327 - `num_model_requests: number`

6328 

6329 The count of requests made to the model.

6330 

6331 - `object: "organization.usage.embeddings.result"`

6332 

6333 - `"organization.usage.embeddings.result"`

6334 

6335 - `api_key_id: optional string`

6336 

6337 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.

6338 

6339 - `model: optional string`

6340 

6341 When `group_by=model`, this field provides the model name of the grouped usage result.

6342 

6343 - `project_id: optional string`

6344 

6345 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

6346 

6347 - `user_id: optional string`

6348 

6349 When `group_by=user_id`, this field provides the user ID of the grouped usage result.

6350 

6351 - `UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }`

6352 

6353 The aggregated moderations usage details of the specific time bucket.

6354 

6355 - `input_tokens: number`

6356 

6357 The aggregated number of input tokens used.

6358 

6359 - `num_model_requests: number`

6360 

6361 The count of requests made to the model.

6362 

6363 - `object: "organization.usage.moderations.result"`

6364 

6365 - `"organization.usage.moderations.result"`

6366 

6367 - `api_key_id: optional string`

6368 

6369 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.

6370 

6371 - `model: optional string`

6372 

6373 When `group_by=model`, this field provides the model name of the grouped usage result.

6374 

6375 - `project_id: optional string`

6376 

6377 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

6378 

6379 - `user_id: optional string`

6380 

6381 When `group_by=user_id`, this field provides the user ID of the grouped usage result.

6382 

6383 - `UsageImagesResult object { images, num_model_requests, object, 6 more }`

6384 

6385 The aggregated images usage details of the specific time bucket.

6386 

6387 - `images: number`

6388 

6389 The number of images processed.

6390 

6391 - `num_model_requests: number`

6392 

6393 The count of requests made to the model.

6394 

6395 - `object: "organization.usage.images.result"`

6396 

6397 - `"organization.usage.images.result"`

6398 

6399 - `api_key_id: optional string`

6400 

6401 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.

6402 

6403 - `model: optional string`

6404 

6405 When `group_by=model`, this field provides the model name of the grouped usage result.

6406 

6407 - `project_id: optional string`

6408 

6409 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

6410 

6411 - `size: optional string`

6412 

6413 When `group_by=size`, this field provides the image size of the grouped usage result.

6414 

6415 - `source: optional string`

6416 

6417 When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`.

6418 

6419 - `user_id: optional string`

6420 

6421 When `group_by=user_id`, this field provides the user ID of the grouped usage result.

6422 

6423 - `UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }`

6424 

6425 The aggregated audio speeches usage details of the specific time bucket.

6426 

6427 - `characters: number`

6428 

6429 The number of characters processed.

6430 

6431 - `num_model_requests: number`

6432 

6433 The count of requests made to the model.

6434 

6435 - `object: "organization.usage.audio_speeches.result"`

6436 

6437 - `"organization.usage.audio_speeches.result"`

6438 

6439 - `api_key_id: optional string`

6440 

6441 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.

6442 

6443 - `model: optional string`

6444 

6445 When `group_by=model`, this field provides the model name of the grouped usage result.

6446 

6447 - `project_id: optional string`

6448 

6449 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

6450 

6451 - `user_id: optional string`

6452 

6453 When `group_by=user_id`, this field provides the user ID of the grouped usage result.

6454 

6455 - `UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }`

6456 

6457 The aggregated audio transcriptions usage details of the specific time bucket.

6458 

6459 - `num_model_requests: number`

6460 

6461 The count of requests made to the model.

6462 

6463 - `object: "organization.usage.audio_transcriptions.result"`

6464 

6465 - `"organization.usage.audio_transcriptions.result"`

6466 

6467 - `seconds: number`

6468 

6469 The number of seconds processed.

6470 

6471 - `api_key_id: optional string`

6472 

6473 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.

6474 

6475 - `model: optional string`

6476 

6477 When `group_by=model`, this field provides the model name of the grouped usage result.

6478 

6479 - `project_id: optional string`

6480 

6481 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

6482 

6483 - `user_id: optional string`

6484 

6485 When `group_by=user_id`, this field provides the user ID of the grouped usage result.

6486 

6487 - `UsageVectorStoresResult object { object, usage_bytes, project_id }`

6488 

6489 The aggregated vector stores usage details of the specific time bucket.

6490 

6491 - `object: "organization.usage.vector_stores.result"`

6492 

6493 - `"organization.usage.vector_stores.result"`

6494 

6495 - `usage_bytes: number`

6496 

6497 The vector stores usage in bytes.

6498 

6499 - `project_id: optional string`

6500 

6501 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

6502 

6503 - `UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }`

6504 

6505 The aggregated code interpreter sessions usage details of the specific time bucket.

6506 

6507 - `object: "organization.usage.code_interpreter_sessions.result"`

6508 

6509 - `"organization.usage.code_interpreter_sessions.result"`

6510 

6511 - `num_sessions: optional number`

6512 

6513 The number of code interpreter sessions.

6514 

6515 - `project_id: optional string`

6516 

6517 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

6518 

6519 - `CostsResult object { object, amount, api_key_id, 2 more }`

6520 

6521 The aggregated costs details of the specific time bucket.

6522 

6523 - `object: "organization.costs.result"`

6524 

6525 - `"organization.costs.result"`

6526 

6527 - `amount: optional object { currency, value }`

6528 

6529 The monetary value in its associated currency.

6530 

6531 - `currency: optional string`

6532 

6533 Lowercase ISO-4217 currency e.g. "usd"

6534 

6535 - `value: optional number`

6536 

6537 The numeric value of the cost.

6538 

6539 - `api_key_id: optional string`

6540 

6541 When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.

6542 

6543 - `line_item: optional string`

6544 

6545 When `group_by=line_item`, this field provides the line item of the grouped costs result.

6546 

6547 - `project_id: optional string`

6548 

6549 When `group_by=project_id`, this field provides the project ID of the grouped costs result.

6550 

6551 - `start_time: number`

6552 

6553 - `has_more: boolean`

6554 

6555 - `next_page: string`

6556 

6557 - `object: "page"`

6558 

6559 - `"page"`

6560 

6561### Usage Costs Response

6562 

6563- `UsageCostsResponse object { data, has_more, next_page, object }`

6564 

6565 - `data: array of object { end_time, object, result, start_time }`

6566 

6567 - `end_time: number`

6568 

6569 - `object: "bucket"`

6570 

6571 - `"bucket"`

6572 

6573 - `result: array of object { input_tokens, num_model_requests, object, 10 more } or object { input_tokens, num_model_requests, object, 4 more } or object { input_tokens, num_model_requests, object, 4 more } or 6 more`

6574 

6575 - `UsageCompletionsResult object { input_tokens, num_model_requests, object, 10 more }`

6576 

6577 The aggregated completions usage details of the specific time bucket.

6578 

6579 - `input_tokens: number`

6580 

6581 The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.

6582 

6583 - `num_model_requests: number`

6584 

6585 The count of requests made to the model.

6586 

6587 - `object: "organization.usage.completions.result"`

6588 

6589 - `"organization.usage.completions.result"`

6590 

6591 - `output_tokens: number`

6592 

6593 The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.

6594 

6595 - `api_key_id: optional string`

6596 

6597 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.

6598 

6599 - `batch: optional boolean`

6600 

6601 When `group_by=batch`, this field tells whether the grouped usage result is batch or not.

6602 

6603 - `input_audio_tokens: optional number`

6604 

6605 The aggregated number of audio input tokens used, including cached tokens.

6606 

6607 - `input_cached_tokens: optional number`

6608 

6609 The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.

6610 

6611 - `model: optional string`

6612 

6613 When `group_by=model`, this field provides the model name of the grouped usage result.

6614 

6615 - `output_audio_tokens: optional number`

6616 

6617 The aggregated number of audio output tokens used.

6618 

6619 - `project_id: optional string`

6620 

6621 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

6622 

6623 - `service_tier: optional string`

6624 

6625 When `group_by=service_tier`, this field provides the service tier of the grouped usage result.

6626 

6627 - `user_id: optional string`

6628 

6629 When `group_by=user_id`, this field provides the user ID of the grouped usage result.

6630 

6631 - `UsageEmbeddingsResult object { input_tokens, num_model_requests, object, 4 more }`

6632 

6633 The aggregated embeddings usage details of the specific time bucket.

6634 

6635 - `input_tokens: number`

6636 

6637 The aggregated number of input tokens used.

6638 

6639 - `num_model_requests: number`

6640 

6641 The count of requests made to the model.

6642 

6643 - `object: "organization.usage.embeddings.result"`

6644 

6645 - `"organization.usage.embeddings.result"`

6646 

6647 - `api_key_id: optional string`

6648 

6649 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.

6650 

6651 - `model: optional string`

6652 

6653 When `group_by=model`, this field provides the model name of the grouped usage result.

6654 

6655 - `project_id: optional string`

6656 

6657 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

6658 

6659 - `user_id: optional string`

6660 

6661 When `group_by=user_id`, this field provides the user ID of the grouped usage result.

6662 

6663 - `UsageModerationsResult object { input_tokens, num_model_requests, object, 4 more }`

6664 

6665 The aggregated moderations usage details of the specific time bucket.

6666 

6667 - `input_tokens: number`

6668 

6669 The aggregated number of input tokens used.

6670 

6671 - `num_model_requests: number`

6672 

6673 The count of requests made to the model.

6674 

6675 - `object: "organization.usage.moderations.result"`

6676 

6677 - `"organization.usage.moderations.result"`

6678 

6679 - `api_key_id: optional string`

6680 

6681 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.

6682 

6683 - `model: optional string`

6684 

6685 When `group_by=model`, this field provides the model name of the grouped usage result.

6686 

6687 - `project_id: optional string`

6688 

6689 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

6690 

6691 - `user_id: optional string`

6692 

6693 When `group_by=user_id`, this field provides the user ID of the grouped usage result.

6694 

6695 - `UsageImagesResult object { images, num_model_requests, object, 6 more }`

6696 

6697 The aggregated images usage details of the specific time bucket.

6698 

6699 - `images: number`

6700 

6701 The number of images processed.

6702 

6703 - `num_model_requests: number`

6704 

6705 The count of requests made to the model.

6706 

6707 - `object: "organization.usage.images.result"`

6708 

6709 - `"organization.usage.images.result"`

6710 

6711 - `api_key_id: optional string`

6712 

6713 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.

6714 

6715 - `model: optional string`

6716 

6717 When `group_by=model`, this field provides the model name of the grouped usage result.

6718 

6719 - `project_id: optional string`

6720 

6721 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

6722 

6723 - `size: optional string`

6724 

6725 When `group_by=size`, this field provides the image size of the grouped usage result.

6726 

6727 - `source: optional string`

6728 

6729 When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`.

6730 

6731 - `user_id: optional string`

6732 

6733 When `group_by=user_id`, this field provides the user ID of the grouped usage result.

6734 

6735 - `UsageAudioSpeechesResult object { characters, num_model_requests, object, 4 more }`

6736 

6737 The aggregated audio speeches usage details of the specific time bucket.

6738 

6739 - `characters: number`

6740 

6741 The number of characters processed.

6742 

6743 - `num_model_requests: number`

6744 

6745 The count of requests made to the model.

6746 

6747 - `object: "organization.usage.audio_speeches.result"`

6748 

6749 - `"organization.usage.audio_speeches.result"`

6750 

6751 - `api_key_id: optional string`

6752 

6753 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.

6754 

6755 - `model: optional string`

6756 

6757 When `group_by=model`, this field provides the model name of the grouped usage result.

6758 

6759 - `project_id: optional string`

6760 

6761 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

6762 

6763 - `user_id: optional string`

6764 

6765 When `group_by=user_id`, this field provides the user ID of the grouped usage result.

6766 

6767 - `UsageAudioTranscriptionsResult object { num_model_requests, object, seconds, 4 more }`

6768 

6769 The aggregated audio transcriptions usage details of the specific time bucket.

6770 

6771 - `num_model_requests: number`

6772 

6773 The count of requests made to the model.

6774 

6775 - `object: "organization.usage.audio_transcriptions.result"`

6776 

6777 - `"organization.usage.audio_transcriptions.result"`

6778 

6779 - `seconds: number`

6780 

6781 The number of seconds processed.

6782 

6783 - `api_key_id: optional string`

6784 

6785 When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.

6786 

6787 - `model: optional string`

6788 

6789 When `group_by=model`, this field provides the model name of the grouped usage result.

6790 

6791 - `project_id: optional string`

6792 

6793 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

6794 

6795 - `user_id: optional string`

6796 

6797 When `group_by=user_id`, this field provides the user ID of the grouped usage result.

6798 

6799 - `UsageVectorStoresResult object { object, usage_bytes, project_id }`

6800 

6801 The aggregated vector stores usage details of the specific time bucket.

6802 

6803 - `object: "organization.usage.vector_stores.result"`

6804 

6805 - `"organization.usage.vector_stores.result"`

6806 

6807 - `usage_bytes: number`

6808 

6809 The vector stores usage in bytes.

6810 

6811 - `project_id: optional string`

6812 

6813 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

6814 

6815 - `UsageCodeInterpreterSessionsResult object { object, num_sessions, project_id }`

6816 

6817 The aggregated code interpreter sessions usage details of the specific time bucket.

6818 

6819 - `object: "organization.usage.code_interpreter_sessions.result"`

6820 

6821 - `"organization.usage.code_interpreter_sessions.result"`

6822 

6823 - `num_sessions: optional number`

6824 

6825 The number of code interpreter sessions.

6826 

6827 - `project_id: optional string`

6828 

6829 When `group_by=project_id`, this field provides the project ID of the grouped usage result.

6830 

6831 - `CostsResult object { object, amount, api_key_id, 2 more }`

6832 

6833 The aggregated costs details of the specific time bucket.

6834 

6835 - `object: "organization.costs.result"`

6836 

6837 - `"organization.costs.result"`

6838 

6839 - `amount: optional object { currency, value }`

6840 

6841 The monetary value in its associated currency.

6842 

6843 - `currency: optional string`

6844 

6845 Lowercase ISO-4217 currency e.g. "usd"

6846 

6847 - `value: optional number`

6848 

6849 The numeric value of the cost.

6850 

6851 - `api_key_id: optional string`

6852 

6853 When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.

6854 

6043 - `line_item: optional string`6855 - `line_item: optional string`

6044 6856 

6045 When `group_by=line_item`, this field provides the line item of the grouped costs result.6857 When `group_by=line_item`, this field provides the line item of the grouped costs result.

Details

Previously: resources/organization/subresources/users/methods/delete/index.md

23```http23```http

24curl https://api.openai.com/v1/organization/users/$USER_ID \24curl https://api.openai.com/v1/organization/users/$USER_ID \

25 -X DELETE \25 -X DELETE \

26 -H "Authorization: Bearer $OPENAI_API_KEY"26 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

27```27```

28 28 

29#### Response29#### Response

Details

Previously: resources/organization/subresources/users/methods/list/index.md

20 20 

21### Returns21### Returns

22 22 

23- `data: array of User`23- `data: array of OrganizationUser`

24 24 

25 - `id: string`25 - `id: string`

26 26 


66 66 

67```http67```http

68curl https://api.openai.com/v1/organization/users \68curl https://api.openai.com/v1/organization/users \

69 -H "Authorization: Bearer $OPENAI_API_KEY"69 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

70```70```

71 71 

72#### Response72#### Response

Details

Previously: resources/organization/subresources/users/methods/retrieve/index.md

10 10 

11### Returns11### Returns

12 12 

13- `User object { id, added_at, email, 3 more }`13- `OrganizationUser object { id, added_at, email, 3 more }`

14 14 

15 Represents an individual `user` within an organization.15 Represents an individual `user` within an organization.

16 16 


48 48 

49```http49```http

50curl https://api.openai.com/v1/organization/users/$USER_ID \50curl https://api.openai.com/v1/organization/users/$USER_ID \

51 -H "Authorization: Bearer $OPENAI_API_KEY"51 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

52```52```

53 53 

54#### Response54#### Response

Details

Previously: resources/organization/subresources/users/methods/update/index.md

20 20 

21### Returns21### Returns

22 22 

23- `User object { id, added_at, email, 3 more }`23- `OrganizationUser object { id, added_at, email, 3 more }`

24 24 

25 Represents an individual `user` within an organization.25 Represents an individual `user` within an organization.

26 26 


59```http59```http

60curl https://api.openai.com/v1/organization/users/$USER_ID \60curl https://api.openai.com/v1/organization/users/$USER_ID \

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

62 -H "Authorization: Bearer $OPENAI_API_KEY" \62 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

63 -d '{63 -d '{

64 "role": "owner"64 "role": "owner"

65 }'65 }'

Details

Previously: resources/organization/subresources/users/subresources/roles/methods/create/index.md

22 22 

23 - `"user.role"`23 - `"user.role"`

24 24 

25- `role: object { id, description, name, 4 more }`25- `role: Role`

26 26 

27 Details about a role that can be assigned through the public Roles API.27 Details about a role that can be assigned through the public Roles API.

28 28 


56 56 

57 Resource type the role is bound to (for example `api.organization` or `api.project`).57 Resource type the role is bound to (for example `api.organization` or `api.project`).

58 58 

59- `user: User`59- `user: OrganizationUser`

60 60 

61 Represents an individual `user` within an organization.61 Represents an individual `user` within an organization.

62 62 


95```http95```http

96curl https://api.openai.com/v1/organization/users/$USER_ID/roles \96curl https://api.openai.com/v1/organization/users/$USER_ID/roles \

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

98 -H "Authorization: Bearer $OPENAI_API_KEY" \98 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

99 -d '{99 -d '{

100 "role_id": "role_id"100 "role_id": "role_id"

101 }'101 }'

Details

Previously: resources/organization/subresources/users/subresources/roles/methods/delete/index.md

25```http25```http

26curl https://api.openai.com/v1/organization/users/$USER_ID/roles/$ROLE_ID \26curl https://api.openai.com/v1/organization/users/$USER_ID/roles/$ROLE_ID \

27 -X DELETE \27 -X DELETE \

28 -H "Authorization: Bearer $OPENAI_API_KEY"28 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

29```29```

30 30 

31#### Response31#### Response

Details

Previously: resources/organization/subresources/users/subresources/roles/methods/list/index.md

94 94 

95```http95```http

96curl https://api.openai.com/v1/organization/users/$USER_ID/roles \96curl https://api.openai.com/v1/organization/users/$USER_ID/roles \

97 -H "Authorization: Bearer $OPENAI_API_KEY"97 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

98```98```

99 99 

100#### Response100#### Response

Details

2069 "testing_criteria": "testing_criteria"2069 "testing_criteria": "testing_criteria"

2070 }2070 }

2071 ],2071 ],

2072 "report_url": "report_url",2072 "report_url": "https://example.com",

2073 "result_counts": {2073 "result_counts": {

2074 "errored": 0,2074 "errored": 0,

2075 "failed": 0,2075 "failed": 0,

Details

131 {131 {

132 "b64_json": "b64_json",132 "b64_json": "b64_json",

133 "revised_prompt": "revised_prompt",133 "revised_prompt": "revised_prompt",

134 "url": "url"134 "url": "https://example.com"

135 }135 }

136 ],136 ],

137 "output_format": "png",137 "output_format": "png",