Mistral AI Agents API

Agent completion operations

Operations 1

POST /agents/completions Mistral AI Create an agent completion #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mistral-agents-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mistral-agents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mistral AI Agents API
  description: Agent completions API for building AI agents that can handle complex tasks, maintain context, coordinate multiple actions, and use tools including function calling. Agents are created and configured via the Mistral platform and invoked through this API.
  version: '1.0'
  contact:
    name: Mistral AI Support
    url: https://docs.mistral.ai/
    email: support@mistral.ai
  termsOfService: https://mistral.ai/terms/
servers:
- url: https://api.mistral.ai/v1
  description: Mistral AI Production
security:
- bearerAuth: []
tags:
- name: Agents
  description: Agent completion operations
paths:
  /agents/completions:
    post:
      operationId: createAgentCompletion
      summary: Mistral AI Create an agent completion
      description: Generate a response from a configured agent. The agent is identified by its agent_id and can use tools, maintain conversation context, and follow custom instructions defined in the platform.
      tags:
      - Agents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentCompletionRequest'
      responses:
        '200':
          description: Agent completion response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentCompletionResponse'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/AgentCompletionStreamResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Agent not found
        '429':
          description: Rate limit exceeded
components:
  schemas:
    Usage:
      type: object
      properties:
        prompt_tokens:
          type: integer
        completion_tokens:
          type: integer
        total_tokens:
          type: integer
    AgentCompletionRequest:
      type: object
      required:
      - agent_id
      - messages
      properties:
        agent_id:
          type: string
          description: The ID of the agent to use, created on the Mistral platform
        messages:
          type: array
          description: List of messages comprising the conversation
          items:
            $ref: '#/components/schemas/Message'
        max_tokens:
          type: integer
          minimum: 1
          description: Maximum number of tokens to generate
        stream:
          type: boolean
          default: false
          description: Whether to stream partial message deltas
        stop:
          oneOf:
          - type: string
          - type: array
            items:
              type: string
          description: Stop sequences
        random_seed:
          type: integer
          description: Random seed for deterministic generation
        response_format:
          type: object
          properties:
            type:
              type: string
              enum:
              - text
              - json_object
        tool_choice:
          type: string
          enum:
          - auto
          - none
          - any
          default: auto
          description: Controls how the agent uses tools
    ToolCall:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
          - function
        function:
          type: object
          properties:
            name:
              type: string
            arguments:
              type: string
    AgentCompletionStreamResponse:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
          - chat.completion.chunk
        created:
          type: integer
        model:
          type: string
        choices:
          type: array
          items:
            type: object
            properties:
              index:
                type: integer
              delta:
                $ref: '#/components/schemas/Message'
              finish_reason:
                type:
                - string
                - 'null'
    Message:
      type: object
      required:
      - role
      - content
      properties:
        role:
          type: string
          enum:
          - system
          - user
          - assistant
          - tool
        content:
          oneOf:
          - type: string
          - type: array
            items:
              type: object
        tool_calls:
          type: array
          items:
            $ref: '#/components/schemas/ToolCall'
        tool_call_id:
          type: string
    Choice:
      type: object
      properties:
        index:
          type: integer
        message:
          $ref: '#/components/schemas/Message'
        finish_reason:
          type: string
          enum:
          - stop
          - length
          - tool_calls
          - model_length
    AgentCompletionResponse:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
          - chat.completion
        created:
          type: integer
        model:
          type: string
        choices:
          type: array
          items:
            $ref: '#/components/schemas/Choice'
        usage:
          $ref: '#/components/schemas/Usage'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Mistral AI API key passed as a Bearer token
externalDocs:
  description: Mistral AI Agents API Documentation
  url: https://docs.mistral.ai/api/endpoint/agents