List audio agents
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY"),
) as mistral:
res = mistral.audio.agents.list(page_size=10)
while res is not None:
# Handle items
res = res.next()
| Parameter |
Type |
Required |
Description |
page_size |
Optional[int] |
➖ |
Maximum number of agents to return |
page_token |
OptionalNullable[str] |
➖ |
Cursor returned as next_page_token by the previous page |
search |
OptionalNullable[str] |
➖ |
Substring match on the agent name |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.ListAgentsV1AudioAgentsGetResponse
| Error Type |
Status Code |
Content Type |
| errors.HTTPValidationError |
422 |
application/json |
| errors.SDKError |
4XX, 5XX |
*/* |
Create an audio agent
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY"),
) as mistral:
res = mistral.audio.agents.create(name="<value>", configuration={})
# Handle response
print(res)
models.AudioAgentResponse
| Error Type |
Status Code |
Content Type |
| errors.HTTPValidationError |
422 |
application/json |
| errors.SDKError |
4XX, 5XX |
*/* |
Get an audio agent
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY"),
) as mistral:
res = mistral.audio.agents.get(agent_id="967ae3d5-7e26-4ae8-9f9e-4dd9ab8fbfb9")
# Handle response
print(res)
| Parameter |
Type |
Required |
Description |
agent_id |
str |
✔️ |
N/A |
version |
OptionalNullable[int] |
➖ |
Version to return. Defaults to the latest version. |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.AudioAgentResponse
| Error Type |
Status Code |
Content Type |
| errors.HTTPValidationError |
422 |
application/json |
| errors.SDKError |
4XX, 5XX |
*/* |
Update an audio agent
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY"),
) as mistral:
res = mistral.audio.agents.update(agent_id="70039ed8-34b8-4a49-ac83-e37ca84d423b", name="<value>", configuration={})
# Handle response
print(res)
models.AudioAgentResponse
| Error Type |
Status Code |
Content Type |
| errors.HTTPValidationError |
422 |
application/json |
| errors.SDKError |
4XX, 5XX |
*/* |
Delete an audio agent
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY"),
) as mistral:
mistral.audio.agents.delete(agent_id="b6128dca-4b79-48e5-ab7f-d746ef13d05b")
# Use the SDK ...
| Parameter |
Type |
Required |
Description |
agent_id |
str |
✔️ |
N/A |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
| Error Type |
Status Code |
Content Type |
| errors.HTTPValidationError |
422 |
application/json |
| errors.SDKError |
4XX, 5XX |
*/* |
List audio agent versions
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY"),
) as mistral:
res = mistral.audio.agents.list_versions(agent_id="89c92180-d7a8-47e4-98cc-96e5539d54cc", page_size=10)
while res is not None:
# Handle items
res = res.next()
| Parameter |
Type |
Required |
Description |
agent_id |
str |
✔️ |
N/A |
page_size |
Optional[int] |
➖ |
Maximum number of versions to return |
page_token |
OptionalNullable[str] |
➖ |
Cursor returned as next_page_token by the previous page |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.ListAgentVersionsV1AudioAgentsAgentIDVersionsGetResponse
| Error Type |
Status Code |
Content Type |
| errors.HTTPValidationError |
422 |
application/json |
| errors.SDKError |
4XX, 5XX |
*/* |
List audio agent sessions
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY"),
) as mistral:
res = mistral.audio.agents.list_sessions(agent_id="8acd4f69-1e55-4801-85fe-b7864f46c0ac", page_size=10)
while res is not None:
# Handle items
res = res.next()
| Parameter |
Type |
Required |
Description |
agent_id |
str |
✔️ |
N/A |
page_size |
Optional[int] |
➖ |
Maximum number of sessions to return |
page_token |
OptionalNullable[str] |
➖ |
Cursor returned as next_page_token by the previous page |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.ListAgentSessionsV1AudioAgentsAgentIDSessionsGetResponse
| Error Type |
Status Code |
Content Type |
| errors.HTTPValidationError |
422 |
application/json |
| errors.SDKError |
4XX, 5XX |
*/* |