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