Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Theme

Create Skill Version

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

Create a new immutable skill version.

Parameters
skill_id: str
default: Optional[bool]

Whether to set this version as the default.

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

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

Returns
class SkillVersion: …
id: str

Unique identifier for the skill version.

created_at: int

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

formatunixtime
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)
200 — Example
{
  "id": "id",
  "created_at": 0,
  "description": "description",
  "name": "name",
  "object": "skill.version",
  "skill_id": "skill_id",
  "version": "version"
}
Returns Examples
200 — Example
{
  "id": "id",
  "created_at": 0,
  "description": "description",
  "name": "name",
  "object": "skill.version",
  "skill_id": "skill_id",
  "version": "version"
}