resources/skills/subresources/versions/methods/create/index.md +0 −84 deleted
File Deleted View Diff
1## Create a new immutable skill version.
2
3**post** `/skills/{skill_id}/versions`
4
5Create a new immutable skill version.
6
7### Path Parameters
8
9- `skill_id: string`
10
11### Body Parameters
12
13- `files: array of string or string`
14
15 Skill files to upload (directory upload) or a single zip file.
16
17 - `array of string`
18
19 Skill files to upload (directory upload) or a single zip file.
20
21 - `string`
22
23 Skill zip file to upload.
24
25- `default: optional boolean`
26
27 Whether to set this version as the default.
28
29### Returns
30
31- `SkillVersion object { id, created_at, description, 4 more }`
32
33 - `id: string`
34
35 Unique identifier for the skill version.
36
37 - `created_at: number`
38
39 Unix timestamp (seconds) for when the version was created.
40
41 - `description: string`
42
43 Description of the skill version.
44
45 - `name: string`
46
47 Name of the skill version.
48
49 - `object: "skill.version"`
50
51 The object type, which is `skill.version`.
52
53 - `"skill.version"`
54
55 - `skill_id: string`
56
57 Identifier of the skill for this version.
58
59 - `version: string`
60
61 Version number for this skill.
62
63### Example
64
65```http
66curl https://api.openai.com/v1/skills/$SKILL_ID/versions \
67 -H 'Content-Type: application/json' \
68 -H "Authorization: Bearer $OPENAI_API_KEY" \
69 -F files='["Example data"]'
70```
71
72#### Response
73
74```json
75{
76 "id": "id",
77 "created_at": 0,
78 "description": "description",
79 "name": "name",
80 "object": "skill.version",
81 "skill_id": "skill_id",
82 "version": "version"
83}
84```