cli/resources/skills/index.md +0 −922 deleted
File Deleted View Diff
1# Skills
2
3## Create a new skill.
4
5`$ openai skills create`
6
7**post** `/skills`
8
9Create a new skill.
10
11### Parameters
12
13- `--files: optional array of string or string`
14
15 Skill files to upload (directory upload) or a single zip file.
16
17### Returns
18
19- `skill: object { id, created_at, default_version, 4 more }`
20
21 - `id: string`
22
23 Unique identifier for the skill.
24
25 - `created_at: number`
26
27 Unix timestamp (seconds) for when the skill was created.
28
29 - `default_version: string`
30
31 Default version for the skill.
32
33 - `description: string`
34
35 Description of the skill.
36
37 - `latest_version: string`
38
39 Latest version for the skill.
40
41 - `name: string`
42
43 Name of the skill.
44
45 - `object: "skill"`
46
47 The object type, which is `skill`.
48
49### Example
50
51```cli
52openai skills create \
53 --api-key 'My API Key'
54```
55
56#### Response
57
58```json
59{
60 "id": "id",
61 "created_at": 0,
62 "default_version": "default_version",
63 "description": "description",
64 "latest_version": "latest_version",
65 "name": "name",
66 "object": "skill"
67}
68```
69
70## List all skills for the current project.
71
72`$ openai skills list`
73
74**get** `/skills`
75
76List all skills for the current project.
77
78### Parameters
79
80- `--after: optional string`
81
82 Identifier for the last item from the previous pagination request
83
84- `--limit: optional number`
85
86 Number of items to retrieve
87
88- `--order: optional "asc" or "desc"`
89
90 Sort order of results by timestamp. Use `asc` for ascending order or `desc` for descending order.
91
92### Returns
93
94- `skill_list: object { data, first_id, has_more, 2 more }`
95
96 - `data: array of Skill`
97
98 A list of items
99
100 - `id: string`
101
102 Unique identifier for the skill.
103
104 - `created_at: number`
105
106 Unix timestamp (seconds) for when the skill was created.
107
108 - `default_version: string`
109
110 Default version for the skill.
111
112 - `description: string`
113
114 Description of the skill.
115
116 - `latest_version: string`
117
118 Latest version for the skill.
119
120 - `name: string`
121
122 Name of the skill.
123
124 - `object: "skill"`
125
126 The object type, which is `skill`.
127
128 - `first_id: string`
129
130 The ID of the first item in the list.
131
132 - `has_more: boolean`
133
134 Whether there are more items available.
135
136 - `last_id: string`
137
138 The ID of the last item in the list.
139
140 - `object: "list"`
141
142 The type of object returned, must be `list`.
143
144### Example
145
146```cli
147openai skills list \
148 --api-key 'My API Key'
149```
150
151#### Response
152
153```json
154{
155 "data": [
156 {
157 "id": "id",
158 "created_at": 0,
159 "default_version": "default_version",
160 "description": "description",
161 "latest_version": "latest_version",
162 "name": "name",
163 "object": "skill"
164 }
165 ],
166 "first_id": "first_id",
167 "has_more": true,
168 "last_id": "last_id",
169 "object": "list"
170}
171```
172
173## Get a skill by its ID.
174
175`$ openai skills retrieve`
176
177**get** `/skills/{skill_id}`
178
179Get a skill by its ID.
180
181### Parameters
182
183- `--skill-id: string`
184
185 The identifier of the skill to retrieve.
186
187### Returns
188
189- `skill: object { id, created_at, default_version, 4 more }`
190
191 - `id: string`
192
193 Unique identifier for the skill.
194
195 - `created_at: number`
196
197 Unix timestamp (seconds) for when the skill was created.
198
199 - `default_version: string`
200
201 Default version for the skill.
202
203 - `description: string`
204
205 Description of the skill.
206
207 - `latest_version: string`
208
209 Latest version for the skill.
210
211 - `name: string`
212
213 Name of the skill.
214
215 - `object: "skill"`
216
217 The object type, which is `skill`.
218
219### Example
220
221```cli
222openai skills retrieve \
223 --api-key 'My API Key' \
224 --skill-id skill_123
225```
226
227#### Response
228
229```json
230{
231 "id": "id",
232 "created_at": 0,
233 "default_version": "default_version",
234 "description": "description",
235 "latest_version": "latest_version",
236 "name": "name",
237 "object": "skill"
238}
239```
240
241## Update the default version pointer for a skill.
242
243`$ openai skills update`
244
245**post** `/skills/{skill_id}`
246
247Update the default version pointer for a skill.
248
249### Parameters
250
251- `--skill-id: string`
252
253 The identifier of the skill.
254
255- `--default-version: string`
256
257 The skill version number to set as default.
258
259### Returns
260
261- `skill: object { id, created_at, default_version, 4 more }`
262
263 - `id: string`
264
265 Unique identifier for the skill.
266
267 - `created_at: number`
268
269 Unix timestamp (seconds) for when the skill was created.
270
271 - `default_version: string`
272
273 Default version for the skill.
274
275 - `description: string`
276
277 Description of the skill.
278
279 - `latest_version: string`
280
281 Latest version for the skill.
282
283 - `name: string`
284
285 Name of the skill.
286
287 - `object: "skill"`
288
289 The object type, which is `skill`.
290
291### Example
292
293```cli
294openai skills update \
295 --api-key 'My API Key' \
296 --skill-id skill_123 \
297 --default-version default_version
298```
299
300#### Response
301
302```json
303{
304 "id": "id",
305 "created_at": 0,
306 "default_version": "default_version",
307 "description": "description",
308 "latest_version": "latest_version",
309 "name": "name",
310 "object": "skill"
311}
312```
313
314## Delete a skill by its ID.
315
316`$ openai skills delete`
317
318**delete** `/skills/{skill_id}`
319
320Delete a skill by its ID.
321
322### Parameters
323
324- `--skill-id: string`
325
326 The identifier of the skill to delete.
327
328### Returns
329
330- `deleted_skill: object { id, deleted, object }`
331
332 - `id: string`
333
334 - `deleted: boolean`
335
336 - `object: "skill.deleted"`
337
338### Example
339
340```cli
341openai skills delete \
342 --api-key 'My API Key' \
343 --skill-id skill_123
344```
345
346#### Response
347
348```json
349{
350 "id": "id",
351 "deleted": true,
352 "object": "skill.deleted"
353}
354```
355
356## Domain Types
357
358### Deleted Skill
359
360- `deleted_skill: object { id, deleted, object }`
361
362 - `id: string`
363
364 - `deleted: boolean`
365
366 - `object: "skill.deleted"`
367
368### Skill
369
370- `skill: object { id, created_at, default_version, 4 more }`
371
372 - `id: string`
373
374 Unique identifier for the skill.
375
376 - `created_at: number`
377
378 Unix timestamp (seconds) for when the skill was created.
379
380 - `default_version: string`
381
382 Default version for the skill.
383
384 - `description: string`
385
386 Description of the skill.
387
388 - `latest_version: string`
389
390 Latest version for the skill.
391
392 - `name: string`
393
394 Name of the skill.
395
396 - `object: "skill"`
397
398 The object type, which is `skill`.
399
400### Skill List
401
402- `skill_list: object { data, first_id, has_more, 2 more }`
403
404 - `data: array of Skill`
405
406 A list of items
407
408 - `id: string`
409
410 Unique identifier for the skill.
411
412 - `created_at: number`
413
414 Unix timestamp (seconds) for when the skill was created.
415
416 - `default_version: string`
417
418 Default version for the skill.
419
420 - `description: string`
421
422 Description of the skill.
423
424 - `latest_version: string`
425
426 Latest version for the skill.
427
428 - `name: string`
429
430 Name of the skill.
431
432 - `object: "skill"`
433
434 The object type, which is `skill`.
435
436 - `first_id: string`
437
438 The ID of the first item in the list.
439
440 - `has_more: boolean`
441
442 Whether there are more items available.
443
444 - `last_id: string`
445
446 The ID of the last item in the list.
447
448 - `object: "list"`
449
450 The type of object returned, must be `list`.
451
452# Content
453
454## Download a skill zip bundle by its ID.
455
456`$ openai skills:content retrieve`
457
458**get** `/skills/{skill_id}/content`
459
460Download a skill zip bundle by its ID.
461
462### Parameters
463
464- `--skill-id: string`
465
466 The identifier of the skill to download.
467
468### Returns
469
470- `unnamed_schema_4: file path`
471
472### Example
473
474```cli
475openai skills:content retrieve \
476 --api-key 'My API Key' \
477 --skill-id skill_123
478```
479
480# Versions
481
482## Create a new immutable skill version.
483
484`$ openai skills:versions create`
485
486**post** `/skills/{skill_id}/versions`
487
488Create a new immutable skill version.
489
490### Parameters
491
492- `--skill-id: string`
493
494 The identifier of the skill to version.
495
496- `--default: optional boolean`
497
498 Whether to set this version as the default.
499
500- `--files: optional array of string or string`
501
502 Skill files to upload (directory upload) or a single zip file.
503
504### Returns
505
506- `skill_version: object { id, created_at, description, 4 more }`
507
508 - `id: string`
509
510 Unique identifier for the skill version.
511
512 - `created_at: number`
513
514 Unix timestamp (seconds) for when the version was created.
515
516 - `description: string`
517
518 Description of the skill version.
519
520 - `name: string`
521
522 Name of the skill version.
523
524 - `object: "skill.version"`
525
526 The object type, which is `skill.version`.
527
528 - `skill_id: string`
529
530 Identifier of the skill for this version.
531
532 - `version: string`
533
534 Version number for this skill.
535
536### Example
537
538```cli
539openai skills:versions create \
540 --api-key 'My API Key' \
541 --skill-id skill_123
542```
543
544#### Response
545
546```json
547{
548 "id": "id",
549 "created_at": 0,
550 "description": "description",
551 "name": "name",
552 "object": "skill.version",
553 "skill_id": "skill_id",
554 "version": "version"
555}
556```
557
558## List skill versions for a skill.
559
560`$ openai skills:versions list`
561
562**get** `/skills/{skill_id}/versions`
563
564List skill versions for a skill.
565
566### Parameters
567
568- `--skill-id: string`
569
570 The identifier of the skill.
571
572- `--after: optional string`
573
574 The skill version ID to start after.
575
576- `--limit: optional number`
577
578 Number of versions to retrieve.
579
580- `--order: optional "asc" or "desc"`
581
582 Sort order of results by version number.
583
584### Returns
585
586- `skill_version_list: object { data, first_id, has_more, 2 more }`
587
588 - `data: array of SkillVersion`
589
590 A list of items
591
592 - `id: string`
593
594 Unique identifier for the skill version.
595
596 - `created_at: number`
597
598 Unix timestamp (seconds) for when the version was created.
599
600 - `description: string`
601
602 Description of the skill version.
603
604 - `name: string`
605
606 Name of the skill version.
607
608 - `object: "skill.version"`
609
610 The object type, which is `skill.version`.
611
612 - `skill_id: string`
613
614 Identifier of the skill for this version.
615
616 - `version: string`
617
618 Version number for this skill.
619
620 - `first_id: string`
621
622 The ID of the first item in the list.
623
624 - `has_more: boolean`
625
626 Whether there are more items available.
627
628 - `last_id: string`
629
630 The ID of the last item in the list.
631
632 - `object: "list"`
633
634 The type of object returned, must be `list`.
635
636### Example
637
638```cli
639openai skills:versions list \
640 --api-key 'My API Key' \
641 --skill-id skill_123
642```
643
644#### Response
645
646```json
647{
648 "data": [
649 {
650 "id": "id",
651 "created_at": 0,
652 "description": "description",
653 "name": "name",
654 "object": "skill.version",
655 "skill_id": "skill_id",
656 "version": "version"
657 }
658 ],
659 "first_id": "first_id",
660 "has_more": true,
661 "last_id": "last_id",
662 "object": "list"
663}
664```
665
666## Get a specific skill version.
667
668`$ openai skills:versions retrieve`
669
670**get** `/skills/{skill_id}/versions/{version}`
671
672Get a specific skill version.
673
674### Parameters
675
676- `--skill-id: string`
677
678 The identifier of the skill.
679
680- `--version: string`
681
682 The version number to retrieve.
683
684### Returns
685
686- `skill_version: object { id, created_at, description, 4 more }`
687
688 - `id: string`
689
690 Unique identifier for the skill version.
691
692 - `created_at: number`
693
694 Unix timestamp (seconds) for when the version was created.
695
696 - `description: string`
697
698 Description of the skill version.
699
700 - `name: string`
701
702 Name of the skill version.
703
704 - `object: "skill.version"`
705
706 The object type, which is `skill.version`.
707
708 - `skill_id: string`
709
710 Identifier of the skill for this version.
711
712 - `version: string`
713
714 Version number for this skill.
715
716### Example
717
718```cli
719openai skills:versions retrieve \
720 --api-key 'My API Key' \
721 --skill-id skill_123 \
722 --version version
723```
724
725#### Response
726
727```json
728{
729 "id": "id",
730 "created_at": 0,
731 "description": "description",
732 "name": "name",
733 "object": "skill.version",
734 "skill_id": "skill_id",
735 "version": "version"
736}
737```
738
739## Delete a skill version.
740
741`$ openai skills:versions delete`
742
743**delete** `/skills/{skill_id}/versions/{version}`
744
745Delete a skill version.
746
747### Parameters
748
749- `--skill-id: string`
750
751 The identifier of the skill.
752
753- `--version: string`
754
755 The skill version number.
756
757### Returns
758
759- `deleted_skill_version: object { id, deleted, object, version }`
760
761 - `id: string`
762
763 - `deleted: boolean`
764
765 - `object: "skill.version.deleted"`
766
767 - `version: string`
768
769 The deleted skill version.
770
771### Example
772
773```cli
774openai skills:versions delete \
775 --api-key 'My API Key' \
776 --skill-id skill_123 \
777 --version version
778```
779
780#### Response
781
782```json
783{
784 "id": "id",
785 "deleted": true,
786 "object": "skill.version.deleted",
787 "version": "version"
788}
789```
790
791## Domain Types
792
793### Deleted Skill Version
794
795- `deleted_skill_version: object { id, deleted, object, version }`
796
797 - `id: string`
798
799 - `deleted: boolean`
800
801 - `object: "skill.version.deleted"`
802
803 - `version: string`
804
805 The deleted skill version.
806
807### Skill Version
808
809- `skill_version: object { id, created_at, description, 4 more }`
810
811 - `id: string`
812
813 Unique identifier for the skill version.
814
815 - `created_at: number`
816
817 Unix timestamp (seconds) for when the version was created.
818
819 - `description: string`
820
821 Description of the skill version.
822
823 - `name: string`
824
825 Name of the skill version.
826
827 - `object: "skill.version"`
828
829 The object type, which is `skill.version`.
830
831 - `skill_id: string`
832
833 Identifier of the skill for this version.
834
835 - `version: string`
836
837 Version number for this skill.
838
839### Skill Version List
840
841- `skill_version_list: object { data, first_id, has_more, 2 more }`
842
843 - `data: array of SkillVersion`
844
845 A list of items
846
847 - `id: string`
848
849 Unique identifier for the skill version.
850
851 - `created_at: number`
852
853 Unix timestamp (seconds) for when the version was created.
854
855 - `description: string`
856
857 Description of the skill version.
858
859 - `name: string`
860
861 Name of the skill version.
862
863 - `object: "skill.version"`
864
865 The object type, which is `skill.version`.
866
867 - `skill_id: string`
868
869 Identifier of the skill for this version.
870
871 - `version: string`
872
873 Version number for this skill.
874
875 - `first_id: string`
876
877 The ID of the first item in the list.
878
879 - `has_more: boolean`
880
881 Whether there are more items available.
882
883 - `last_id: string`
884
885 The ID of the last item in the list.
886
887 - `object: "list"`
888
889 The type of object returned, must be `list`.
890
891# Content
892
893## Download a skill version zip bundle.
894
895`$ openai skills:versions:content retrieve`
896
897**get** `/skills/{skill_id}/versions/{version}/content`
898
899Download a skill version zip bundle.
900
901### Parameters
902
903- `--skill-id: string`
904
905 The identifier of the skill.
906
907- `--version: string`
908
909 The skill version number.
910
911### Returns
912
913- `unnamed_schema_5: file path`
914
915### Example
916
917```cli
918openai skills:versions:content retrieve \
919 --api-key 'My API Key' \
920 --skill-id skill_123 \
921 --version version
922```