- get_workflows - Get Workflows
- get_workflow_registrations - Get Workflow Registrations
- execute_workflow - Execute Workflow
execute_workflow_registration- Execute Workflow Registration⚠️ Deprecated- get_workflow - Get Workflow
- update_workflow - Update Workflow
- get_workflow_registration - Get Workflow Registration
- archive_workflow - Archive Workflow
- unarchive_workflow - Unarchive Workflow
Get Workflows
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.get_workflows(active_only=False, include_shared=True, limit=50)
while res is not None:
# Handle items
res = res.next()| Parameter | Type | Required | Description |
|---|---|---|---|
active_only |
Optional[bool] | ➖ | Whether to only return active workflows |
include_shared |
Optional[bool] | ➖ | Whether to include shared workflows |
available_in_chat_assistant |
OptionalNullable[bool] | ➖ | Whether to only return workflows compatible with chat assistant |
archived |
OptionalNullable[bool] | ➖ | Filter by archived state. False=exclude archived, True=only archived, None=include all |
cursor |
OptionalNullable[str] | ➖ | The cursor for pagination |
limit |
Optional[int] | ➖ | The maximum number of workflows to return |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.GetWorkflowsV1WorkflowsGetResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get Workflow Registrations
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.get_workflow_registrations(active_only=False, include_shared=True, with_workflow=False, limit=50)
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
workflow_id |
OptionalNullable[str] | ➖ | The workflow ID to filter by |
task_queue |
OptionalNullable[str] | ➖ | The task queue to filter by |
active_only |
Optional[bool] | ➖ | Whether to only return active workflows versions |
include_shared |
Optional[bool] | ➖ | Whether to include shared workflow versions |
workflow_search |
OptionalNullable[str] | ➖ | The workflow name to filter by |
archived |
OptionalNullable[bool] | ➖ | Filter by archived state. False=exclude archived, True=only archived, None=include all |
with_workflow |
Optional[bool] | ➖ | Whether to include the workflow definition |
available_in_chat_assistant |
OptionalNullable[bool] | ➖ | Whether to only return workflows compatible with chat assistant |
limit |
Optional[int] | ➖ | The maximum number of workflows versions to return |
cursor |
OptionalNullable[str] | ➖ | The cursor for pagination |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.WorkflowRegistrationListResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Execute Workflow
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.execute_workflow(workflow_identifier="<value>", wait_for_result=False)
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
workflow_identifier |
str | ✔️ | N/A |
execution_id |
OptionalNullable[str] | ➖ | Allows you to specify a custom execution ID. If not provided, a random ID will be generated. |
input |
OptionalNullable[Any] | ➖ | The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. |
encoded_input |
OptionalNullable[models.NetworkEncodedInput] | ➖ | Encoded input to the workflow, used when payload encoding is enabled. |
wait_for_result |
Optional[bool] | ➖ | If true, wait for the workflow to complete and return the result directly. |
timeout_seconds |
OptionalNullable[float] | ➖ | Maximum time to wait for completion when wait_for_result is true. |
custom_tracing_attributes |
Dict[str, str] | ➖ | N/A |
task_queue |
OptionalNullable[str] | ➖ | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. Deprecated. Use deployment_name instead. |
deployment_name |
OptionalNullable[str] | ➖ | Name of the deployment to route this execution to |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePost
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Execute Workflow Registration
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.execute_workflow_registration(workflow_registration_id="de11d76a-e0fb-44dd-abd9-2e75fc275b94", wait_for_result=False)
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
workflow_registration_id |
str | ✔️ | N/A |
execution_id |
OptionalNullable[str] | ➖ | Allows you to specify a custom execution ID. If not provided, a random ID will be generated. |
input |
OptionalNullable[Any] | ➖ | The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. |
encoded_input |
OptionalNullable[models.NetworkEncodedInput] | ➖ | Encoded input to the workflow, used when payload encoding is enabled. |
wait_for_result |
Optional[bool] | ➖ | If true, wait for the workflow to complete and return the result directly. |
timeout_seconds |
OptionalNullable[float] | ➖ | Maximum time to wait for completion when wait_for_result is true. |
custom_tracing_attributes |
Dict[str, str] | ➖ | N/A |
task_queue |
OptionalNullable[str] | ➖ | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. Deprecated. Use deployment_name instead. |
deployment_name |
OptionalNullable[str] | ➖ | Name of the deployment to route this execution to |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePost
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get Workflow
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.get_workflow(workflow_identifier="<value>")
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
workflow_identifier |
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 | */* |
Update Workflow
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.update_workflow(workflow_identifier="<value>")
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
workflow_identifier |
str | ✔️ | N/A |
display_name |
OptionalNullable[str] | ➖ | New display name value |
description |
OptionalNullable[str] | ➖ | New description value |
available_in_chat_assistant |
OptionalNullable[bool] | ➖ | Whether to make the workflow available in the chat assistant |
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 | */* |
Get Workflow Registration
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.get_workflow_registration(workflow_registration_id="c4d86c40-960f-4e9a-9d6f-ad8342d7aa83", with_workflow=False, include_shared=True)
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
workflow_registration_id |
str | ✔️ | N/A |
with_workflow |
Optional[bool] | ➖ | Whether to include the workflow definition |
include_shared |
Optional[bool] | ➖ | Whether to include shared workflow versions |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.WorkflowRegistrationGetResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Archive Workflow
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.archive_workflow(workflow_identifier="<value>")
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
workflow_identifier |
str | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.WorkflowArchiveResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Unarchive Workflow
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.unarchive_workflow(workflow_identifier="<value>")
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
workflow_identifier |
str | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.WorkflowUnarchiveResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |