# Beta.Skills ## Overview ### Available Operations * [list](#list) - ListSkills * [create](#create) - CreateSkill * [get](#get) - GetSkill * [delete](#delete) - DeleteSkill * [updateMetadata](#updatemetadata) - UpdateSkill * [listVersions](#listversions) - ListSkillVersions * [createVersion](#createversion) - CreateSkillVersion * [getVersion](#getversion) - GetSkillVersion * [updateVersionMetadata](#updateversionmetadata) - UpdateSkillVersionMetadata ## list ListSkills ### Example Usage ```typescript import { Mistral } from "@mistralai/mistralai"; const mistral = new Mistral({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const result = await mistral.beta.skills.list(); for await (const page of result) { console.log(page); } } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { MistralCore } from "@mistralai/mistralai/core.js"; import { betaSkillsList } from "@mistralai/mistralai/funcs/betaSkillsList.js"; // Use `MistralCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const mistral = new MistralCore({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const res = await betaSkillsList(mistral); if (res.ok) { const { value: result } = res; for await (const page of result) { console.log(page); } } else { console.log("betaSkillsList failed:", res.error); } } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [operations.SkillsListRequest](../../models/operations/skillslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[operations.SkillsListResponse](../../models/operations/skillslistresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | ## create CreateSkill ### Example Usage ```typescript import { Mistral } from "@mistralai/mistralai"; const mistral = new Mistral({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const result = await mistral.beta.skills.create({ name: "", definition: {}, }); console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { MistralCore } from "@mistralai/mistralai/core.js"; import { betaSkillsCreate } from "@mistralai/mistralai/funcs/betaSkillsCreate.js"; // Use `MistralCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const mistral = new MistralCore({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const res = await betaSkillsCreate(mistral, { name: "", definition: {}, }); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("betaSkillsCreate failed:", res.error); } } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [components.CreateSkillRequest](../../models/components/createskillrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[components.Skill](../../models/components/skill.md)\>** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | ## get GetSkill ### Example Usage ```typescript import { Mistral } from "@mistralai/mistralai"; const mistral = new Mistral({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const result = await mistral.beta.skills.get({ skillId: "", version: 1, }); console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { MistralCore } from "@mistralai/mistralai/core.js"; import { betaSkillsGet } from "@mistralai/mistralai/funcs/betaSkillsGet.js"; // Use `MistralCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const mistral = new MistralCore({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const res = await betaSkillsGet(mistral, { skillId: "", version: 1, }); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("betaSkillsGet failed:", res.error); } } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [operations.SkillsGetRequest](../../models/operations/skillsgetrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[components.Skill](../../models/components/skill.md)\>** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | ## delete DeleteSkill ### Example Usage ```typescript import { Mistral } from "@mistralai/mistralai"; const mistral = new Mistral({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const result = await mistral.beta.skills.delete({ skillId: "", }); console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { MistralCore } from "@mistralai/mistralai/core.js"; import { betaSkillsDelete } from "@mistralai/mistralai/funcs/betaSkillsDelete.js"; // Use `MistralCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const mistral = new MistralCore({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const res = await betaSkillsDelete(mistral, { skillId: "", }); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("betaSkillsDelete failed:", res.error); } } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [operations.SkillsDeleteRequest](../../models/operations/skillsdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[components.DeleteSkillResponse](../../models/components/deleteskillresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | ## updateMetadata UpdateSkill ### Example Usage ```typescript import { Mistral } from "@mistralai/mistralai"; const mistral = new Mistral({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const result = await mistral.beta.skills.updateMetadata("", {}); console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { MistralCore } from "@mistralai/mistralai/core.js"; import { betaSkillsUpdateMetadata } from "@mistralai/mistralai/funcs/betaSkillsUpdateMetadata.js"; // Use `MistralCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const mistral = new MistralCore({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const res = await betaSkillsUpdateMetadata(mistral, "", {}); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("betaSkillsUpdateMetadata failed:", res.error); } } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `skillId` | *string* | :heavy_check_mark: | N/A | | `requestBody` | [operations.UpdateSkillRequest](../../models/operations/updateskillrequest.md) | :heavy_check_mark: | N/A | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[components.Skill](../../models/components/skill.md)\>** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | ## listVersions ListSkillVersions ### Example Usage ```typescript import { Mistral } from "@mistralai/mistralai"; const mistral = new Mistral({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const result = await mistral.beta.skills.listVersions({ skillId: "", }); console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { MistralCore } from "@mistralai/mistralai/core.js"; import { betaSkillsListVersions } from "@mistralai/mistralai/funcs/betaSkillsListVersions.js"; // Use `MistralCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const mistral = new MistralCore({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const res = await betaSkillsListVersions(mistral, { skillId: "", }); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("betaSkillsListVersions failed:", res.error); } } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [operations.SkillsListVersionsRequest](../../models/operations/skillslistversionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[components.ListSkillVersionsResponse](../../models/components/listskillversionsresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | ## createVersion CreateSkillVersion ### Example Usage ```typescript import { Mistral } from "@mistralai/mistralai"; const mistral = new Mistral({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const result = await mistral.beta.skills.createVersion("", { definition: {}, }); console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { MistralCore } from "@mistralai/mistralai/core.js"; import { betaSkillsCreateVersion } from "@mistralai/mistralai/funcs/betaSkillsCreateVersion.js"; // Use `MistralCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const mistral = new MistralCore({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const res = await betaSkillsCreateVersion(mistral, "", { definition: {}, }); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("betaSkillsCreateVersion failed:", res.error); } } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `skillId` | *string* | :heavy_check_mark: | N/A | | `requestBody` | [operations.CreateSkillVersionRequest](../../models/operations/createskillversionrequest.md) | :heavy_check_mark: | N/A | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[components.CreateSkillVersionResponse](../../models/components/createskillversionresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | ## getVersion GetSkillVersion ### Example Usage ```typescript import { Mistral } from "@mistralai/mistralai"; const mistral = new Mistral({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const result = await mistral.beta.skills.getVersion({ skillId: "", version: 1, }); console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { MistralCore } from "@mistralai/mistralai/core.js"; import { betaSkillsGetVersion } from "@mistralai/mistralai/funcs/betaSkillsGetVersion.js"; // Use `MistralCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const mistral = new MistralCore({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const res = await betaSkillsGetVersion(mistral, { skillId: "", version: 1, }); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("betaSkillsGetVersion failed:", res.error); } } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [operations.SkillsGetVersionRequest](../../models/operations/skillsgetversionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[components.Skill](../../models/components/skill.md)\>** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | ## updateVersionMetadata UpdateSkillVersionMetadata ### Example Usage ```typescript import { Mistral } from "@mistralai/mistralai"; const mistral = new Mistral({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const result = await mistral.beta.skills.updateVersionMetadata("", 1, {}); console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript import { MistralCore } from "@mistralai/mistralai/core.js"; import { betaSkillsUpdateVersionMetadata } from "@mistralai/mistralai/funcs/betaSkillsUpdateVersionMetadata.js"; // Use `MistralCore` for best tree-shaking performance. // You can create one instance of it to use across an application. const mistral = new MistralCore({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function run() { const res = await betaSkillsUpdateVersionMetadata(mistral, "", 1, {}); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("betaSkillsUpdateVersionMetadata failed:", res.error); } } run(); ``` ### Parameters | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `skillId` | *string* | :heavy_check_mark: | N/A | | | `version` | *number* | :heavy_check_mark: | N/A | 1 | | `requestBody` | [operations.UpdateSkillVersionRequest](../../models/operations/updateskillversionrequest.md) | :heavy_check_mark: | N/A | | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | ### Response **Promise\<[components.Skill](../../models/components/skill.md)\>** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* |