---
name: mistral-ai-api
description: "Mistral AI API skill. Use when working with Mistral AI for models, conversations, agents. Covers 154 endpoints."
version: 1.0.0
generator: lapsh
---

# Mistral AI API
API version: 1.0.0

## Auth
Bearer bearer

## Base URL
https://api.mistral.ai

## Setup
1. Set Authorization header with Bearer token
2. GET /v1/models -- list models
3. POST /v1/conversations -- create first conversation

## Endpoints
154 endpoints across 17 groups. See references/api-spec.lap for full details.

### Models
| Method | Path | Description |
|--------|------|-------------|
| GET | /v1/models | List Models |
| GET | /v1/models/{model_id} | Retrieve Model |
| DELETE | /v1/models/{model_id} | Delete Model |

### Conversations
| Method | Path | Description |
|--------|------|-------------|
| POST | /v1/conversations | Create a conversation and append entries to it. |
| GET | /v1/conversations | List all created conversations. |
| GET | /v1/conversations/{conversation_id} | Retrieve a conversation information. |
| DELETE | /v1/conversations/{conversation_id} | Delete a conversation. |
| POST | /v1/conversations/{conversation_id} | Append new entries to an existing conversation. |
| GET | /v1/conversations/{conversation_id}/history | Retrieve all entries in a conversation. |
| GET | /v1/conversations/{conversation_id}/messages | Retrieve all messages in a conversation. |
| POST | /v1/conversations/{conversation_id}/restart | Restart a conversation starting from a given entry. |
| POST | /v1/conversations/{conversation_id}#stream | Append new entries to an existing conversation. |
| POST | /v1/conversations/{conversation_id}/restart#stream | Restart a conversation starting from a given entry. |

### Agents
| Method | Path | Description |
|--------|------|-------------|
| POST | /v1/agents | Create a agent that can be used within a conversation. |
| GET | /v1/agents | List agent entities. |
| GET | /v1/agents/{agent_id} | Retrieve an agent entity. |
| PATCH | /v1/agents/{agent_id} | Update an agent entity. |
| DELETE | /v1/agents/{agent_id} | Delete an agent entity. |
| PATCH | /v1/agents/{agent_id}/version | Update an agent version. |
| GET | /v1/agents/{agent_id}/versions | List all versions of an agent. |
| GET | /v1/agents/{agent_id}/versions/{version} | Retrieve a specific version of an agent. |
| PUT | /v1/agents/{agent_id}/aliases | Create or update an agent version alias. |
| GET | /v1/agents/{agent_id}/aliases | List all aliases for an agent. |
| DELETE | /v1/agents/{agent_id}/aliases | Delete an agent version alias. |
| POST | /v1/agents/completions | Agents Completion |

### Conversations#stream
| Method | Path | Description |
|--------|------|-------------|
| POST | /v1/conversations#stream | Create a conversation and append entries to it. |

### Files
| Method | Path | Description |
|--------|------|-------------|
| POST | /v1/files | Upload File |
| GET | /v1/files | List Files |
| GET | /v1/files/{file_id} | Retrieve File |
| DELETE | /v1/files/{file_id} | Delete File |
| GET | /v1/files/{file_id}/content | Download File |
| GET | /v1/files/{file_id}/url | Get Signed Url |

### Fine_tuning
| Method | Path | Description |
|--------|------|-------------|
| GET | /v1/fine_tuning/jobs | Get Fine Tuning Jobs |
| POST | /v1/fine_tuning/jobs | Create Fine Tuning Job |
| GET | /v1/fine_tuning/jobs/{job_id} | Get Fine Tuning Job |
| POST | /v1/fine_tuning/jobs/{job_id}/cancel | Cancel Fine Tuning Job |
| POST | /v1/fine_tuning/jobs/{job_id}/start | Start Fine Tuning Job |
| PATCH | /v1/fine_tuning/models/{model_id} | Update Fine Tuned Model |
| POST | /v1/fine_tuning/models/{model_id}/archive | Archive Fine Tuned Model |
| DELETE | /v1/fine_tuning/models/{model_id}/archive | Unarchive Fine Tuned Model |

