---
title: "Create a conversation and append entries to it."
method: POST
path: "/v1/conversations"
tags: ["beta.conversations"]
---

# Create a conversation and append entries to it.

`POST /v1/conversations`

Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation.

## Request body

- ConversationRequest
  - `inputs` union, required
    - string
    - union[]
      - union
        - MessageInputEntry — Representation of an input message inside the conversation.
          - `object` 'entry'
          - `type` 'message.input'
          - `created_at` string, date-time
          - `completed_at` string, date-time, nullable
          - `id` string
          - `role` 'assistant' | 'user', required
          - `content` union, required
            - string
            - union[]
              - …
          - `prefix` boolean
        - MessageOutputEntry
          - `object` 'entry'
          - `type` 'message.output'
          - `created_at` string, date-time
          - `completed_at` string, date-time, nullable
          - `agent_id` string, nullable
          - `model` string, nullable
          - `id` string
          - `role` 'assistant'
          - `content` union, required
            - string
            - union[]
              - …
        - FunctionResultEntry
          - `object` 'entry'
          - `type` 'function.result'
          - `created_at` string, date-time
          - `completed_at` string, date-time, nullable
          - `id` string
          - `tool_call_id` string, required
          - `result` string, required
        - FunctionCallEntry
          - `object` 'entry'
          - `type` 'function.call'
          - `created_at` string, date-time
          - `completed_at` string, date-time, nullable
          - `agent_id` string, nullable
          - `model` string, nullable
          - `id` string
          - `tool_call_id` string, required
          - `name` string, required
          - `arguments` union, required
            - object
            - string
          - `confirmation_status` 'pending' | 'allowed' | 'denied', nullable
        - ToolExecutionEntry
          - `object` 'entry'
          - `type` 'tool.execution'
          - `created_at` string, date-time
          - `completed_at` string, date-time, nullable
          - `agent_id` string, nullable
          - `model` string, nullable
          - `id` string
          - `name` union, required
            - 'web_search' | 'web_search_premium' | 'code_interpreter' | 'image_generation' | 'document_library'
            - string
          - `arguments` string, required
          - `info` ToolExecutionInfo
        - AgentHandoffEntry
          - `object` 'entry'
          - `type` 'agent.handoff'
          - `created_at` string, date-time
          - `completed_at` string, date-time, nullable
          - `id` string
          - `previous_agent_id` string, required
          - `previous_agent_name` string, required
          - `next_agent_id` string, required
          - `next_agent_name` string, required
  - `stream` false
  - `store` boolean, nullable
  - `handoff_execution` 'client' | 'server', nullable
  - `instructions` string, nullable
  - `tools` union[], nullable
    - union
      - FunctionTool
        - `type` 'function'
        - `function` Function, required
          - `name` string, required
          - `description` string
          - `strict` boolean
          - `parameters` object, required
      - WebSearchTool
        - `tool_configuration` ToolConfiguration
          - `exclude` string[], nullable
          - `include` string[], nullable
          - `requires_confirmation` string[], nullable
        - `type` 'web_search'
      - WebSearchPremiumTool
        - `tool_configuration` ToolConfiguration
          - `exclude` string[], nullable
          - `include` string[], nullable
          - `requires_confirmation` string[], nullable
        - `type` 'web_search_premium'
      - CodeInterpreterTool
        - `tool_configuration` ToolConfiguration
          - `exclude` string[], nullable
          - `include` string[], nullable
          - `requires_confirmation` string[], nullable
        - `type` 'code_interpreter'
      - ImageGenerationTool
        - `tool_configuration` ToolConfiguration
          - `exclude` string[], nullable
          - `include` string[], nullable
          - `requires_confirmation` string[], nullable
        - `type` 'image_generation'
      - DocumentLibraryTool
        - `tool_configuration` ToolConfiguration
          - `exclude` string[], nullable
          - `include` string[], nullable
          - `requires_confirmation` string[], nullable
        - `type` 'document_library'
        - `library_ids` string[], required — Ids of the library in which to search.
      - CustomConnector
        - `type` 'connector'
        - `connector_id` string, required
        - `authorization` union
          - OAuth2TokenAuth
            - `type` 'oauth2-token'
            - `value` string, required
          - APIKeyAuth
            - `type` 'api-key'
            - `value` string, required
        - `tool_configuration` ToolConfiguration
          - `exclude` string[], nullable
          - `include` string[], nullable
          - `requires_confirmation` string[], nullable
  - `completion_args` CompletionArgs — White-listed arguments from the completion API
    - `stop` union
      - string
      - string[]
    - `presence_penalty` number, nullable
    - `frequency_penalty` number, nullable
    - `temperature` number, nullable
    - `top_p` number, nullable
    - `max_tokens` integer, nullable
    - `random_seed` integer, nullable
    - `prediction` Prediction — Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content.
      - `type` 'content'
      - `content` string
    - `response_format` ResponseFormat — Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.
      - `type` 'text' | 'json_object' | 'json_schema'
      - `json_schema` JsonSchema
        - `name` string, required
        - `description` string, nullable
        - `schema` object, required
        - `strict` boolean
    - `tool_choice` 'auto' | 'none' | 'any' | 'required'
    - `reasoning_effort` 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'
  - `guardrails` GuardrailConfig[], nullable
    - `block_on_error` boolean — If true, return HTTP 403 and block request in the event of a server-side error
    - `moderation_llm_v1` ModerationLLMV1Config
      - `model_name` string — Override model name. Should be omitted in general.
      - `custom_category_thresholds` ModerationLLMV1CategoryThresholds
        - `sexual` number, nullable
        - `hate_and_discrimination` number, nullable
        - `violence_and_threats` number, nullable
        - `dangerous_and_criminal_content` number, nullable
        - `selfharm` number, nullable
        - `health` number, nullable
        - `financial` number, nullable
        - `law` number, nullable
        - `pii` number, nullable
      - `ignore_other_categories` boolean — If true, only evaluate categories in custom_category_thresholds; others are ignored.
      - `action` 'none' | 'block'
    - `moderation_llm_v2` ModerationLLMV2Config
      - `model_name` string — Override model name. Should be omitted in general.
      - `custom_category_thresholds` ModerationLLMV2CategoryThresholds
        - `sexual` number, nullable
        - `hate_and_discrimination` number, nullable
        - `violence_and_threats` number, nullable
        - `dangerous` number, nullable
        - `criminal` number, nullable
        - `selfharm` number, nullable
        - `health` number, nullable
        - `financial` number, nullable
        - `law` number, nullable
        - `pii` number, nullable
        - `jailbreaking` number, nullable
      - `ignore_other_categories` boolean — If true, only evaluate categories in custom_category_thresholds; others are ignored.
      - `action` 'none' | 'block'
  - `name` string, nullable
  - `description` string, nullable
  - `metadata` MetadataDict — Custom type for metadata with embedded validation.
  - `agent_id` string, nullable
  - `agent_version` union
    - string
    - integer
  - `model` string, nullable

