Skip to content

List Skill Versions

skills.versions.list(strskill_id, VersionListParams**kwargs) -> SyncCursorPage[SkillVersion]
GET/skills/{skill_id}/versions

List Skill Versions

ParametersExpand Collapse
skill_id: str
after: Optional[str]

The skill version ID to start after.

limit: Optional[int]

Number of versions to retrieve.

minimum0
maximum100
order: Optional[Literal["asc", "desc"]]

Sort order of results by version number.

Accepts one of the following:
"asc"
"desc"
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.

List Skill Versions

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("OPENAI_API_KEY"),  # This is the default and can be omitted
)
page = client.skills.versions.list(
    skill_id="skill_123",
)
page = page.data[0]
print(page.id)
{
  "data": [
    {
      "id": "id",
      "created_at": 0,
      "description": "description",
      "name": "name",
      "object": "skill.version",
      "skill_id": "skill_id",
      "version": "version"
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id",
  "object": "list"
}
Returns Examples
{
  "data": [
    {
      "id": "id",
      "created_at": 0,
      "description": "description",
      "name": "name",
      "object": "skill.version",
      "skill_id": "skill_id",
      "version": "version"
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id",
  "object": "list"
}