Skip to content

Create Skill

client.skills.create(SkillCreateParams { files } body?, RequestOptionsoptions?): Skill { id, created_at, default_version, 4 more }
POST/skills

Create Skill

ParametersExpand Collapse
body: SkillCreateParams { files }
files?: Array<Uploadable> | Uploadable

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

Accepts one of the following:
Array<Uploadable>
Uploadable
ReturnsExpand Collapse
Skill { id, created_at, default_version, 4 more }
id: string

Unique identifier for the skill.

created_at: number

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

default_version: string

Default version for the skill.

description: string

Description of the skill.

latest_version: string

Latest version for the skill.

name: string

Name of the skill.

object: "skill"

The object type, which is skill.

Create Skill

import OpenAI from 'openai';

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

const skill = await client.skills.create();

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