ListSkills
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()
| Parameter |
Type |
Required |
Description |
page_size |
Optional[int] |
➖ |
N/A |
page_token |
Optional[str] |
➖ |
N/A |
alias |
Optional[str] |
➖ |
N/A |
fields |
List[str] |
➖ |
Projection over each listed Skill. definition.description is the only definition path a list accepts; body and assets are read one skill at a time with GetSkill. |
sort_field |
Optional[models.ListSortField] |
➖ |
Defaults to created_at when omitted. |
sort_direction_query_parameter |
Optional[models.ListSortDirection] |
➖ |
Defaults to descending for timestamp fields and ascending for text fields. |
sort_by |
Optional[str] |
➖ |
REST-friendly alias for sort.field. Supported values: created_at, last_modified_at, name, title. |
sort_direction_query_parameter1 |
Optional[str] |
➖ |
REST-friendly alias for sort.direction. Supported values: asc, desc. |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.SkillsListResponse
| Error Type |
Status Code |
Content Type |
| errors.SDKError |
4XX, 5XX |
*/* |
CreateSkill
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)
models.Skill
| Error Type |
Status Code |
Content Type |
| errors.SDKError |
4XX, 5XX |
*/* |
GetSkill
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)
| Parameter |
Type |
Required |
Description |
Example |
skill_id |
str |
✔️ |
N/A |
|
version |
Optional[int] |
➖ |
N/A |
1 |
alias |
Optional[str] |
➖ |
N/A |
|
fields |
List[str] |
➖ |
N/A |
|
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
|
models.Skill
| Error Type |
Status Code |
Content Type |
| errors.SDKError |
4XX, 5XX |
*/* |
DeleteSkill
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)
| Parameter |
Type |
Required |
Description |
skill_id |
str |
✔️ |
N/A |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.DeleteSkillResponse
| Error Type |
Status Code |
Content Type |
| errors.SDKError |
4XX, 5XX |
*/* |
UpdateSkill
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)
models.Skill
| Error Type |
Status Code |
Content Type |
| errors.SDKError |
4XX, 5XX |
*/* |
ListSkillVersions
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)
| Parameter |
Type |
Required |
Description |
skill_id |
str |
✔️ |
N/A |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.ListSkillVersionsResponse
| Error Type |
Status Code |
Content Type |
| errors.SDKError |
4XX, 5XX |
*/* |
CreateSkillVersion
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)
| Parameter |
Type |
Required |
Description |
skill_id |
str |
✔️ |
N/A |
definition |
models.SkillDefinition |
✔️ |
Versioned skill content. |
notes |
OptionalNullable[str] |
➖ |
Notes for this version. |
aliases |
List[str] |
➖ |
Aliases pointing to this version. |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.CreateSkillVersionResponse
| Error Type |
Status Code |
Content Type |
| errors.SDKError |
4XX, 5XX |
*/* |
GetSkillVersion
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)
| Parameter |
Type |
Required |
Description |
Example |
skill_id |
str |
✔️ |
N/A |
|
version |
int |
✔️ |
N/A |
1 |
fields |
List[str] |
➖ |
N/A |
|
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
|
models.Skill
| Error Type |
Status Code |
Content Type |
| errors.SDKError |
4XX, 5XX |
*/* |
UpdateSkillVersionMetadata
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)
| Parameter |
Type |
Required |
Description |
Example |
skill_id |
str |
✔️ |
N/A |
|
version |
int |
✔️ |
N/A |
1 |
notes |
OptionalNullable[str] |
➖ |
Notes for this version. |
|
aliases |
Optional[models.AliasList] |
➖ |
Presence wrapper for a set of alias labels on update RPCs. As a message field it carries presence, so callers can distinguish "leave aliases unchanged" (field omitted) from "clear all aliases" (field set, empty values). |
|
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
|
models.Skill
| Error Type |
Status Code |
Content Type |
| errors.SDKError |
4XX, 5XX |
*/* |