[
{
"handle": "chat-completions",
"meta": {
"short": "Chat Completions",
"description": "Generate conversational responses using Mistral chat models."
},
"endpoint": {
"value": "/chat/completions"
},
"fields": [
{
"name": "id",
"type": "String",
"selector": ["id"],
"meta": { "description": "Unique identifier for the chat completion." }
},
{
"name": "object",
"type": "String",
"selector": ["object"],
"meta": { "description": "Object type, always 'chat.completion'." }
},
{
"name": "created",
"type": "Integer",
"selector": ["created"],
"meta": { "description": "Unix timestamp when the completion was created." }
},
{
"name": "model",
"type": "String",
"selector": ["model"],
"meta": { "description": "Model used to generate the response." }
},
{
"name": "choices_message_role",
"type": "String",
"selector": ["choices", 0, "message", "role"],
"meta": { "description": "Role of the response message (assistant)." },
"multivalue": true
},
{
"name": "choices_message_content",
"type": "String",
"selector": ["choices", 0, "message", "content"],
"meta": { "description": "Text content of the response message." },
"multivalue": true
},
{
"name": "choices_finish_reason",
"type": "String",
"selector": ["choices", 0, "finish_reason"],
"meta": { "description": "Reason the generation stopped (stop, length, tool_calls)." },
"multivalue": true
},
{
"name": "usage_prompt_tokens",
"type": "Integer",
"selector": ["usage", "prompt_tokens"],
"meta": { "description": "Number of tokens in the prompt." }
},
{
"name": "usage_completion_tokens",
"type": "Integer",
"selector": ["usage", "completion_tokens"],
"meta": { "description": "Number of tokens in the completion." }
},
{
"name": "usage_total_tokens",
"type": "Integer",
"selector": ["usage", "total_tokens"],
"meta": { "description": "Total tokens used." }
}
],
"operations": {
"create": {
"method": "POST",
"path": { "value": "" },
"headers": { "Content-Type": "application/json" },
"queryParams": {},
"bodyTemplate": {
"value": "{\"model\": \"{{model}}\", \"messages\": [{\"role\": \"user\", \"content\": \"{{content}}\"}], \"temperature\": {{temperature}}, \"max_tokens\": {{maxTokens}}}",
"placeholders": [
{ "name": "model", "type": "String", "description": "Mistral model ID to use.", "required": true },
{ "name": "content", "type": "String", "description": "User message content.", "required": true },
{ "name": "temperature", "type": "Number", "description": "Sampling temperature (0-2).", "required": false, "default": "0.7" },
{ "name": "maxTokens", "type": "Integer", "description": "Maximum tokens to generate.", "required": false, "default": "1024" }
]
}
}
},
"webhooks": [
{
"event": "chat_completion.created",
"path": "/webhooks/mistral-ai/chat_completion/created",
"payload": [
{ "name": "id", "type": "String", "selector": ["id"], "meta": { "description": "Unique identifier for the chat completion." } },
{ "name": "model", "type": "String", "selector": ["model"], "meta": { "description": "Model used to generate the response." } },
{ "name": "content", "type": "String", "selector": ["choices", 0, "message", "content"], "meta": { "description": "Text content of the response message." } },
{ "name": "usage_total_tokens", "type": "Integer", "selector": ["usage", "total_tokens"], "meta": { "description": "Total tokens used." } }
]
}
]
},
{
"handle": "fim-completions",
"meta": {
"short": "FIM Completions",
"description": "Fill-in-the-middle code completions using Codestral."
},
"endpoint": {
"value": "/fim/completions"
},
"fields": [
{
"name": "id",
"type": "String",
"selector": ["id"],
"meta": { "description": "Unique identifier for the FIM completion." }
},
{
"name": "object",
"type": "String",
"selector": ["object"],
"meta": { "description": "Object type." }
},
{
"name": "created",
"type": "Integer",
"selector": ["created"],
"meta": { "description": "Unix timestamp when the completion was created." }
},
{
"name": "model",
"type": "String",
"selector": ["model"],
"meta": { "description": "Model used for the FIM completion." }
},
{
"name": "choices_text",
"type": "String",
"selector": ["choices", 0, "text"],
"meta": { "description": "Generated code text to fill in." },
"multivalue": true
},
{
"name": "choices_finish_reason",
"type": "String",
"selector": ["choices", 0, "finish_reason"],
"meta": { "description": "Reason the generation stopped." },
"multivalue": true
},
{
"name": "usage_prompt_tokens",
"type": "Integer",
"selector": ["usage", "prompt_tokens"],
"meta": { "description": "Tokens used in the prompt." }
},
{
"name": "usage_completion_tokens",
"type": "Integer",
"selector": ["usage", "completion_tokens"],
"meta": { "description": "Tokens generated in the completion." }
}
],
"operations": {
"create": {
"method": "POST",
"path": { "value": "" },
"headers": { "Content-Type": "application/json" },
"queryParams": {},
"bodyTemplate": {
"value": "{\"model\": \"{{model}}\", \"prompt\": \"{{prompt}}\", \"suffix\": \"{{suffix}}\", \"max_tokens\": {{maxTokens}}, \"temperature\": {{temperature}}}",
"placeholders": [
{ "name": "model", "type": "String", "description": "Codestral model ID.", "required": true },
{ "name": "prompt", "type": "String", "description": "Code prefix before the completion.", "required": true },
{ "name": "suffix", "type": "String", "description": "Code suffix after the completion.", "required": false },
{ "name": "maxTokens", "type": "Integer", "description": "Maximum tokens to generate.", "required": false, "default": "256" },
{ "name": "temperature", "type": "Number", "description": "Sampling temperature.", "required": false, "default": "0" }
]
}
}
},
"webhooks": [
{
"event": "fim_completion.created",
"path": "/webhooks/mistral-ai/fim_completion/created",
"payload": [
{ "name": "id", "type": "String", "selector": ["id"], "meta": { "description": "Unique identifier for the FIM completion." } },
{ "name": "model", "type": "String", "selector": ["model"], "meta": { "description": "Model used for the FIM completion." } },
{ "name": "text", "type": "String", "selector": ["choices", 0, "text"], "meta": { "description": "Generated code text to fill in." } },
{ "name": "usage_completion_tokens", "type": "Integer", "selector": ["usage", "completion_tokens"], "meta": { "description": "Tokens generated in the completion." } }
]
}
]
},
{
"handle": "embeddings",
"meta": {
"short": "Embeddings",
"description": "Generate vector embeddings for text and code."
},
"endpoint": {
"value": "/embeddings"
},
"fields": [
{
"name": "object",
"type": "String",
"selector": ["object"],
"meta": { "description": "Object type, always 'list'." }
},
{
"name": "model",
"type": "String",
"selector": ["model"],
"meta": { "description": "Model used for generating embeddings." }
},
{
"name": "data_index",
"type": "Integer",
"selector": ["data", 0, "index"],
"meta": { "description": "Index of the embedding object." },
"multivalue": true
},
{
"name": "data_embedding",
"type": "Number",
"selector": ["data", 0, "embedding", 0],
"meta": { "description": "First value of the embedding vector." },
"multivalue": true
},
{
"name": "usage_prompt_tokens",
"type": "Integer",
"selector": ["usage", "prompt_tokens"],
"meta": { "description": "Tokens used to generate the embedding." }
}
],
"operations": {
"create": {
"method": "POST",
"path": { "value": "" },
"headers": { "Content-Type": "application/json" },
"queryParams": {},
"bodyTemplate": {
"value": "{\"model\": \"{{model}}\", \"input\": [\"{{input}}\"]}",
"placeholders": [
{ "name": "model", "type": "String", "description": "Embedding model ID (e.g. mistral-embed).", "required": true },
{ "name": "input", "type": "String", "description": "Text to embed.", "required": true }
]
}
}
},
"webhooks": [
{
"event": "embeddings.generated",
"path": "/webhooks/mistral-ai/embeddings/generated",
"payload": [
{ "name": "model", "type": "String", "selector": ["model"], "meta": { "description": "Model used for generating embeddings." } },
{ "name": "object", "type": "String", "selector": ["object"], "meta": { "description": "Object type, always 'list'." } },
{ "name": "usage_prompt_tokens", "type": "Integer", "selector": ["usage", "prompt_tokens"], "meta": { "description": "Tokens used to generate the embedding." } }
]
}
]
},
{
"handle": "models",
"meta": {
"short": "Models",
"description": "List and retrieve available Mistral AI models."
},
"endpoint": {
"value": "/models"
},
"fields": [
{
"name": "id",
"type": "String",
"selector": ["id"],
"meta": { "description": "Model identifier." }
},
{
"name": "object",
"type": "String",
"selector": ["object"],
"meta": { "description": "Object type, always 'model'." }
},
{
"name": "created",
"type": "Integer",
"selector": ["created"],
"meta": { "description": "Unix timestamp when the model was created." }
},
{
"name": "owned_by",
"type": "String",
"selector": ["owned_by"],
"meta": { "description": "Organization that owns the model." }
},
{
"name": "capabilities_completion_chat",
"type": "Boolean",
"selector": ["capabilities", "completion_chat"],
"meta": { "description": "Whether the model supports chat completions." }
},
{
"name": "capabilities_completion_fim",
"type": "Boolean",
"selector": ["capabilities", "completion_fim"],
"meta": { "description": "Whether the model supports FIM completions." }
},
{
"name": "capabilities_fine_tuning",
"type": "Boolean",
"selector": ["capabilities", "fine_tuning"],
"meta": { "description": "Whether the model supports fine-tuning." }
},
{
"name": "capabilities_vision",
"type": "Boolean",
"selector": ["capabilities", "vision"],
"meta": { "description": "Whether the model supports vision/image inputs." }
},
{
"name": "max_context_length",
"type": "Integer",
"selector": ["max_context_length"],
"meta": { "description": "Maximum context window size in tokens." }
},
{
"name": "deprecation",
"type": "String",
"selector": ["deprecation"],
"meta": { "description": "Deprecation date of the model, if applicable." }
}
],
"operations": {
"list": {
"method": "GET",
"path": { "value": "" },
"headers": {},
"queryParams": {},
"bodyTemplate": null
},
"read": {
"method": "GET",
"path": {
"value": "/{{modelId}}",
"placeholders": [
{ "name": "modelId", "type": "String", "description": "The ID of the model to retrieve.", "required": true }
]
},
"headers": {},
"queryParams": {},
"bodyTemplate": null
},
"delete": {
"method": "DELETE",
"path": {
"value": "/{{modelId}}",
"placeholders": [
{ "name": "modelId", "type": "String", "description": "The ID of the fine-tuned model to delete.", "required": true }
]
},
"headers": {},
"queryParams": {},
"bodyTemplate": null
}
},
"webhooks": [
{
"event": "model.deleted",
"path": "/webhooks/mistral-ai/model/deleted",
"payload": [
{ "name": "id", "type": "String", "selector": ["id"], "meta": { "description": "Model identifier." } },
{ "name": "owned_by", "type": "String", "selector": ["owned_by"], "meta": { "description": "Organization that owns the model." } }
]
}
]
},
{
"handle": "files",
"meta": {
"short": "Files",
"description": "Upload and manage files used for fine-tuning and batch processing."
},
"endpoint": {
"value": "/files"
},
"fields": [
{
"name": "id",
"type": "String",
"selector": ["id"],
"meta": { "description": "Unique identifier for the file." }
},
{
"name": "object",
"type": "String",
"selector": ["object"],
"meta": { "description": "Object type, always 'file'." }
},
{
"name": "size",
"type": "Integer",
"selector": ["size"],
"meta": { "description": "Size of the file in bytes." }
},
{
"name": "created_at",
"type": "Integer",
"selector": ["created_at"],
"meta": { "description": "Unix timestamp when the file was created." }
},
{
"name": "filename",
"type": "String",
"selector": ["filename"],
"meta": { "description": "Name of the uploaded file." }
},
{
"name": "purpose",
"type": "String",
"selector": ["purpose"],
"meta": { "description": "Intended use of the file (fine-tune, batch)." }
},
{
"name": "sample_type",
"type": "String",
"selector": ["sample_type"],
"meta": { "description": "Type of samples in the file." }
},
{
"name": "num_lines",
"type": "Integer",
"selector": ["num_lines"],
"meta": { "description": "Number of lines in the file." }
},
{
"name": "source",
"type": "String",
"selector": ["source"],
"meta": { "description": "Source of the file (upload, repository, etc.)." }
}
],
"operations": {
"list": {
"method": "GET",
"path": { "value": "" },
"headers": {},
"queryParams": {
"page": { "type": "Integer", "description": "Page number for pagination." },
"page_size": { "type": "Integer", "description": "Number of results per page." },
"purpose": { "type": "String", "description": "Filter by file purpose (fine-tune, batch)." }
},
"bodyTemplate": null
},
"read": {
"method": "GET",
"path": {
"value": "/{{fileId}}",
"placeholders": [
{ "name": "fileId", "type": "String", "description": "The ID of the file to retrieve.", "required": true }
]
},
"headers": {},
"queryParams": {},
"bodyTemplate": null
},
"delete": {
"method": "DELETE",
"path": {
"value": "/{{fileId}}",
"placeholders": [
{ "name": "fileId", "type": "String", "description": "The ID of the file to delete.", "required": true }
]
},
"headers": {},
"queryParams": {},
"bodyTemplate": null
}
},
"webhooks": [
{
"event": "file.uploaded",
"path": "/webhooks/mistral-ai/file/uploaded",
"payload": [
{ "name": "id", "type": "String", "selector": ["id"], "meta": { "description": "Unique identifier for the file." } },
{ "name": "filename", "type": "String", "selector": ["filename"], "meta": { "description": "Name of the uploaded file." } },
{ "name": "purpose", "type": "String", "selector": ["purpose"], "meta": { "description": "Intended use of the file (fine-tune, batch)." } },
{ "name": "size", "type": "Integer", "selector": ["size"], "meta": { "description": "Size of the file in bytes." } }
]
},
{
"event": "file.deleted",
"path": "/webhooks/mistral-ai/file/deleted",
"payload": [
{ "name": "id", "type": "String", "selector": ["id"], "meta": { "description": "Unique identifier for the file." } }
]
}
]
},
{
"handle": "fine-tuning-jobs",
"meta": {
"short": "Fine-tuning Jobs",
"description": "Create and manage fine-tuning jobs to customize Mistral models."
},
"endpoint": {
"value": "/fine_tuning/jobs"
},
"fields": [
{
"name": "id",
"type": "String",
"selector": ["id"],
"meta": { "description": "Unique identifier for the fine-tuning job." }
},
{
"name": "object",
"type": "String",
"selector": ["object"],
"meta": { "description": "Object type, always 'job'." }
},
{
"name": "model",
"type": "String",
"selector": ["model"],
"meta": { "description": "Base model to fine-tune." }
},
{
"name": "status",
"type": "String",
"selector": ["status"],
"meta": { "description": "Current status of the job (queued, running, succeeded, failed, cancelled)." }
},
{
"name": "created_at",
"type": "Integer",
"selector": ["created_at"],
"meta": { "description": "Unix timestamp when the job was created." }
},
{
"name": "modified_at",
"type": "Integer",
"selector": ["modified_at"],
"meta": { "description": "Unix timestamp when the job was last modified." }
},
{
"name": "fine_tuned_model",
"type": "String",
"selector": ["fine_tuned_model"],
"meta": { "description": "Name of the resulting fine-tuned model." }
},
{
"name": "training_files",
"type": "String",
"selector": ["training_files", 0],
"meta": { "description": "ID of the training file." },
"multivalue": true
},
{
"name": "validation_files",
"type": "String",
"selector": ["validation_files", 0],
"meta": { "description": "ID of the validation file." },
"multivalue": true
},
{
"name": "hyperparameters_training_steps",
"type": "Integer",
"selector": ["hyperparameters", "training_steps"],
"meta": { "description": "Number of training steps." }
},
{
"name": "hyperparameters_learning_rate",
"type": "Number",
"selector": ["hyperparameters", "learning_rate"],
"meta": { "description": "Learning rate multiplier." }
},
{
"name": "trained_tokens",
"type": "Integer",
"selector": ["trained_tokens"],
"meta": { "description": "Total tokens used for training." }
},
{
"name": "job_type",
"type": "String",
"selector": ["job_type"],
"meta": { "description": "Type of job (FT for fine-tuning)." }
}
],
"operations": {
"list": {
"method": "GET",
"path": { "value": "" },
"headers": {},
"queryParams": {
"page": { "type": "Integer", "description": "Page number." },
"page_size": { "type": "Integer", "description": "Results per page." },
"model": { "type": "String", "description": "Filter by model name." },
"status": { "type": "String", "description": "Filter by job status." }
},
"bodyTemplate": null
},
"read": {
"method": "GET",
"path": {
"value": "/{{jobId}}",
"placeholders": [
{ "name": "jobId", "type": "String", "description": "The ID of the fine-tuning job.", "required": true }
]
},
"headers": {},
"queryParams": {},
"bodyTemplate": null
},
"create": {
"method": "POST",
"path": { "value": "" },
"headers": { "Content-Type": "application/json" },
"queryParams": {},
"bodyTemplate": {
"value": "{\"model\": \"{{model}}\", \"training_files\": [{\"file_id\": \"{{trainingFileId}}\", \"weight\": 1}], \"hyperparameters\": {\"training_steps\": {{trainingSteps}}, \"learning_rate\": {{learningRate}}}}",
"placeholders": [
{ "name": "model", "type": "String", "description": "Base model to fine-tune.", "required": true },
{ "name": "trainingFileId", "type": "String", "description": "ID of the uploaded training file.", "required": true },
{ "name": "trainingSteps", "type": "Integer", "description": "Number of training steps.", "required": false, "default": "100" },
{ "name": "learningRate", "type": "Number", "description": "Learning rate.", "required": false, "default": "0.0001" }
]
}
},
"delete": {
"method": "DELETE",
"path": {
"value": "/{{jobId}}/cancel",
"placeholders": [
{ "name": "jobId", "type": "String", "description": "The ID of the fine-tuning job to cancel.", "required": true }
]
},
"headers": {},
"queryParams": {},
"bodyTemplate": null
}
},
"webhooks": [
{
"event": "fine_tuning_job.created",
"path": "/webhooks/mistral-ai/fine_tuning_job/created",
"payload": [
{ "name": "id", "type": "String", "selector": ["id"], "meta": { "description": "Unique identifier for the fine-tuning job." } },
{ "name": "status", "type": "String", "selector": ["status"], "meta": { "description": "Current status of the job." } },
{ "name": "model", "type": "String", "selector": ["model"], "meta": { "description": "Base model to fine-tune." } }
]
},
{
"event": "fine_tuning_job.succeeded",
"path": "/webhooks/mistral-ai/fine_tuning_job/succeeded",
"payload": [
{ "name": "id", "type": "String", "selector": ["id"], "meta": { "description": "Unique identifier for the fine-tuning job." } },
{ "name": "status", "type": "String", "selector": ["status"], "meta": { "description": "Current status of the job." } },
{ "name": "fine_tuned_model", "type": "String", "selector": ["fine_tuned_model"], "meta": { "description": "Name of the resulting fine-tuned model." } },
{ "name": "trained_tokens", "type": "Integer", "selector": ["trained_tokens"], "meta": { "description": "Total tokens used for training." } }
]
},
{
"event": "fine_tuning_job.failed",
"path": "/webhooks/mistral-ai/fine_tuning_job/failed",
"payload": [
{ "name": "id", "type": "String", "selector": ["id"], "meta": { "description": "Unique identifier for the fine-tuning job." } },
{ "name": "status", "type": "String", "selector": ["status"], "meta": { "description": "Current status of the job." } }
]
}
]
},
{
"handle": "batch-jobs",
"meta": {
"short": "Batch Jobs",
"description": "Submit and manage high-volume batch inference requests."
},
"endpoint": {
"value": "/batch/jobs"
},
"fields": [
{
"name": "id",
"type": "String",
"selector": ["id"],
"meta": { "description": "Unique identifier for the batch job." }
},
{
"name": "object",
"type": "String",
"selector": ["object"],
"meta": { "description": "Object type, always 'batch'." }
},
{
"name": "input_files",
"type": "String",
"selector": ["input_files", 0],
"meta": { "description": "ID of the input file containing batch requests." },
"multivalue": true
},
{
"name": "endpoint",
"type": "String",
"selector": ["endpoint"],
"meta": { "description": "API endpoint the batch requests target." }
},
{
"name": "model",
"type": "String",
"selector": ["model"],
"meta": { "description": "Model used for the batch requests." }
},
{
"name": "status",
"type": "String",
"selector": ["status"],
"meta": { "description": "Current batch job status (queued, running, success, failed, timeout, cancellation_requested, cancelled)." }
},
{
"name": "created_at",
"type": "Integer",
"selector": ["created_at"],
"meta": { "description": "Unix timestamp when the batch job was created." }
},
{
"name": "completed_at",
"type": "Integer",
"selector": ["completed_at"],
"meta": { "description": "Unix timestamp when the batch job completed." }
},
{
"name": "total_requests",
"type": "Integer",
"selector": ["total_requests"],
"meta": { "description": "Total number of requests in the batch." }
},
{
"name": "completed_requests",
"type": "Integer",
"selector": ["completed_requests"],
"meta": { "description": "Number of successfully completed requests." }
},
{
"name": "failed_requests",
"type": "Integer",
"selector": ["failed_requests"],
"meta": { "description": "Number of failed requests." }
},
{
"name": "output_file",
"type": "String",
"selector": ["output_file"],
"meta": { "description": "ID of the output results file." }
},
{
"name": "error_file",
"type": "String",
"selector": ["error_file"],
"meta": { "description": "ID of the error file." }
}
],
"operations": {
"list": {
"method": "GET",
"path": { "value": "" },
"headers": {},
"queryParams": {
"page": { "type": "Integer", "description": "Page number." },
"page_size": { "type": "Integer", "description": "Results per page." },
"model": { "type": "String", "description": "Filter by model." },
"status": { "type": "String", "description": "Filter by job status." }
},
"bodyTemplate": null
},
"read": {
"method": "GET",
"path": {
"value": "/{{jobId}}",
"placeholders": [
{ "name": "jobId", "type": "String", "description": "The ID of the batch job.", "required": true }
]
},
"headers": {},
"queryParams": {},
"bodyTemplate": null
},
"create": {
"method": "POST",
"path": { "value": "" },
"headers": { "Content-Type": "application/json" },
"queryParams": {},
"bodyTemplate": {
"value": "{\"input_files\": [\"{{inputFileId}}\"], \"endpoint\": \"{{endpoint}}\", \"model\": \"{{model}}\"}",
"placeholders": [
{ "name": "inputFileId", "type": "String", "description": "ID of the uploaded batch input file.", "required": true },
{ "name": "endpoint", "type": "String", "description": "Target endpoint (e.g. /v1/chat/completions).", "required": true },
{ "name": "model", "type": "String", "description": "Model to use for all requests in the batch.", "required": true }
]
}
},
"delete": {
"method": "DELETE",
"path": {
"value": "/{{jobId}}/cancel",
"placeholders": [
{ "name": "jobId", "type": "String", "description": "The ID of the batch job to cancel.", "required": true }
]
},
"headers": {},
"queryParams": {},
"bodyTemplate": null
}
},
"webhooks": [
{
"event": "batch_job.created",
"path": "/webhooks/mistral-ai/batch_job/created",
"payload": [
{ "name": "id", "type": "String", "selector": ["id"], "meta": { "description": "Unique identifier for the batch job." } },
{ "name": "status", "type": "String", "selector": ["status"], "meta": { "description": "Current batch job status." } },
{ "name": "model", "type": "String", "selector": ["model"], "meta": { "description": "Model used for the batch requests." } }
]
},
{
"event": "batch_job.succeeded",
"path": "/webhooks/mistral-ai/batch_job/succeeded",
"payload": [
{ "name": "id", "type": "String", "selector": ["id"], "meta": { "description": "Unique identifier for the batch job." } },
{ "name": "status", "type": "String", "selector": ["status"], "meta": { "description": "Current batch job status." } },
{ "name": "output_file", "type": "String", "selector": ["output_file"], "meta": { "description": "ID of the output results file." } },
{ "name": "total_requests", "type": "Integer", "selector": ["total_requests"], "meta": { "description": "Total number of requests in the batch." } }
]
},
{
"event": "batch_job.failed",
"path": "/webhooks/mistral-ai/batch_job/failed",
"payload": [
{ "name": "id", "type": "String", "selector": ["id"], "meta": { "description": "Unique identifier for the batch job." } },
{ "name": "status", "type": "String", "selector": ["status"], "meta": { "description": "Current batch job status." } },
{ "name": "error_file", "type": "String", "selector": ["error_file"], "meta": { "description": "ID of the error file." } }
]
}
]
},
{
"handle": "agents-completions",
"meta": {
"short": "Agents Completions",
"description": "Interact with pre-built Mistral agents that can use tools and maintain memory."
},
"endpoint": {
"value": "/agents/completions"
},
"fields": [
{
"name": "id",
"type": "String",
"selector": ["id"],
"meta": { "description": "Unique identifier for the agent completion." }
},
{
"name": "object",
"type": "String",
"selector": ["object"],
"meta": { "description": "Object type." }
},
{
"name": "created",
"type": "Integer",
"selector": ["created"],
"meta": { "description": "Unix timestamp when the response was created." }
},
{
"name": "model",
"type": "String",
"selector": ["model"],
"meta": { "description": "Model underlying the agent." }
},
{
"name": "choices_message_role",
"type": "String",
"selector": ["choices", 0, "message", "role"],
"meta": { "description": "Role of the response message." },
"multivalue": true
},
{
"name": "choices_message_content",
"type": "String",
"selector": ["choices", 0, "message", "content"],
"meta": { "description": "Content of the agent response." },
"multivalue": true
},
{
"name": "choices_finish_reason",
"type": "String",
"selector": ["choices", 0, "finish_reason"],
"meta": { "description": "Reason the generation stopped." },
"multivalue": true
},
{
"name": "usage_total_tokens",
"type": "Integer",
"selector": ["usage", "total_tokens"],
"meta": { "description": "Total tokens used." }
}
],
"operations": {
"create": {
"method": "POST",
"path": { "value": "" },
"headers": { "Content-Type": "application/json" },
"queryParams": {},
"bodyTemplate": {
"value": "{\"agent_id\": \"{{agentId}}\", \"messages\": [{\"role\": \"user\", \"content\": \"{{content}}\"}]}",
"placeholders": [
{ "name": "agentId", "type": "String", "description": "ID of the agent to interact with.", "required": true },
{ "name": "content", "type": "String", "description": "User message content.", "required": true }
]
}
}
},
"webhooks": [
{
"event": "agent_completion.created",
"path": "/webhooks/mistral-ai/agent_completion/created",
"payload": [
{ "name": "id", "type": "String", "selector": ["id"], "meta": { "description": "Unique identifier for the agent completion." } },
{ "name": "model", "type": "String", "selector": ["model"], "meta": { "description": "Model underlying the agent." } },
{ "name": "content", "type": "String", "selector": ["choices", 0, "message", "content"], "meta": { "description": "Content of the agent response." } },
{ "name": "usage_total_tokens", "type": "Integer", "selector": ["usage", "total_tokens"], "meta": { "description": "Total tokens used." } }
]
}
]
},
{
"handle": "ocr",
"meta": {
"short": "OCR",
"description": "Extract text and structured content from documents and images using Mistral OCR."
},
"endpoint": {
"value": "/ocr"
},
"fields": [
{
"name": "pages_index",
"type": "Integer",
"selector": ["pages", 0, "index"],
"meta": { "description": "Page index of the processed document." },
"multivalue": true
},
{
"name": "pages_markdown",
"type": "String",
"selector": ["pages", 0, "markdown"],
"meta": { "description": "Extracted text in markdown format for this page." },
"multivalue": true
},
{
"name": "pages_width",
"type": "Integer",
"selector": ["pages", 0, "dimensions", "width"],
"meta": { "description": "Width of the page in pixels." },
"multivalue": true
},
{
"name": "pages_height",
"type": "Integer",
"selector": ["pages", 0, "dimensions", "height"],
"meta": { "description": "Height of the page in pixels." },
"multivalue": true
},
{
"name": "model",
"type": "String",
"selector": ["model"],
"meta": { "description": "OCR model used for processing." }
},
{
"name": "usage_pages_processed",
"type": "Integer",
"selector": ["usage_info", "pages_processed"],
"meta": { "description": "Number of pages processed." }
},
{
"name": "usage_doc_size_bytes",
"type": "Integer",
"selector": ["usage_info", "doc_size_bytes"],
"meta": { "description": "Size of the processed document in bytes." }
}
],
"operations": {
"create": {
"method": "POST",
"path": { "value": "" },
"headers": { "Content-Type": "application/json" },
"queryParams": {},
"bodyTemplate": {
"value": "{\"model\": \"{{model}}\", \"document\": {\"type\": \"{{documentType}}\", \"document_url\": \"{{documentUrl}}\"}}",
"placeholders": [
{ "name": "model", "type": "String", "description": "OCR model ID (e.g. mistral-ocr-latest).", "required": true },
{ "name": "documentType", "type": "String", "description": "Type of document input (document_url, image_url).", "required": true },
{ "name": "documentUrl", "type": "String", "description": "URL of the document or image to process.", "required": true }
]
}
}
},
"webhooks": [
{
"event": "ocr.completed",
"path": "/webhooks/mistral-ai/ocr/completed",
"payload": [
{ "name": "model", "type": "String", "selector": ["model"], "meta": { "description": "OCR model used for processing." } },
{ "name": "pages_processed", "type": "Integer", "selector": ["usage_info", "pages_processed"], "meta": { "description": "Number of pages processed." } },
{ "name": "doc_size_bytes", "type": "Integer", "selector": ["usage_info", "doc_size_bytes"], "meta": { "description": "Size of the processed document in bytes." } }
]
}
]
}
]