### Batch
| Method | Path | Description |
|--------|------|-------------|
| GET | /v1/batch/jobs | Get Batch Jobs |
| POST | /v1/batch/jobs | Create Batch Job |
| GET | /v1/batch/jobs/{job_id} | Get Batch Job |
| POST | /v1/batch/jobs/{job_id}/cancel | Cancel Batch Job |

### Chat
| Method | Path | Description |
|--------|------|-------------|
| POST | /v1/chat/completions | Chat Completion |
| POST | /v1/chat/moderations | Chat Moderations |
| POST | /v1/chat/classifications | Chat Classifications |

### Fim
| Method | Path | Description |
|--------|------|-------------|
| POST | /v1/fim/completions | Fim Completion |

### Embeddings
| Method | Path | Description |
|--------|------|-------------|
| POST | /v1/embeddings | Embeddings |

### Moderations
| Method | Path | Description |
|--------|------|-------------|
| POST | /v1/moderations | Moderations |

### Ocr
| Method | Path | Description |
|--------|------|-------------|
| POST | /v1/ocr | OCR |

### Classifications
| Method | Path | Description |
|--------|------|-------------|
| POST | /v1/classifications | Classifications |

### Audio
| Method | Path | Description |
|--------|------|-------------|
| POST | /v1/audio/transcriptions | Create Transcription |
| POST | /v1/audio/transcriptions#stream | Create Streaming Transcription (SSE) |
| POST | /v1/audio/speech | Speech |
| GET | /v1/audio/voices | List all voices |
| POST | /v1/audio/voices | Create a new voice |
| GET | /v1/audio/voices/{voice_id} | Get voice details |
| PATCH | /v1/audio/voices/{voice_id} | Update voice metadata |
| DELETE | /v1/audio/voices/{voice_id} | Delete a custom voice |
| GET | /v1/audio/voices/{voice_id}/sample | Get voice sample audio |

### Libraries
| Method | Path | Description |
|--------|------|-------------|
| GET | /v1/libraries | List all libraries you have access to. |
| POST | /v1/libraries | Create a new Library. |
| GET | /v1/libraries/{library_id} | Detailed information about a specific Library. |
| DELETE | /v1/libraries/{library_id} | Delete a library and all of it's document. |
| PUT | /v1/libraries/{library_id} | Update a library. |
| GET | /v1/libraries/{library_id}/documents | List documents in a given library. |
| POST | /v1/libraries/{library_id}/documents | Upload a new document. |
| GET | /v1/libraries/{library_id}/documents/{document_id} | Retrieve the metadata of a specific document. |
| PUT | /v1/libraries/{library_id}/documents/{document_id} | Update the metadata of a specific document. |
| DELETE | /v1/libraries/{library_id}/documents/{document_id} | Delete a document. |
| GET | /v1/libraries/{library_id}/documents/{document_id}/text_content | Retrieve the text content of a specific document. |
| GET | /v1/libraries/{library_id}/documents/{document_id}/status | Retrieve the processing status of a specific document. |
| GET | /v1/libraries/{library_id}/documents/{document_id}/signed-url | Retrieve the signed URL of a specific document. |
| GET | /v1/libraries/{library_id}/documents/{document_id}/extracted-text-signed-url | Retrieve the signed URL of text extracted from a given document. |
| POST | /v1/libraries/{library_id}/documents/{document_id}/reprocess | Reprocess a document. |
| GET | /v1/libraries/{library_id}/share | List all of the access to this library. |
| PUT | /v1/libraries/{library_id}/share | Create or update an access level. |
| DELETE | /v1/libraries/{library_id}/share | Delete an access level. |

