- listDeployments - List Deployments
- createDeployment - Create Deployment
- updateDeployment - Update Deployment
- deleteDeployment - Delete Deployment
- getDeployment - Get Deployment
- stopDeployment - Stop Deployment
- startDeployment - Start Deployment
- restartDeployment - Restart Deployment
- listDeploymentWorkers - List Deployment Workers
- getDeploymentLogs - Get Deployment Logs
- streamDeploymentLogs - Stream Deployment Logs
List Deployments
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.deployments.listDeployments({});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsDeploymentsListDeployments } from "@mistralai/mistralai/funcs/workflowsDeploymentsListDeployments.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 workflowsDeploymentsListDeployments(mistral, {});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsDeploymentsListDeployments failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.ListDeploymentsV1WorkflowsDeploymentsGetRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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 | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.DeploymentListResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Create Deployment
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.deployments.createDeployment({
name: "<value>",
spec: {
githubUrl: "https://ugly-parade.com",
},
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsDeploymentsCreateDeployment } from "@mistralai/mistralai/funcs/workflowsDeploymentsCreateDeployment.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 workflowsDeploymentsCreateDeployment(mistral, {
name: "<value>",
spec: {
githubUrl: "https://ugly-parade.com",
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsDeploymentsCreateDeployment failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
components.CreateDeploymentRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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 | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.ManagedDeploymentResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Update Deployment
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.deployments.updateDeployment({
name: "<value>",
updateDeploymentRequest: {},
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsDeploymentsUpdateDeployment } from "@mistralai/mistralai/funcs/workflowsDeploymentsUpdateDeployment.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 workflowsDeploymentsUpdateDeployment(mistral, {
name: "<value>",
updateDeploymentRequest: {},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsDeploymentsUpdateDeployment failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.UpdateDeploymentV1WorkflowsDeploymentsNamePatchRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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 | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.ManagedDeploymentResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Delete Deployment
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.deployments.deleteDeployment({
name: "<value>",
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsDeploymentsDeleteDeployment } from "@mistralai/mistralai/funcs/workflowsDeploymentsDeleteDeployment.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 workflowsDeploymentsDeleteDeployment(mistral, {
name: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsDeploymentsDeleteDeployment failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.DeleteDeploymentV1WorkflowsDeploymentsNameDeleteRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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 | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.ManagedDeploymentResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get Deployment
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.deployments.getDeployment({
name: "<value>",
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsDeploymentsGetDeployment } from "@mistralai/mistralai/funcs/workflowsDeploymentsGetDeployment.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 workflowsDeploymentsGetDeployment(mistral, {
name: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsDeploymentsGetDeployment failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetDeploymentV1WorkflowsDeploymentsNameGetRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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 | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.DeploymentDetailResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Stop Deployment
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.deployments.stopDeployment({
name: "<value>",
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsDeploymentsStopDeployment } from "@mistralai/mistralai/funcs/workflowsDeploymentsStopDeployment.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 workflowsDeploymentsStopDeployment(mistral, {
name: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsDeploymentsStopDeployment failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StopDeploymentV1WorkflowsDeploymentsNameStopPostRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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 | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.ManagedDeploymentResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Start Deployment
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.deployments.startDeployment({
name: "<value>",
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsDeploymentsStartDeployment } from "@mistralai/mistralai/funcs/workflowsDeploymentsStartDeployment.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 workflowsDeploymentsStartDeployment(mistral, {
name: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsDeploymentsStartDeployment failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StartDeploymentV1WorkflowsDeploymentsNameStartPostRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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 | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.ManagedDeploymentResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Restart Deployment
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.deployments.restartDeployment({
name: "<value>",
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsDeploymentsRestartDeployment } from "@mistralai/mistralai/funcs/workflowsDeploymentsRestartDeployment.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 workflowsDeploymentsRestartDeployment(mistral, {
name: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsDeploymentsRestartDeployment failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.RestartDeploymentV1WorkflowsDeploymentsNameRestartPostRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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 | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.ManagedDeploymentResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
List Deployment Workers
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.deployments.listDeploymentWorkers({
name: "<value>",
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsDeploymentsListDeploymentWorkers } from "@mistralai/mistralai/funcs/workflowsDeploymentsListDeploymentWorkers.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 workflowsDeploymentsListDeploymentWorkers(mistral, {
name: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsDeploymentsListDeploymentWorkers failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.ListDeploymentWorkersV1WorkflowsDeploymentsNameWorkersGetRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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 | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.DeploymentWorkerListResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Retrieve logs for a deployment (across all of its workers).
Use after/before/order on the first request to set the time range and sort order; for
the next pages pass the cursor from the previous response (it remembers the range and order).
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.deployments.getDeploymentLogs({
name: "<value>",
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsDeploymentsGetDeploymentLogs } from "@mistralai/mistralai/funcs/workflowsDeploymentsGetDeploymentLogs.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 workflowsDeploymentsGetDeploymentLogs(mistral, {
name: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsDeploymentsGetDeploymentLogs failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetDeploymentLogsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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 | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.DeploymentLogSearchResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Stream logs for a deployment (all of its workers) via SSE.
Resume cursor comes from the Last-Event-ID header or last_event_id query param (header wins)
and takes precedence over after; omit all to tail from the deployment start.
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.deployments.streamDeploymentLogs({
name: "<value>",
});
for await (const event of result) {
console.log(event);
}
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsDeploymentsStreamDeploymentLogs } from "@mistralai/mistralai/funcs/workflowsDeploymentsStreamDeploymentLogs.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 workflowsDeploymentsStreamDeploymentLogs(mistral, {
name: "<value>",
});
if (res.ok) {
const { value: result } = res;
for await (const event of result) {
console.log(event);
}
} else {
console.log("workflowsDeploymentsStreamDeploymentLogs failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StreamDeploymentLogsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | 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 | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<EventStream<operations.StreamDeploymentLogsResponseBody>>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |