resources/fine_tuning/subresources/checkpoints/index.md +0 −527 deleted
File Deleted View Diff
1# Checkpoints
2
3# Permissions
4
5## List checkpoint permissions
6
7**get** `/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions`
8
9**NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
10
11Organization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint.
12
13### Path Parameters
14
15- `fine_tuned_model_checkpoint: string`
16
17### Query Parameters
18
19- `after: optional string`
20
21 Identifier for the last permission ID from the previous pagination request.
22
23- `limit: optional number`
24
25 Number of permissions to retrieve.
26
27- `order: optional "ascending" or "descending"`
28
29 The order in which to retrieve permissions.
30
31 - `"ascending"`
32
33 - `"descending"`
34
35- `project_id: optional string`
36
37 The ID of the project to get permissions for.
38
39### Returns
40
41- `data: array of object { id, created_at, object, project_id }`
42
43 - `id: string`
44
45 The permission identifier, which can be referenced in the API endpoints.
46
47 - `created_at: number`
48
49 The Unix timestamp (in seconds) for when the permission was created.
50
51 - `object: "checkpoint.permission"`
52
53 The object type, which is always "checkpoint.permission".
54
55 - `"checkpoint.permission"`
56
57 - `project_id: string`
58
59 The project identifier that the permission is for.
60
61- `has_more: boolean`
62
63- `object: "list"`
64
65 - `"list"`
66
67- `first_id: optional string`
68
69- `last_id: optional string`
70
71### Example
72
73```http
74curl https://api.openai.com/v1/fine_tuning/checkpoints/$FINE_TUNED_MODEL_CHECKPOINT/permissions \
75 -H "Authorization: Bearer $OPENAI_API_KEY"
76```
77
78#### Response
79
80```json
81{
82 "data": [
83 {
84 "id": "id",
85 "created_at": 0,
86 "object": "checkpoint.permission",
87 "project_id": "project_id"
88 }
89 ],
90 "has_more": true,
91 "object": "list",
92 "first_id": "first_id",
93 "last_id": "last_id"
94}
95```
96
97### Example
98
99```http
100curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions \
101 -H "Authorization: Bearer $OPENAI_API_KEY"
102```
103
104#### Response
105
106```json
107{
108 "object": "list",
109 "data": [
110 {
111 "object": "checkpoint.permission",
112 "id": "cp_zc4Q7MP6XxulcVzj4MZdwsAB",
113 "created_at": 1721764867,
114 "project_id": "proj_abGMw1llN8IrBb6SvvY5A1iH"
115 },
116 {
117 "object": "checkpoint.permission",
118 "id": "cp_enQCFmOTGj3syEpYVhBRLTSy",
119 "created_at": 1721764800,
120 "project_id": "proj_iqGMw1llN8IrBb6SvvY5A1oF"
121 },
122 ],
123 "first_id": "cp_zc4Q7MP6XxulcVzj4MZdwsAB",
124 "last_id": "cp_enQCFmOTGj3syEpYVhBRLTSy",
125 "has_more": false
126}
127```
128
129## List checkpoint permissions
130
131**get** `/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions`
132
133**NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
134
135Organization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint.
136
137### Path Parameters
138
139- `fine_tuned_model_checkpoint: string`
140
141### Query Parameters
142
143- `after: optional string`
144
145 Identifier for the last permission ID from the previous pagination request.
146
147- `limit: optional number`
148
149 Number of permissions to retrieve.
150
151- `order: optional "ascending" or "descending"`
152
153 The order in which to retrieve permissions.
154
155 - `"ascending"`
156
157 - `"descending"`
158
159- `project_id: optional string`
160
161 The ID of the project to get permissions for.
162
163### Returns
164
165- `data: array of object { id, created_at, object, project_id }`
166
167 - `id: string`
168
169 The permission identifier, which can be referenced in the API endpoints.
170
171 - `created_at: number`
172
173 The Unix timestamp (in seconds) for when the permission was created.
174
175 - `object: "checkpoint.permission"`
176
177 The object type, which is always "checkpoint.permission".
178
179 - `"checkpoint.permission"`
180
181 - `project_id: string`
182
183 The project identifier that the permission is for.
184
185- `has_more: boolean`
186
187- `object: "list"`
188
189 - `"list"`
190
191- `first_id: optional string`
192
193- `last_id: optional string`
194
195### Example
196
197```http
198curl https://api.openai.com/v1/fine_tuning/checkpoints/$FINE_TUNED_MODEL_CHECKPOINT/permissions \
199 -H "Authorization: Bearer $OPENAI_API_KEY"
200```
201
202#### Response
203
204```json
205{
206 "data": [
207 {
208 "id": "id",
209 "created_at": 0,
210 "object": "checkpoint.permission",
211 "project_id": "project_id"
212 }
213 ],
214 "has_more": true,
215 "object": "list",
216 "first_id": "first_id",
217 "last_id": "last_id"
218}
219```
220
221### Example
222
223```http
224curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions \
225 -H "Authorization: Bearer $OPENAI_API_KEY"
226```
227
228#### Response
229
230```json
231{
232 "object": "list",
233 "data": [
234 {
235 "object": "checkpoint.permission",
236 "id": "cp_zc4Q7MP6XxulcVzj4MZdwsAB",
237 "created_at": 1721764867,
238 "project_id": "proj_abGMw1llN8IrBb6SvvY5A1iH"
239 },
240 {
241 "object": "checkpoint.permission",
242 "id": "cp_enQCFmOTGj3syEpYVhBRLTSy",
243 "created_at": 1721764800,
244 "project_id": "proj_iqGMw1llN8IrBb6SvvY5A1oF"
245 },
246 ],
247 "first_id": "cp_zc4Q7MP6XxulcVzj4MZdwsAB",
248 "last_id": "cp_enQCFmOTGj3syEpYVhBRLTSy",
249 "has_more": false
250}
251```
252
253## Create checkpoint permissions
254
255**post** `/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions`
256
257**NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).
258
259This enables organization owners to share fine-tuned models with other projects in their organization.
260
261### Path Parameters
262
263- `fine_tuned_model_checkpoint: string`
264
265### Body Parameters
266
267- `project_ids: array of string`
268
269 The project identifiers to grant access to.
270
271### Returns
272
273- `data: array of object { id, created_at, object, project_id }`
274
275 - `id: string`
276
277 The permission identifier, which can be referenced in the API endpoints.
278
279 - `created_at: number`
280
281 The Unix timestamp (in seconds) for when the permission was created.
282
283 - `object: "checkpoint.permission"`
284
285 The object type, which is always "checkpoint.permission".
286
287 - `"checkpoint.permission"`
288
289 - `project_id: string`
290
291 The project identifier that the permission is for.
292
293- `has_more: boolean`
294
295- `object: "list"`
296
297 - `"list"`
298
299- `first_id: optional string`
300
301- `last_id: optional string`
302
303### Example
304
305```http
306curl https://api.openai.com/v1/fine_tuning/checkpoints/$FINE_TUNED_MODEL_CHECKPOINT/permissions \
307 -H 'Content-Type: application/json' \
308 -H "Authorization: Bearer $OPENAI_API_KEY" \
309 -d '{
310 "project_ids": [
311 "string"
312 ]
313 }'
314```
315
316#### Response
317
318```json
319{
320 "data": [
321 {
322 "id": "id",
323 "created_at": 0,
324 "object": "checkpoint.permission",
325 "project_id": "project_id"
326 }
327 ],
328 "has_more": true,
329 "object": "list",
330 "first_id": "first_id",
331 "last_id": "last_id"
332}
333```
334
335### Example
336
337```http
338curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions \
339 -H "Authorization: Bearer $OPENAI_API_KEY"
340 -d '{"project_ids": ["proj_abGMw1llN8IrBb6SvvY5A1iH"]}'
341```
342
343#### Response
344
345```json
346{
347 "object": "list",
348 "data": [
349 {
350 "object": "checkpoint.permission",
351 "id": "cp_zc4Q7MP6XxulcVzj4MZdwsAB",
352 "created_at": 1721764867,
353 "project_id": "proj_abGMw1llN8IrBb6SvvY5A1iH"
354 }
355 ],
356 "first_id": "cp_zc4Q7MP6XxulcVzj4MZdwsAB",
357 "last_id": "cp_zc4Q7MP6XxulcVzj4MZdwsAB",
358 "has_more": false
359}
360```
361
362## Delete checkpoint permission
363
364**delete** `/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions/{permission_id}`
365
366**NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
367
368Organization owners can use this endpoint to delete a permission for a fine-tuned model checkpoint.
369
370### Path Parameters
371
372- `fine_tuned_model_checkpoint: string`
373
374- `permission_id: string`
375
376### Returns
377
378- `id: string`
379
380 The ID of the fine-tuned model checkpoint permission that was deleted.
381
382- `deleted: boolean`
383
384 Whether the fine-tuned model checkpoint permission was successfully deleted.
385
386- `object: "checkpoint.permission"`
387
388 The object type, which is always "checkpoint.permission".
389
390 - `"checkpoint.permission"`
391
392### Example
393
394```http
395curl https://api.openai.com/v1/fine_tuning/checkpoints/$FINE_TUNED_MODEL_CHECKPOINT/permissions/$PERMISSION_ID \
396 -X DELETE \
397 -H "Authorization: Bearer $OPENAI_API_KEY"
398```
399
400#### Response
401
402```json
403{
404 "id": "id",
405 "deleted": true,
406 "object": "checkpoint.permission"
407}
408```
409
410### Example
411
412```http
413curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions/cp_zc4Q7MP6XxulcVzj4MZdwsAB \
414 -H "Authorization: Bearer $OPENAI_API_KEY"
415```
416
417#### Response
418
419```json
420{
421 "object": "checkpoint.permission",
422 "id": "cp_zc4Q7MP6XxulcVzj4MZdwsAB",
423 "deleted": true
424}
425```
426
427## Domain Types
428
429### Permission Retrieve Response
430
431- `PermissionRetrieveResponse object { data, has_more, object, 2 more }`
432
433 - `data: array of object { id, created_at, object, project_id }`
434
435 - `id: string`
436
437 The permission identifier, which can be referenced in the API endpoints.
438
439 - `created_at: number`
440
441 The Unix timestamp (in seconds) for when the permission was created.
442
443 - `object: "checkpoint.permission"`
444
445 The object type, which is always "checkpoint.permission".
446
447 - `"checkpoint.permission"`
448
449 - `project_id: string`
450
451 The project identifier that the permission is for.
452
453 - `has_more: boolean`
454
455 - `object: "list"`
456
457 - `"list"`
458
459 - `first_id: optional string`
460
461 - `last_id: optional string`
462
463### Permission List Response
464
465- `PermissionListResponse object { id, created_at, object, project_id }`
466
467 The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.
468
469 - `id: string`
470
471 The permission identifier, which can be referenced in the API endpoints.
472
473 - `created_at: number`
474
475 The Unix timestamp (in seconds) for when the permission was created.
476
477 - `object: "checkpoint.permission"`
478
479 The object type, which is always "checkpoint.permission".
480
481 - `"checkpoint.permission"`
482
483 - `project_id: string`
484
485 The project identifier that the permission is for.
486
487### Permission Create Response
488
489- `PermissionCreateResponse object { id, created_at, object, project_id }`
490
491 The `checkpoint.permission` object represents a permission for a fine-tuned model checkpoint.
492
493 - `id: string`
494
495 The permission identifier, which can be referenced in the API endpoints.
496
497 - `created_at: number`
498
499 The Unix timestamp (in seconds) for when the permission was created.
500
501 - `object: "checkpoint.permission"`
502
503 The object type, which is always "checkpoint.permission".
504
505 - `"checkpoint.permission"`
506
507 - `project_id: string`
508
509 The project identifier that the permission is for.
510
511### Permission Delete Response
512
513- `PermissionDeleteResponse object { id, deleted, object }`
514
515 - `id: string`
516
517 The ID of the fine-tuned model checkpoint permission that was deleted.
518
519 - `deleted: boolean`
520
521 Whether the fine-tuned model checkpoint permission was successfully deleted.
522
523 - `object: "checkpoint.permission"`
524
525 The object type, which is always "checkpoint.permission".
526
527 - `"checkpoint.permission"`