### Observability
| Method | Path | Description |
|--------|------|-------------|
| POST | /v1/observability/chat-completion-events/search | Get Chat Completion Events |
| POST | /v1/observability/chat-completion-events/search-ids | Alternative to /search that returns only the IDs and that can return many IDs at once |
| GET | /v1/observability/chat-completion-events/{event_id} | Get Chat Completion Event |
| GET | /v1/observability/chat-completion-events/{event_id}/similar-events | Get Similar Chat Completion Events |
| GET | /v1/observability/chat-completion-fields | Get Chat Completion Fields |
| GET | /v1/observability/chat-completion-fields/{field_name}/options | Get Chat Completion Field Options |
| POST | /v1/observability/chat-completion-fields/{field_name}/options-counts | Get Chat Completion Field Options Counts |
| POST | /v1/observability/chat-completion-events/{event_id}/live-judging | Run Judge on an event based on the given options |
| POST | /v1/observability/judges | Create a new judge |
| GET | /v1/observability/judges | Get judges with optional filtering and search |
| GET | /v1/observability/judges/{judge_id} | Get judge by id |
| DELETE | /v1/observability/judges/{judge_id} | Delete a judge |
| PUT | /v1/observability/judges/{judge_id} | Update a judge |
| POST | /v1/observability/judges/{judge_id}/live-judging | Run a saved judge on a conversation |
| POST | /v1/observability/campaigns | Create and start a new campaign |
| GET | /v1/observability/campaigns | Get all campaigns |
| GET | /v1/observability/campaigns/{campaign_id} | Get campaign by id |
| DELETE | /v1/observability/campaigns/{campaign_id} | Delete a campaign |
| GET | /v1/observability/campaigns/{campaign_id}/status | Get campaign status by campaign id |
| GET | /v1/observability/campaigns/{campaign_id}/selected-events | Get event ids that were selected by the given campaign |
| POST | /v1/observability/datasets | Create a new empty dataset |
| GET | /v1/observability/datasets | List existing datasets |
| GET | /v1/observability/datasets/{dataset_id} | Get dataset by id |
| DELETE | /v1/observability/datasets/{dataset_id} | Delete a dataset |
| PATCH | /v1/observability/datasets/{dataset_id} | Patch dataset |
| GET | /v1/observability/datasets/{dataset_id}/records | List existing records in the dataset |
| POST | /v1/observability/datasets/{dataset_id}/records | Add a conversation to the dataset |
| POST | /v1/observability/datasets/{dataset_id}/imports/from-campaign | Populate the dataset with a campaign |
| POST | /v1/observability/datasets/{dataset_id}/imports/from-explorer | Populate the dataset with samples from the explorer |
| POST | /v1/observability/datasets/{dataset_id}/imports/from-file | Populate the dataset with samples from an uploaded file |
| POST | /v1/observability/datasets/{dataset_id}/imports/from-playground | Populate the dataset with samples from the playground |
| POST | /v1/observability/datasets/{dataset_id}/imports/from-dataset | Populate the dataset with samples from another dataset |
| GET | /v1/observability/datasets/{dataset_id}/exports/to-jsonl | Export to the Files API and retrieve presigned URL to download the resulting JSONL file |
| GET | /v1/observability/datasets/{dataset_id}/tasks/{task_id} | Get status of a dataset import task |
| GET | /v1/observability/datasets/{dataset_id}/tasks | List import tasks for the given dataset |
| GET | /v1/observability/dataset-records/{dataset_record_id} | Get the content of a given conversation from a dataset |
| DELETE | /v1/observability/dataset-records/{dataset_record_id} | Delete a record from a dataset |
| POST | /v1/observability/dataset-records/bulk-delete | Delete multiple records from datasets |
| POST | /v1/observability/dataset-records/{dataset_record_id}/live-judging | Run Judge on a dataset record based on the given options |
| PUT | /v1/observability/dataset-records/{dataset_record_id}/payload | Update a dataset record conversation payload |
| PUT | /v1/observability/dataset-records/{dataset_record_id}/properties | Update conversation properties |

