openapi: 3.0.0 info: title: OpenAI Assistants Skills API description: The Assistants API allows you to build AI assistants within your own applications. An Assistant has instructions and can leverage models, tools, and knowledge to respond to user queries. The Assistants API currently supports three types of tools - Code Interpreter, Retrieval, and Function calling. In the future, we plan to release more OpenAI-built tools, and allow you to provide your own tools on our platform. version: 2.0.0 termsOfService: https://openai.com/policies/terms-of-use contact: name: OpenAI Support url: https://help.openai.com/ license: name: MIT url: https://github.com/openai/openai-openapi/blob/master/LICENSE servers: - url: https://api.openai.com/v1 security: - ApiKeyAuth: [] tags: - name: Skills paths: /skills: post: tags: - Skills summary: Create a new skill. operationId: CreateSkill parameters: [] requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/CreateSkillBody' application/json: schema: $ref: '#/components/schemas/CreateSkillBody' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/SkillResource' x-oaiMeta: examples: response: '' request: node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst skill = await client.skills.create();\n\nconsole.log(skill.id);" python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nskill = client.skills.create()\nprint(skill.id)" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tskill, err := client.Skills.New(context.TODO(), openai.SkillNewParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", skill.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.skills.Skill;\nimport com.openai.models.skills.SkillCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Skill skill = client.skills().create();\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") skill = openai.skills.create puts(skill)' get: tags: - Skills summary: List all skills for the current project. operationId: ListSkills parameters: - name: limit in: query description: Number of items to retrieve required: false schema: type: integer minimum: 0 maximum: 100 - name: order in: query description: Sort order of results by timestamp. Use `asc` for ascending order or `desc` for descending order. required: false schema: $ref: '#/components/schemas/OrderEnum' - name: after in: query description: Identifier for the last item from the previous pagination request required: false schema: description: Identifier for the last item from the previous pagination request type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/SkillListResource' x-oaiMeta: examples: response: '' request: node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const skill of client.skills.list()) {\n console.log(skill.id);\n}" python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.skills.list()\npage = page.data[0]\nprint(page.id)" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Skills.List(context.TODO(), openai.SkillListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.skills.SkillListPage;\nimport com.openai.models.skills.SkillListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n SkillListPage page = client.skills().list();\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") page = openai.skills.list puts(page)' /skills/{skill_id}: delete: tags: - Skills summary: Delete a skill by its ID. operationId: DeleteSkill parameters: - name: skill_id in: path description: The identifier of the skill to delete. required: true schema: example: skill_123 type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/DeletedSkillResource' x-oaiMeta: examples: response: '' request: node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst deletedSkill = await client.skills.delete('skill_123');\n\nconsole.log(deletedSkill.id);" python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\ndeleted_skill = client.skills.delete(\n \"skill_123\",\n)\nprint(deleted_skill.id)" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tdeletedSkill, err := client.Skills.Delete(context.TODO(), \"skill_123\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", deletedSkill.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.skills.DeletedSkill;\nimport com.openai.models.skills.SkillDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n DeletedSkill deletedSkill = client.skills().delete(\"skill_123\");\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") deleted_skill = openai.skills.delete("skill_123") puts(deleted_skill)' get: tags: - Skills summary: Get a skill by its ID. operationId: GetSkill parameters: - name: skill_id in: path description: The identifier of the skill to retrieve. required: true schema: example: skill_123 type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/SkillResource' x-oaiMeta: examples: response: '' request: node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst skill = await client.skills.retrieve('skill_123');\n\nconsole.log(skill.id);" python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nskill = client.skills.retrieve(\n \"skill_123\",\n)\nprint(skill.id)" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tskill, err := client.Skills.Get(context.TODO(), \"skill_123\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", skill.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.skills.Skill;\nimport com.openai.models.skills.SkillRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Skill skill = client.skills().retrieve(\"skill_123\");\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") skill = openai.skills.retrieve("skill_123") puts(skill)' post: tags: - Skills summary: Update the default version pointer for a skill. operationId: UpdateSkillDefaultVersion parameters: - name: skill_id in: path description: The identifier of the skill. required: true schema: example: skill_123 type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SetDefaultSkillVersionBody' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/SetDefaultSkillVersionBody' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/SkillResource' x-oaiMeta: examples: response: '' request: node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst skill = await client.skills.update('skill_123', { default_version: 'default_version' });\n\nconsole.log(skill.id);" python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nskill = client.skills.update(\n skill_id=\"skill_123\",\n default_version=\"default_version\",\n)\nprint(skill.id)" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tskill, err := client.Skills.Update(\n\t\tcontext.TODO(),\n\t\t\"skill_123\",\n\t\topenai.SkillUpdateParams{\n\t\t\tDefaultVersion: \"default_version\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", skill.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.skills.Skill;\nimport com.openai.models.skills.SkillUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n SkillUpdateParams params = SkillUpdateParams.builder()\n .skillId(\"skill_123\")\n .defaultVersion(\"default_version\")\n .build();\n Skill skill = client.skills().update(params);\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") skill = openai.skills.update("skill_123", default_version: "default_version") puts(skill)' /skills/{skill_id}/content: get: tags: - Skills summary: Download a skill zip bundle by its ID. operationId: GetSkillContent parameters: - name: skill_id in: path description: The identifier of the skill to download. required: true schema: example: skill_123 type: string responses: '200': description: The skill zip bundle. content: application/zip: schema: type: string format: binary application/json: schema: type: string x-oaiMeta: examples: response: '' request: node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst content = await client.skills.content.retrieve('skill_123');\n\nconsole.log(content);\n\nconst data = await content.blob();\nconsole.log(data);" python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\ncontent = client.skills.content.retrieve(\n \"skill_123\",\n)\nprint(content)\ndata = content.read()\nprint(data)" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcontent, err := client.Skills.Content.Get(context.TODO(), \"skill_123\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", content)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.http.HttpResponse;\nimport com.openai.models.skills.content.ContentRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n HttpResponse content = client.skills().content().retrieve(\"skill_123\");\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") content = openai.skills.content.retrieve("skill_123") puts(content)' /skills/{skill_id}/versions: post: tags: - Skills summary: Create a new immutable skill version. operationId: CreateSkillVersion parameters: - name: skill_id in: path description: The identifier of the skill to version. required: true schema: example: skill_123 type: string requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/CreateSkillVersionBody' application/json: schema: $ref: '#/components/schemas/CreateSkillVersionBody' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/SkillVersionResource' x-oaiMeta: examples: response: '' request: node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst skillVersion = await client.skills.versions.create('skill_123');\n\nconsole.log(skillVersion.id);" python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nskill_version = client.skills.versions.create(\n skill_id=\"skill_123\",\n)\nprint(skill_version.id)" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tskillVersion, err := client.Skills.Versions.New(\n\t\tcontext.TODO(),\n\t\t\"skill_123\",\n\t\topenai.SkillVersionNewParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", skillVersion.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.skills.versions.SkillVersion;\nimport com.openai.models.skills.versions.VersionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n SkillVersion skillVersion = client.skills().versions().create(\"skill_123\");\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") skill_version = openai.skills.versions.create("skill_123") puts(skill_version)' get: tags: - Skills summary: List skill versions for a skill. operationId: ListSkillVersions parameters: - name: skill_id in: path description: The identifier of the skill. required: true schema: example: skill_123 type: string - name: limit in: query description: Number of versions to retrieve. required: false schema: type: integer minimum: 0 maximum: 100 - name: order in: query description: Sort order of results by version number. required: false schema: $ref: '#/components/schemas/OrderEnum' - name: after in: query description: The skill version ID to start after. required: false schema: example: skillver_123 type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/SkillVersionListResource' x-oaiMeta: examples: response: '' request: node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const skillVersion of client.skills.versions.list('skill_123')) {\n console.log(skillVersion.id);\n}" python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.skills.versions.list(\n skill_id=\"skill_123\",\n)\npage = page.data[0]\nprint(page.id)" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Skills.Versions.List(\n\t\tcontext.TODO(),\n\t\t\"skill_123\",\n\t\topenai.SkillVersionListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.skills.versions.VersionListPage;\nimport com.openai.models.skills.versions.VersionListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n VersionListPage page = client.skills().versions().list(\"skill_123\");\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") page = openai.skills.versions.list("skill_123") puts(page)' /skills/{skill_id}/versions/{version}: get: tags: - Skills summary: Get a specific skill version. operationId: GetSkillVersion parameters: - name: skill_id in: path description: The identifier of the skill. required: true schema: example: skill_123 type: string - name: version in: path description: The version number to retrieve. required: true schema: description: The version number to retrieve. type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/SkillVersionResource' x-oaiMeta: examples: response: '' request: node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst skillVersion = await client.skills.versions.retrieve('version', { skill_id: 'skill_123' });\n\nconsole.log(skillVersion.id);" python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nskill_version = client.skills.versions.retrieve(\n version=\"version\",\n skill_id=\"skill_123\",\n)\nprint(skill_version.id)" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tskillVersion, err := client.Skills.Versions.Get(\n\t\tcontext.TODO(),\n\t\t\"skill_123\",\n\t\t\"version\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", skillVersion.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.skills.versions.SkillVersion;\nimport com.openai.models.skills.versions.VersionRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n VersionRetrieveParams params = VersionRetrieveParams.builder()\n .skillId(\"skill_123\")\n .version(\"version\")\n .build();\n SkillVersion skillVersion = client.skills().versions().retrieve(params);\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") skill_version = openai.skills.versions.retrieve("version", skill_id: "skill_123") puts(skill_version)' delete: tags: - Skills summary: Delete a skill version. operationId: DeleteSkillVersion parameters: - name: skill_id in: path description: The identifier of the skill. required: true schema: example: skill_123 type: string - name: version in: path description: The skill version number. required: true schema: description: The skill version number. type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/DeletedSkillVersionResource' x-oaiMeta: examples: response: '' request: node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst deletedSkillVersion = await client.skills.versions.delete('version', {\n skill_id: 'skill_123',\n});\n\nconsole.log(deletedSkillVersion.id);" python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\ndeleted_skill_version = client.skills.versions.delete(\n version=\"version\",\n skill_id=\"skill_123\",\n)\nprint(deleted_skill_version.id)" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tdeletedSkillVersion, err := client.Skills.Versions.Delete(\n\t\tcontext.TODO(),\n\t\t\"skill_123\",\n\t\t\"version\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", deletedSkillVersion.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.skills.versions.DeletedSkillVersion;\nimport com.openai.models.skills.versions.VersionDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n VersionDeleteParams params = VersionDeleteParams.builder()\n .skillId(\"skill_123\")\n .version(\"version\")\n .build();\n DeletedSkillVersion deletedSkillVersion = client.skills().versions().delete(params);\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") deleted_skill_version = openai.skills.versions.delete("version", skill_id: "skill_123") puts(deleted_skill_version)' /skills/{skill_id}/versions/{version}/content: get: tags: - Skills summary: Download a skill version zip bundle. operationId: GetSkillVersionContent parameters: - name: skill_id in: path description: The identifier of the skill. required: true schema: example: skill_123 type: string - name: version in: path description: The skill version number. required: true schema: description: The skill version number. type: string responses: '200': description: The skill zip bundle. content: application/zip: schema: type: string format: binary application/json: schema: type: string x-oaiMeta: examples: response: '' request: node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst content = await client.skills.versions.content.retrieve('version', { skill_id: 'skill_123' });\n\nconsole.log(content);\n\nconst data = await content.blob();\nconsole.log(data);" python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\ncontent = client.skills.versions.content.retrieve(\n version=\"version\",\n skill_id=\"skill_123\",\n)\nprint(content)\ndata = content.read()\nprint(data)" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcontent, err := client.Skills.Versions.Content.Get(\n\t\tcontext.TODO(),\n\t\t\"skill_123\",\n\t\t\"version\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", content)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.http.HttpResponse;\nimport com.openai.models.skills.versions.content.ContentRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ContentRetrieveParams params = ContentRetrieveParams.builder()\n .skillId(\"skill_123\")\n .version(\"version\")\n .build();\n HttpResponse content = client.skills().versions().content().retrieve(params);\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") content = openai.skills.versions.content.retrieve("version", skill_id: "skill_123") puts(content)' components: schemas: SkillVersionResource: properties: object: type: string enum: - skill.version description: The object type, which is `skill.version`. default: skill.version x-stainless-const: true id: type: string description: Unique identifier for the skill version. skill_id: type: string description: Identifier of the skill for this version. version: type: string description: Version number for this skill. created_at: type: integer format: unixtime description: Unix timestamp (seconds) for when the version was created. name: type: string description: Name of the skill version. description: type: string description: Description of the skill version. type: object required: - object - id - skill_id - version - created_at - name - description CreateSkillBody: properties: files: oneOf: - items: type: string format: binary type: array maxItems: 500 description: Skill files to upload (directory upload) or a single zip file. - type: string format: binary description: Skill zip file to upload. type: object required: - files title: Create skill request description: Uploads a skill either as a directory (multipart `files[]`) or as a single zip file. CreateSkillVersionBody: properties: files: oneOf: - items: type: string format: binary type: array maxItems: 500 description: Skill files to upload (directory upload) or a single zip file. - type: string format: binary description: Skill zip file to upload. default: type: boolean description: Whether to set this version as the default. type: object required: - files title: Create skill version request description: Uploads a new immutable version of a skill. DeletedSkillResource: properties: object: type: string enum: - skill.deleted default: skill.deleted x-stainless-const: true deleted: type: boolean id: type: string type: object required: - object - deleted - id OrderEnum: type: string enum: - asc - desc SkillResource: properties: id: type: string description: Unique identifier for the skill. object: type: string enum: - skill description: The object type, which is `skill`. default: skill x-stainless-const: true name: type: string description: Name of the skill. description: type: string description: Description of the skill. created_at: type: integer format: unixtime description: Unix timestamp (seconds) for when the skill was created. default_version: type: string description: Default version for the skill. latest_version: type: string description: Latest version for the skill. type: object required: - id - object - name - description - created_at - default_version - latest_version SkillListResource: properties: object: type: string enum: - list description: The type of object returned, must be `list`. default: list x-stainless-const: true data: items: $ref: '#/components/schemas/SkillResource' type: array description: A list of items first_id: anyOf: - type: string description: The ID of the first item in the list. - type: 'null' last_id: anyOf: - type: string description: The ID of the last item in the list. - type: 'null' has_more: type: boolean description: Whether there are more items available. type: object required: - object - data - first_id - last_id - has_more SkillVersionListResource: properties: object: type: string enum: - list description: The type of object returned, must be `list`. default: list x-stainless-const: true data: items: $ref: '#/components/schemas/SkillVersionResource' type: array description: A list of items first_id: anyOf: - type: string description: The ID of the first item in the list. - type: 'null' last_id: anyOf: - type: string description: The ID of the last item in the list. - type: 'null' has_more: type: boolean description: Whether there are more items available. type: object required: - object - data - first_id - last_id - has_more SetDefaultSkillVersionBody: properties: default_version: type: string description: The skill version number to set as default. type: object required: - default_version title: Update skill request description: Updates the default version pointer for a skill. DeletedSkillVersionResource: properties: object: type: string enum: - skill.version.deleted default: skill.version.deleted x-stainless-const: true deleted: type: boolean id: type: string version: type: string description: The deleted skill version. type: object required: - object - deleted - id - version securitySchemes: ApiKeyAuth: type: http scheme: bearer x-oaiMeta: groups: - id: audio title: Audio description: 'Learn how to turn audio into text or text into audio. Related guide: [Speech to text](/docs/guides/speech-to-text) ' sections: - type: endpoint key: createSpeech path: createSpeech - type: endpoint key: createTranscription path: createTranscription - type: endpoint key: createTranslation path: createTranslation - id: chat title: Chat description: 'Given a list of messages comprising a conversation, the model will return a response. Related guide: [Chat Completions](/docs/guides/text-generation) ' sections: - type: endpoint key: createChatCompletion path: create - type: object key: CreateChatCompletionResponse path: object - type: object key: CreateChatCompletionStreamResponse path: streaming - id: embeddings title: Embeddings description: 'Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. Related guide: [Embeddings](/docs/guides/embeddings) ' sections: - type: endpoint key: createEmbedding path: create - type: object key: Embedding path: object - id: fine-tuning title: Fine-tuning description: 'Manage fine-tuning jobs to tailor a model to your specific training data. Related guide: [Fine-tune models](/docs/guides/fine-tuning) ' sections: - type: endpoint key: createFineTuningJob path: create - type: endpoint key: listPaginatedFineTuningJobs path: list - type: endpoint key: listFineTuningEvents path: list-events - type: endpoint key: retrieveFineTuningJob path: retrieve - type: endpoint key: cancelFineTuningJob path: cancel - type: object key: FineTuningJob path: object - type: object key: FineTuningJobEvent path: event-object - id: files title: Files description: 'Files are used to upload documents that can be used with features like [Assistants](/docs/api-reference/assistants) and [Fine-tuning](/docs/api-reference/fine-tuning). ' sections: - type: endpoint key: createFile path: create - type: endpoint key: listFiles path: list - type: endpoint key: retrieveFile path: retrieve - type: endpoint key: deleteFile path: delete - type: endpoint key: downloadFile path: retrieve-contents - type: object key: OpenAIFile path: object - id: images title: Images description: 'Given a prompt and/or an input image, the model will generate a new image. Related guide: [Image generation](/docs/guides/images) ' sections: - type: endpoint key: createImage path: create - type: endpoint key: createImageEdit path: createEdit - type: endpoint key: createImageVariation path: createVariation - type: object key: Image path: object - id: models title: Models description: 'List and describe the various models available in the API. You can refer to the [Models](/docs/models) documentation to understand what models are available and the differences between them. ' sections: - type: endpoint key: listModels path: list - type: endpoint key: retrieveModel path: retrieve - type: endpoint key: deleteModel path: delete - type: object key: Model path: object - id: moderations title: Moderations description: 'Given a input text, outputs if the model classifies it as violating OpenAI''s content policy. Related guide: [Moderations](/docs/guides/moderation) ' sections: - type: endpoint key: createModeration path: create - type: object key: CreateModerationResponse path: object - id: assistants title: Assistants beta: true description: 'Build assistants that can call models and use tools to perform tasks. [Get started with the Assistants API](/docs/assistants) ' sections: - type: endpoint key: createAssistant path: createAssistant - type: endpoint key: createAssistantFile path: createAssistantFile - type: endpoint key: listAssistants path: listAssistants - type: endpoint key: listAssistantFiles path: listAssistantFiles - type: endpoint key: getAssistant path: getAssistant - type: endpoint key: getAssistantFile path: getAssistantFile - type: endpoint key: modifyAssistant path: modifyAssistant - type: endpoint key: deleteAssistant path: deleteAssistant - type: endpoint key: deleteAssistantFile path: deleteAssistantFile - type: object key: AssistantObject path: object - type: object key: AssistantFileObject path: file-object - id: threads title: Threads beta: true description: 'Create threads that assistants can interact with. Related guide: [Assistants](/docs/assistants/overview) ' sections: - type: endpoint key: createThread path: createThread - type: endpoint key: getThread path: getThread - type: endpoint key: modifyThread path: modifyThread - type: endpoint key: deleteThread path: deleteThread - type: object key: ThreadObject path: object - id: messages title: Messages beta: true description: 'Create messages within threads Related guide: [Assistants](/docs/assistants/overview) ' sections: - type: endpoint key: createMessage path: createMessage - type: endpoint key: listMessages path: listMessages - type: endpoint key: listMessageFiles path: listMessageFiles - type: endpoint key: getMessage path: getMessage - type: endpoint key: getMessageFile path: getMessageFile - type: endpoint key: modifyMessage path: modifyMessage - type: object key: MessageObject path: object - type: object key: MessageFileObject path: file-object - id: runs title: Runs beta: true description: 'Represents an execution run on a thread. Related guide: [Assistants](/docs/assistants/overview) ' sections: - type: endpoint key: createRun path: createRun - type: endpoint key: createThreadAndRun path: createThreadAndRun - type: endpoint key: listRuns path: listRuns - type: endpoint key: listRunSteps path: listRunSteps - type: endpoint key: getRun path: getRun - type: endpoint key: getRunStep path: getRunStep - type: endpoint key: modifyRun path: modifyRun - type: endpoint key: submitToolOuputsToRun path: submitToolOutputs - type: endpoint key: cancelRun path: cancelRun - type: object key: RunObject path: object - type: object key: RunStepObject path: step-object - id: completions title: Completions legacy: true description: 'Given a prompt, the model will return one or more predicted completions along with the probabilities of alternative tokens at each position. Most developer should use our [Chat Completions API](/docs/guides/text-generation/text-generation-models) to leverage our best and newest models. Most models that support the legacy Completions endpoint [will be shut off on January 4th, 2024](/docs/deprecations/2023-07-06-gpt-and-embeddings). ' sections: - type: endpoint key: createCompletion path: create - type: object key: CreateCompletionResponse path: object