Skip to content
Primary navigation

Create a new immutable skill version.

client.skills.versions.create(stringskillID, VersionCreateParams { _default, files } body?, RequestOptionsoptions?): SkillVersion { id, created_at, description, 4 more }
POST/skills/{skill_id}/versions

Create a new immutable skill version.

ParametersExpand Collapse
skillID: string
body: VersionCreateParams { _default, files }
_default?: boolean

Whether to set this version as the default.

files?: Array<Uploadable> | Uploadable

Skill files to upload (directory upload) or a single zip file.

One of the following:
Array<Uploadable>
Uploadable
ReturnsExpand Collapse
SkillVersion { id, created_at, description, 4 more }
id: string

Unique identifier for the skill version.

created_at: number

Unix timestamp (seconds) for when the version was created.

description: string

Description of the skill version.

name: string

Name of the skill version.

object: "skill.version"

The object type, which is skill.version.

skill_id: string

Identifier of the skill for this version.

version: string

Version number for this skill.

Create a new immutable skill version.

import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});

const skillVersion = await client.skills.versions.create('skill_123');

console.log(skillVersion.id);
{
  "id": "id",
  "created_at": 0,
  "description": "description",
  "name": "name",
  "object": "skill.version",
  "skill_id": "skill_id",
  "version": "version"
}
Returns Examples
{
  "id": "id",
  "created_at": 0,
  "description": "description",
  "name": "name",
  "object": "skill.version",
  "skill_id": "skill_id",
  "version": "version"
}