### Workflows
| Method | Path | Description |
|--------|------|-------------|
| GET | /v1/workflows/executions/{execution_id} | Get Workflow Execution |
| GET | /v1/workflows/executions/{execution_id}/history | Get Workflow Execution History |
| POST | /v1/workflows/executions/{execution_id}/signals | Signal Workflow Execution |
| POST | /v1/workflows/executions/{execution_id}/queries | Query Workflow Execution |
| POST | /v1/workflows/executions/{execution_id}/terminate | Terminate Workflow Execution |
| POST | /v1/workflows/executions/terminate | Batch Terminate Workflow Executions |
| POST | /v1/workflows/executions/{execution_id}/cancel | Cancel Workflow Execution |
| POST | /v1/workflows/executions/cancel | Batch Cancel Workflow Executions |
| POST | /v1/workflows/executions/{execution_id}/reset | Reset Workflow |
| POST | /v1/workflows/executions/{execution_id}/updates | Update Workflow Execution |
| GET | /v1/workflows/executions/{execution_id}/trace/otel | Get Workflow Execution Trace Otel |
| GET | /v1/workflows/executions/{execution_id}/trace/summary | Get Workflow Execution Trace Summary |
| GET | /v1/workflows/executions/{execution_id}/trace/events | Get Workflow Execution Trace Events |
| GET | /v1/workflows/executions/{execution_id}/stream | Stream |
| GET | /v1/workflows/{workflow_name}/metrics | Get Workflow Metrics |
| GET | /v1/workflows/runs | List Runs |
| GET | /v1/workflows/runs/{run_id} | Get Run |
| GET | /v1/workflows/runs/{run_id}/history | Get Run History |
| GET | /v1/workflows/schedules | Get Schedules |
| POST | /v1/workflows/schedules | Schedule Workflow |
| DELETE | /v1/workflows/schedules/{schedule_id} | Unschedule Workflow |
| GET | /v1/workflows/workers/whoami | Get Worker Info |
| GET | /v1/workflows/events/stream | Get Stream Events |
| GET | /v1/workflows/events/list | Get Workflow Events |
| GET | /v1/workflows/deployments | List Deployments |
| GET | /v1/workflows/deployments/{name} | Get Deployment |
| GET | /v1/workflows/registrations | Get Workflow Registrations |
| POST | /v1/workflows/{workflow_identifier}/execute | Execute Workflow |
| POST | /v1/workflows/registrations/{workflow_registration_id}/execute | Execute Workflow Registration |
| GET | /v1/workflows/{workflow_identifier} | Get Workflow |
| PUT | /v1/workflows/{workflow_identifier} | Update Workflow |
| GET | /v1/workflows/registrations/{workflow_registration_id} | Get Workflow Registration |
| PUT | /v1/workflows/{workflow_identifier}/archive | Archive Workflow |
| PUT | /v1/workflows/{workflow_identifier}/unarchive | Unarchive Workflow |

