Tree BG 1
Tree
Tree
TreeLeaves
TreeLeaves
Cat IdleGrassGrassRockRock

Beta Skills Endpoints

(beta) Skills API.

ListSkills

GET /v2/skills

ListSkills

200

Success

nextPageToken
string

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.skills.list();

  for await (const page of result) {
    console.log(page);
  }
}

run();
from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.skills.list()

    while res is not None:
        # Handle items

        res = res.next()

curl https://api.mistral.ai/v2/skills \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "data": [
    {
      "id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
      "name": "ticket-triage",
      "definition": {
        "description": "Triage a customer support ticket and suggest the next action.",
        "body": "Use this skill when a support ticket needs triage.\nReturn the issue category, urgency, and the next best action.\n",
        "assets": {
          "policy.md": {
            "textContent": "Use the enterprise support policy before escalating.",
            "isExecutable": false
          }
        }
      },
      "version": 1,
      "notes": "Initial skill version.",
      "aliases": [
        "production"
      ],
      "sharingScope": "workspace",
      "createdAt": "2025-01-15T09:30:00Z",
      "updatedAt": "2025-01-15T10:00:00Z",
      "latestVersion": 1
    }
  ],
  "nextPageToken": "eyJwYWdlIjoyfQ=="
}

CreateSkill

POST /v2/skills

CreateSkill

200

Success

aliases
array<string>

Aliases pointing to this version.

createdAt
date-time

RFC 3339 timestamp.

definition
SkillDefinition

Versioned skill content.

id
string
latestVersion
int32

Latest version number.

name
string

Stable object name.

notes
string

Notes for this version.

sharingScope
"sharing_scope_unspecified"|"private"|"workspace"
updatedAt
date-time

RFC 3339 timestamp.

version
int32

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.skills.create({
    name: "<value>",
    definition: {},
  });

  console.log(result);
}

run();
from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.skills.create(name="<value>", definition={})

    # Handle response
    print(res)

curl https://api.mistral.ai/v2/skills \
 -X POST \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json' \
 -d '{
  "definition": {},
  "name": "My resource"
}'

200

{
  "id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "name": "ticket-triage",
  "definition": {
    "description": "Triage a customer support ticket and suggest the next action.",
    "body": "Use this skill when a support ticket needs triage.\nReturn the issue category, urgency, and the next best action.\n",
    "assets": {
      "policy.md": {
        "textContent": "Use the enterprise support policy before escalating.",
        "isExecutable": false
      }
    }
  },
  "version": 1,
  "notes": "Initial skill version.",
  "aliases": [
    "production"
  ],
  "sharingScope": "workspace",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T10:00:00Z",
  "latestVersion": 1
}

GetSkill

GET /v2/skills/{skill_id}

GetSkill

200

Success

aliases
array<string>

Aliases pointing to this version.

createdAt
date-time

RFC 3339 timestamp.

definition
SkillDefinition

Versioned skill content.

id
string
latestVersion
int32

Latest version number.

name
string

Stable object name.

notes
string

Notes for this version.

sharingScope
"sharing_scope_unspecified"|"private"|"workspace"
updatedAt
date-time

RFC 3339 timestamp.

version
int32

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.skills.get({
    skillId: "<id>",
    version: 1,
  });

  console.log(result);
}

run();
from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.skills.get(skill_id="<id>", version=1)

    # Handle response
    print(res)

curl https://api.mistral.ai/v2/skills/{skill_id} \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "name": "ticket-triage",
  "definition": {
    "description": "Triage a customer support ticket and suggest the next action.",
    "body": "Use this skill when a support ticket needs triage.\nReturn the issue category, urgency, and the next best action.\n",
    "assets": {
      "policy.md": {
        "textContent": "Use the enterprise support policy before escalating.",
        "isExecutable": false
      }
    }
  },
  "version": 1,
  "notes": "Initial skill version.",
  "aliases": [
    "production"
  ],
  "sharingScope": "workspace",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T10:00:00Z",
  "latestVersion": 1
}

DeleteSkill

DELETE /v2/skills/{skill_id}

DeleteSkill

200

Success

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.skills.delete({
    skillId: "<id>",
  });

  console.log(result);
}

run();
from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.skills.delete(skill_id="<id>")

    # Handle response
    print(res)

curl https://api.mistral.ai/v2/skills/{skill_id} \
 -X DELETE \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json'

200

{}

UpdateSkill

PATCH /v2/skills/{skill_id}

UpdateSkill

200

Success

aliases
array<string>

Aliases pointing to this version.

createdAt
date-time

RFC 3339 timestamp.

definition
SkillDefinition

Versioned skill content.

id
string
latestVersion
int32

Latest version number.

name
string

Stable object name.

notes
string

Notes for this version.

sharingScope
"sharing_scope_unspecified"|"private"|"workspace"
updatedAt
date-time

RFC 3339 timestamp.

version
int32

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.skills.updateMetadata("<id>", {});

  console.log(result);
}

run();
from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.skills.update_metadata(skill_id="<id>")

    # Handle response
    print(res)