## Response `200`

Successful Response

- ConversationResponse — The response after appending new entries to the conversation.
  - `object` 'conversation.response'
  - `conversation_id` string, required
  - `outputs` union[], required
    - union
      - MessageOutputEntry
        - `object` 'entry'
        - `type` 'message.output'
        - `created_at` string, date-time
        - `completed_at` string, date-time, nullable
        - `agent_id` string, nullable
        - `model` string, nullable
        - `id` string
        - `role` 'assistant'
        - `content` union, required
          - string
          - union[]
            - union
              - …
      - ToolExecutionEntry
        - `object` 'entry'
        - `type` 'tool.execution'
        - `created_at` string, date-time
        - `completed_at` string, date-time, nullable
        - `agent_id` string, nullable
        - `model` string, nullable
        - `id` string
        - `name` union, required
          - 'web_search' | 'web_search_premium' | 'code_interpreter' | 'image_generation' | 'document_library'
          - string
        - `arguments` string, required
        - `info` ToolExecutionInfo
      - FunctionCallEntry
        - `object` 'entry'
        - `type` 'function.call'
        - `created_at` string, date-time
        - `completed_at` string, date-time, nullable
        - `agent_id` string, nullable
        - `model` string, nullable
        - `id` string
        - `tool_call_id` string, required
        - `name` string, required
        - `arguments` union, required
          - object
          - string
        - `confirmation_status` 'pending' | 'allowed' | 'denied', nullable
      - AgentHandoffEntry
        - `object` 'entry'
        - `type` 'agent.handoff'
        - `created_at` string, date-time
        - `completed_at` string, date-time, nullable
        - `id` string
        - `previous_agent_id` string, required
        - `previous_agent_name` string, required
        - `next_agent_id` string, required
        - `next_agent_name` string, required
  - `usage` ConversationUsageInfo, required
    - `prompt_tokens` integer
    - `completion_tokens` integer
    - `total_tokens` integer
    - `connector_tokens` integer, nullable
    - `connectors` object, nullable
  - `guardrails` object[], nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/mistral/apis/mistral-ai-api.md) · [All operations](https://skmtc.net/mistral/apis/mistral-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mistral/mistral-ai-api/revisions/933c4ebdcd72/schema)
