Skip to content
Primary navigation

List skill versions for a skill.

client.skills.versions.list(stringskillID, VersionListParams { after, limit, order } query?, RequestOptionsoptions?): CursorPage<SkillVersion { id, created_at, description, 4 more } >
GET/skills/{skill_id}/versions

List skill versions for a skill.

ParametersExpand Collapse
skillID: string
query: VersionListParams { after, limit, order }
after?: string

The skill version ID to start after.

limit?: number

Number of versions to retrieve.

minimum0
maximum100
order?: "asc" | "desc"

Sort order of results by version number.

One of the following:
"asc"
"desc"
ReturnsExpand Collapse
SkillVersion { id, created_at, description, 4 more }
id: string

Unique identifier for the skill version.

created_at: number

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

description: string

Description of the skill version.

name: string

Name of the skill version.

object: "skill.version"

The object type, which is skill.version.

skill_id: string

Identifier of the skill for this version.

version: string

Version number for this skill.

List skill versions for a skill.

import OpenAI from 'openai';

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

// Automatically fetches more pages as needed.
for await (const skillVersion of client.skills.versions.list('skill_123')) {
  console.log(skillVersion.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"
}