curl https://api.mistral.ai/v2/skills/{skill_id} \
 -X PATCH \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json' \
 -d '{}'

200

{
  "id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "name": "ticket-triage",
  "definition": {
    "description": "Triage a customer support ticket and suggest the next action.",
    "body": "Use this skill when a support ticket needs triage.\nReturn the issue category, urgency, and the next best action.\n",
    "assets": {
      "policy.md": {
        "textContent": "Use the enterprise support policy before escalating.",
        "isExecutable": false
      }
    }
  },
  "version": 1,
  "notes": "Initial skill version.",
  "aliases": [
    "production"
  ],
  "sharingScope": "workspace",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T10:00:00Z",
  "latestVersion": 1
}

ListSkillVersions

GET /v2/skills/{skill_id}/versions

ListSkillVersions

200

Success

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.skills.listVersions({
    skillId: "<id>",
  });

  console.log(result);
}

run();
from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.skills.list_versions(skill_id="<id>")

    # Handle response
    print(res)

curl https://api.mistral.ai/v2/skills/{skill_id}/versions \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "data": [
    {
      "version": 1,
      "definition": {
        "description": "Triage a customer support ticket and suggest the next action.",
        "body": "Use this skill when a support ticket needs triage.\nReturn the issue category, urgency, and the next best action.\n",
        "assets": {
          "policy.md": {
            "textContent": "Use the enterprise support policy before escalating.",
            "isExecutable": false
          }
        }
      },
      "notes": "Initial skill version.",
      "aliases": [
        "production"
      ],
      "createdAt": "2025-01-15T09:30:00Z"
    }
  ]
}

CreateSkillVersion

POST /v2/skills/{skill_id}/versions

CreateSkillVersion

200

Success

deduplicated
boolean
version
int32

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.skills.createVersion("<id>", {
    definition: {},
  });

  console.log(result);
}

run();
from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.skills.create_version(skill_id="<id>", definition={})

    # Handle response
    print(res)

curl https://api.mistral.ai/v2/skills/{skill_id}/versions \
 -X POST \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json' \
 -d '{
  "definition": {}
}'

200

{
  "version": 2,
  "deduplicated": false
}

GetSkillVersion

GET /v2/skills/{skill_id}/versions/{version}

GetSkillVersion

200

Success

aliases
array<string>

Aliases pointing to this version.

createdAt
date-time

RFC 3339 timestamp.

definition
SkillDefinition

Versioned skill content.

id
string
latestVersion
int32

Latest version number.

name
string

Stable object name.

notes
string

Notes for this version.

sharingScope
"sharing_scope_unspecified"|"private"|"workspace"
updatedAt
date-time

RFC 3339 timestamp.

version
int32

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.skills.getVersion({
    skillId: "<id>",
    version: 1,
  });

  console.log(result);
}

run();
from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.skills.get_version(skill_id="<id>", version=1)

    # Handle response
    print(res)

curl https://api.mistral.ai/v2/skills/{skill_id}/versions/{version} \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "name": "ticket-triage",
  "definition": {
    "description": "Triage a customer support ticket and suggest the next action.",
    "body": "Use this skill when a support ticket needs triage.\nReturn the issue category, urgency, and the next best action.\n",
    "assets": {
      "policy.md": {
        "textContent": "Use the enterprise support policy before escalating.",
        "isExecutable": false
      }
    }
  },
  "version": 1,
  "notes": "Initial skill version.",
  "aliases": [
    "production"
  ],
  "sharingScope": "workspace",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T10:00:00Z",
  "latestVersion": 1
}

UpdateSkillVersionMetadata

PATCH /v2/skills/{skill_id}/versions/{version}

UpdateSkillVersionMetadata

200

Success

aliases
array<string>

Aliases pointing to this version.

createdAt
date-time

RFC 3339 timestamp.

definition
SkillDefinition

Versioned skill content.

id
string
latestVersion
int32

Latest version number.

name
string

Stable object name.

notes
string

Notes for this version.

sharingScope
"sharing_scope_unspecified"|"private"|"workspace"
updatedAt
date-time

RFC 3339 timestamp.

version
int32

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.skills.updateVersionMetadata("<id>", 1, {});

  console.log(result);
}

run();
from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.skills.update_version_metadata(skill_id="<id>", version=1)

    # Handle response
    print(res)

curl https://api.mistral.ai/v2/skills/{skill_id}/versions/{version} \
 -X PATCH \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json' \
 -d '{}'

200

{
  "id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "name": "ticket-triage",
  "definition": {
    "description": "Triage a customer support ticket and suggest the next action.",
    "body": "Use this skill when a support ticket needs triage.\nReturn the issue category, urgency, and the next best action.\n",
    "assets": {
      "policy.md": {
        "textContent": "Use the enterprise support policy before escalating.",
        "isExecutable": false
      }
    }
  },
  "version": 1,
  "notes": "Promote this version after support review.",
  "aliases": [
    "production"
  ],
  "sharingScope": "workspace",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T10:00:00Z",
  "latestVersion": 1
}