## Common Questions
Match user requests to endpoints in references/api-spec.lap. Key patterns:
- "List all models?" -> GET /v1/models
- "Get model details?" -> GET /v1/models/{model_id}
- "Delete a model?" -> DELETE /v1/models/{model_id}
- "Create a conversation?" -> POST /v1/conversations
- "List all conversations?" -> GET /v1/conversations
- "Get conversation details?" -> GET /v1/conversations/{conversation_id}
- "Delete a conversation?" -> DELETE /v1/conversations/{conversation_id}
- "List all history?" -> GET /v1/conversations/{conversation_id}/history
- "List all messages?" -> GET /v1/conversations/{conversation_id}/messages
- "Create a restart?" -> POST /v1/conversations/{conversation_id}/restart
- "Create a agent?" -> POST /v1/agents
- "Search agents?" -> GET /v1/agents
- "Get agent details?" -> GET /v1/agents/{agent_id}
- "Partially update a agent?" -> PATCH /v1/agents/{agent_id}
- "Delete a agent?" -> DELETE /v1/agents/{agent_id}
- "List all versions?" -> GET /v1/agents/{agent_id}/versions
- "Get version details?" -> GET /v1/agents/{agent_id}/versions/{version}
- "List all aliases?" -> GET /v1/agents/{agent_id}/aliases
- "Create a conversations#stream?" -> POST /v1/conversations#stream
- "Create a restart#stream?" -> POST /v1/conversations/{conversation_id}/restart#stream
- "Create a file?" -> POST /v1/files
- "Search files?" -> GET /v1/files
- "Get file details?" -> GET /v1/files/{file_id}
- "Delete a file?" -> DELETE /v1/files/{file_id}
- "List all content?" -> GET /v1/files/{file_id}/content
- "List all url?" -> GET /v1/files/{file_id}/url
- "List all jobs?" -> GET /v1/fine_tuning/jobs
- "Create a job?" -> POST /v1/fine_tuning/jobs
- "Get job details?" -> GET /v1/fine_tuning/jobs/{job_id}
- "Create a cancel?" -> POST /v1/fine_tuning/jobs/{job_id}/cancel
- "Create a start?" -> POST /v1/fine_tuning/jobs/{job_id}/start
- "Partially update a model?" -> PATCH /v1/fine_tuning/models/{model_id}
- "Create a archive?" -> POST /v1/fine_tuning/models/{model_id}/archive
- "Create a completion?" -> POST /v1/chat/completions
- "Create a embedding?" -> POST /v1/embeddings
- "Create a moderation?" -> POST /v1/moderations
- "Create a ocr?" -> POST /v1/ocr
- "Create a classification?" -> POST /v1/classifications
- "Create a transcription?" -> POST /v1/audio/transcriptions
- "Create a transcriptions#stream?" -> POST /v1/audio/transcriptions#stream
- "Create a speech?" -> POST /v1/audio/speech
- "List all voices?" -> GET /v1/audio/voices
- "Create a voice?" -> POST /v1/audio/voices
- "Get voice details?" -> GET /v1/audio/voices/{voice_id}
- "Partially update a voice?" -> PATCH /v1/audio/voices/{voice_id}
- "Delete a voice?" -> DELETE /v1/audio/voices/{voice_id}
- "List all sample?" -> GET /v1/audio/voices/{voice_id}/sample
- "List all libraries?" -> GET /v1/libraries
- "Create a library?" -> POST /v1/libraries
- "Get library details?" -> GET /v1/libraries/{library_id}
- "Delete a library?" -> DELETE /v1/libraries/{library_id}
- "Update a library?" -> PUT /v1/libraries/{library_id}
- "Search documents?" -> GET /v1/libraries/{library_id}/documents
- "Create a document?" -> POST /v1/libraries/{library_id}/documents
- "Get document details?" -> GET /v1/libraries/{library_id}/documents/{document_id}
- "Update a document?" -> PUT /v1/libraries/{library_id}/documents/{document_id}
- "Delete a document?" -> DELETE /v1/libraries/{library_id}/documents/{document_id}
- "List all text_content?" -> GET /v1/libraries/{library_id}/documents/{document_id}/text_content
- "List all status?" -> GET /v1/libraries/{library_id}/documents/{document_id}/status
- "List all signed-url?" -> GET /v1/libraries/{library_id}/documents/{document_id}/signed-url
- "List all extracted-text-signed-url?" -> GET /v1/libraries/{library_id}/documents/{document_id}/extracted-text-signed-url
- "Create a reprocess?" -> POST /v1/libraries/{library_id}/documents/{document_id}/reprocess
- "List all share?" -> GET /v1/libraries/{library_id}/share
- "Create a search?" -> POST /v1/observability/chat-completion-events/search
- "Create a search-id?" -> POST /v1/observability/chat-completion-events/search-ids
- "Get chat-completion-event details?" -> GET /v1/observability/chat-completion-events/{event_id}
- "List all similar-events?" -> GET /v1/observability/chat-completion-events/{event_id}/similar-events
- "List all chat-completion-fields?" -> GET /v1/observability/chat-completion-fields
- "List all options?" -> GET /v1/observability/chat-completion-fields/{field_name}/options
- "Create a options-count?" -> POST /v1/observability/chat-completion-fields/{field_name}/options-counts
- "Create a live-judging?" -> POST /v1/observability/chat-completion-events/{event_id}/live-judging
- "Create a judge?" -> POST /v1/observability/judges
- "Search judges?" -> GET /v1/observability/judges
- "Get judge details?" -> GET /v1/observability/judges/{judge_id}
- "Delete a judge?" -> DELETE /v1/observability/judges/{judge_id}
- "Update a judge?" -> PUT /v1/observability/judges/{judge_id}
- "Create a campaign?" -> POST /v1/observability/campaigns
- "Search campaigns?" -> GET /v1/observability/campaigns
- "Get campaign details?" -> GET /v1/observability/campaigns/{campaign_id}
- "Delete a campaign?" -> DELETE /v1/observability/campaigns/{campaign_id}
- "List all selected-events?" -> GET /v1/observability/campaigns/{campaign_id}/selected-events
- "Create a dataset?" -> POST /v1/observability/datasets
- "Search datasets?" -> GET /v1/observability/datasets
- "Get dataset details?" -> GET /v1/observability/datasets/{dataset_id}
- "Delete a dataset?" -> DELETE /v1/observability/datasets/{dataset_id}
- "Partially update a dataset?" -> PATCH /v1/observability/datasets/{dataset_id}
- "List all records?" -> GET /v1/observability/datasets/{dataset_id}/records
- "Create a record?" -> POST /v1/observability/datasets/{dataset_id}/records
- "Create a from-campaign?" -> POST /v1/observability/datasets/{dataset_id}/imports/from-campaign
- "Create a from-explorer?" -> POST /v1/observability/datasets/{dataset_id}/imports/from-explorer
- "Create a from-file?" -> POST /v1/observability/datasets/{dataset_id}/imports/from-file
- "Create a from-playground?" -> POST /v1/observability/datasets/{dataset_id}/imports/from-playground
- "Create a from-dataset?" -> POST /v1/observability/datasets/{dataset_id}/imports/from-dataset
- "List all to-jsonl?" -> GET /v1/observability/datasets/{dataset_id}/exports/to-jsonl
- "Get task details?" -> GET /v1/observability/datasets/{dataset_id}/tasks/{task_id}
- "List all tasks?" -> GET /v1/observability/datasets/{dataset_id}/tasks
- "Get dataset-record details?" -> GET /v1/observability/dataset-records/{dataset_record_id}
- "Delete a dataset-record?" -> DELETE /v1/observability/dataset-records/{dataset_record_id}
- "Create a bulk-delete?" -> POST /v1/observability/dataset-records/bulk-delete
- "Get execution details?" -> GET /v1/workflows/executions/{execution_id}
- "Create a signal?" -> POST /v1/workflows/executions/{execution_id}/signals
- "Create a query?" -> POST /v1/workflows/executions/{execution_id}/queries
- "Create a terminate?" -> POST /v1/workflows/executions/{execution_id}/terminate
- "Create a reset?" -> POST /v1/workflows/executions/{execution_id}/reset
- "Create a update?" -> POST /v1/workflows/executions/{execution_id}/updates
- "List all otel?" -> GET /v1/workflows/executions/{execution_id}/trace/otel
- "List all summary?" -> GET /v1/workflows/executions/{execution_id}/trace/summary
- "List all events?" -> GET /v1/workflows/executions/{execution_id}/trace/events
- "List all stream?" -> GET /v1/workflows/executions/{execution_id}/stream
- "List all metrics?" -> GET /v1/workflows/{workflow_name}/metrics
- "Search runs?" -> GET /v1/workflows/runs
- "Get run details?" -> GET /v1/workflows/runs/{run_id}
- "List all schedules?" -> GET /v1/workflows/schedules
- "Create a schedule?" -> POST /v1/workflows/schedules
- "Delete a schedule?" -> DELETE /v1/workflows/schedules/{schedule_id}
- "List all whoami?" -> GET /v1/workflows/workers/whoami
- "List all list?" -> GET /v1/workflows/events/list
- "List all deployments?" -> GET /v1/workflows/deployments
- "Get deployment details?" -> GET /v1/workflows/deployments/{name}
- "List all registrations?" -> GET /v1/workflows/registrations
- "Create a execute?" -> POST /v1/workflows/{workflow_identifier}/execute
- "Get workflow details?" -> GET /v1/workflows/{workflow_identifier}
- "Update a workflow?" -> PUT /v1/workflows/{workflow_identifier}
- "Get registration details?" -> GET /v1/workflows/registrations/{workflow_registration_id}
- "How to authenticate?" -> See Auth section above

## Response Tips
- Check response schemas in references/api-spec.lap for field details
- Paginated endpoints accept limit/offset or cursor parameters
- Create/update endpoints return the modified resource on success
- Error responses include status codes and descriptions in the spec

## References
- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas

> Generated from the official API spec by [LAP](https://lap.sh)
