chat_completion | Generate a model reply for a list of chat messages (non-streaming). Arguments: model (string, e.g. “mistral-large-latest”); messages (array of objects {role: “system”|“user”|“assistant”|“tool”, content: string}); temperature (number 0–1.5); top_p (number > 0 and ≤ 1); max_tokens (integer ≥ 1); stop (array of strings); random_seed (integer ≥ 0); response_format (object {type: “text”|“json_object”}); safe_prompt (boolean). |
classify_moderation | Classify raw text against Mistral content-safety categories. Arguments: model (string, e.g. “mistral-moderation-latest”); input (a single string, or an array of strings). |
embeddings | Compute embedding vectors for one or more input texts. Arguments: model (string, e.g. “mistral-embed”); input (a single string, or an array of strings); output_dimension (integer ≥ 1); encoding_format (“float” or “base64”). |
ocr | Extract text and structure from a document or an image reachable by URL. Arguments: model (string, e.g. “mistral-ocr-latest”); document (object — either {type: “document_url”, document_url: string, document_name?: string} for a PDF, or {type: “image_url”, image_url: string} for an image); pages (array of 0-based page integers). |