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

Create a new immutable skill version.

client.Skills.Versions.New(ctx, skillID, body) (*SkillVersion, error)
POST/skills/{skill_id}/versions

Create a new immutable skill version.

ParametersExpand Collapse
skillID string
body SkillVersionNewParams
ReturnsExpand Collapse
type SkillVersion struct{…}
ID string

Unique identifier for the skill version.

CreatedAt int64

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

formatunixtime
Description string

Description of the skill version.

Name string

Name of the skill version.

Object SkillVersion

The object type, which is skill.version.

SkillID string

Identifier of the skill for this version.

Version string

Version number for this skill.

Create a new immutable skill version.

package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  skillVersion, err := client.Skills.Versions.New(
    context.TODO(),
    "skill_123",
    openai.SkillVersionNewParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", skillVersion.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"
}