- create - Create Client Session
Create Client Session
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)| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.Body | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.CreateRealtimeSessionResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |