Realtime.Sessions

August 13, 2026 ยท View on GitHub

Overview

Available Operations

  • create - Create Client Session

create

Create Client Session

Example Usage

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.realtime.sessions.create(request={
        "purpose": "realtime",
        "model": "Ranchero",
    })

    # Handle response
    print(res)

Parameters

ParameterTypeRequiredDescription
requestmodels.Body:heavy_check_mark:The request object to use for the request.
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.CreateRealtimeSessionResponse

Errors

Error TypeStatus CodeContent Type
errors.HTTPValidationError422application/json
errors.SDKError4XX, 5XX*/*