Skip to content

Create Skill

skills.create(**kwargs) -> Skill { id, created_at, default_version, 4 more }
POST/skills

Create Skill

ParametersExpand Collapse
files: Array[String] | String

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

Accepts one of the following:
Array[String]

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

String

Skill zip file to upload.

ReturnsExpand Collapse
class Skill { id, created_at, default_version, 4 more }
id: String

Unique identifier for the skill.

created_at: Integer

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

require "openai"

openai = OpenAI::Client.new(api_key: "My API Key")

skill = openai.skills.create

puts(skill)
{
  "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"
}