Create Skill Version
client.Beta.Skills.Versions.New(ctx, skillID, params) (*BetaSkillVersion, error)POST/v1/skills/{skill_id}/versions
Create Skill Version
Parameters
Returns
Create Skill Version
package main
import (
"bytes"
"context"
"fmt"
"io"
"github.com/anthropics/anthropic-sdk-go"
"github.com/anthropics/anthropic-sdk-go/option"
)
func main() {
client := anthropic.NewClient(
option.WithAPIKey("my-anthropic-api-key"),
)
betaSkillVersion, err := client.Beta.Skills.Versions.New(
context.TODO(),
"skill_id",
anthropic.BetaSkillVersionNewParams{
Files: []io.Reader{io.Reader(bytes.NewBuffer([]byte("Example data")))},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", betaSkillVersion.ID)
}{
"id": "id",
"created_at": "2024-10-30T23:58:27.427722Z",
"description": "description",
"name": "name",
"skill_id": "skill_01JAbcdefghijklmnopqrstuvw",
"type": "skill_version"
}Returns Examples
{
"id": "id",
"created_at": "2024-10-30T23:58:27.427722Z",
"description": "description",
"name": "name",
"skill_id": "skill_01JAbcdefghijklmnopqrstuvw",
"type": "skill_version"
}