Skip to content
Primary navigation

List all skills for the current project.

client.skills.list(SkillListParams { after, limit, order } query?, RequestOptionsoptions?): CursorPage<Skill { id, created_at, default_version, 4 more } >
GET/skills

List all skills for the current project.

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

Identifier for the last item from the previous pagination request

limit?: number

Number of items to retrieve

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

Sort order of results by timestamp. Use asc for ascending order or desc for descending order.

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

Unique identifier for the skill.

created_at: number

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.

List all skills for the current project.

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 skill of client.skills.list()) {
  console.log(skill.id);
}
{
  "data": [
    {
      "id": "id",
      "created_at": 0,
      "default_version": "default_version",
      "description": "description",
      "latest_version": "latest_version",
      "name": "name",
      "object": "skill"
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id",
  "object": "list"
}
Returns Examples
{
  "data": [
    {
      "id": "id",
      "created_at": 0,
      "default_version": "default_version",
      "description": "description",
      "latest_version": "latest_version",
      "name": "name",
      "object": "skill"
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id",
  "object": "list"
}