---
title: "Create a named chat session"
method: POST
path: "/assistant/chat/sessions"
tags: ["Chat"]
---

# Create a named chat session

`POST /assistant/chat/sessions`

## Request

- Base URL: `https://api.mobilerun.ai`
- URL: `https://api.mobilerun.ai/assistant/chat/sessions`
- Auth: HTTP bearer

Creates a titled agent session. Setup may occur on the first prompt. Idempotent via the `Idempotency-Key` header — a duplicate submit by the same authenticated caller within the 24-hour idempotency window returns the already-created session instead of a second one. Reusing the same key with a different request body is a 422 `idempotency_key_reused`.

## Headers

- `idempotency-key` string: Idempotency-Key: 1-255 printable ASCII characters. Same key with a different request body is a 422 idempotency_key_reused. A retryable in-flight duplicate is a 409 with Retry-After and x-should-retry: true; a terminal duplicate is a 409 with x-should-retry: false. A replay returns the current resource state with Idempotent-Replayed: true.

## Request body

- object
  - `title` string, required
  - `description` string
  - `agent` string

## Response `200`

Created session

- object
  - `session` object, required
    - `id` string, required
    - `title` string, required
    - `description` string, nullable, required
    - `agent` string, nullable, required
    - `status` string, required
    - `createdAt` string, required
    - `lastActiveAt` string, required
    - `turnActive` boolean, required
    - `turnStartedAt` string, nullable, required
    - `pinned` boolean, required
    - `costCents` number, required
    - `costUsd` number, required
    - `creditsUsed` number, nullable, required
    - `peakPromptTokens` number, nullable, required
    - `basePromptTokens` number, nullable, required
    - `contextExhaustedAt` string, nullable, required
    - `createdBy` string, nullable
    - `promptStatus` 'ready' | 'machine_replaced', required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `422`: Error 422
- `500`: Internal Server Error

## Changes

- **2026-10-16** `4ad548c528a8`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/droidrun/apis/droidrun-cloud/changes/assistant/chat/sessions/post.md)

---

[API](https://skmtc.dev/droidrun/apis/droidrun-cloud.md) - [All operations](https://skmtc.dev/droidrun/apis/droidrun-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/droidrun/apis/droidrun-cloud/revisions/1cc95586c933?raw)
