---
title: "Create Session"
method: POST
path: "/deployments/{deployment_name}/sessions/create"
---

# Create Session

`POST /deployments/{deployment_name}/sessions/create`

## Request

- The document declares no server URL.
- Auth: none declared

Create a new session for a deployment.

## Path parameters

- `deployment_name` string, required

## Response `200`

Successful Response

- SessionDefinition: The definition of a session. Attributes: session_id (str): The session ID. Defaults to a random UUID. task_definitions (list[str]): The task ids in order, representing the session. state (dict): The current session state.
  - `session_id` string
  - `task_ids` string[]
  - `state` object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/run-llama/apis/llamaindex-llama-deploy-api.md) - [All operations](https://skmtc.dev/run-llama/apis/llamaindex-llama-deploy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/run-llama/apis/llamaindex-llama-deploy-api/revisions/5ceeacddc3ab?raw)
