Skip to content

Create Skill Version

skills.versions.create(strskill_id, VersionCreateParams**kwargs) -> SkillVersion
POST/skills/{skill_id}/versions

Create Skill Version

ParametersExpand Collapse
skill_id: str
default: Optional[bool]

Whether to set this version as the default.

files: Optional[Union[SequenceNotStr[FileTypes], FileTypes]]

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

Accepts one of the following:
SequenceNotStr[FileTypes]

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

FileTypes

Skill zip file to upload.

ReturnsExpand Collapse
class SkillVersion: …
id: str

Unique identifier for the skill version.

created_at: int

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

description: str

Description of the skill version.

name: str

Name of the skill version.

object: Literal["skill.version"]

The object type, which is skill.version.

skill_id: str

Identifier of the skill for this version.

version: str

Version number for this skill.

Create Skill Version

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("OPENAI_API_KEY"),  # This is the default and can be omitted
)
skill_version = client.skills.versions.create(
    skill_id="skill_123",
)
print(skill_version.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"
}