---
title: "Create Chat"
method: POST
path: "/v1/replica/{id}/chats"
tags: ["Replica"]
---

# Create Chat

`POST /v1/replica/{id}/chats`

Creates a new chat session for a replica.

## Path parameters

- `id` string, uuid, required

## Request body

- CreateChatRequest — Request body for creating a new chat
  - `provider` 'claude' | 'codex' | 'cursor' | 'opencode' | 'pi', required — Coding agent provider for this chat
  - `id` string, uuid — Optional client-generated chat ID.
  - `createdAt` string, date-time — Optional client-generated creation time.
  - `title` string — Title for the chat
  - `parentChatId` string, uuid — Optional parent chat ID.
  - `clientRequestId` string — Opaque client-chosen id echoed back in the `chat.created` event, so clients doing optimistic UI can recognize their own create

## Response `201`

Chat created successfully

- ReplicaChat — A chat session within a replica
  - `id` string, required — Unique identifier for the chat
  - `provider` 'claude' | 'codex' | 'cursor' | 'opencode' | 'pi', required — Coding agent provider for this chat
  - `title` string, required — Chat title
  - `created_at` string, date-time, required — When the chat was created
  - `updated_at` string, date-time, required — When the chat was last updated
  - `processing` boolean, required — Whether the chat is currently doing work — either processing a foreground message or running background/spawned-agent tasks

## Other responses

- `400` — Bad request - Missing or invalid parameters
- `401` — Unauthorized - Invalid or missing API key
- `404` — Resource not found
- `500` — Internal server error

---

[API](https://skmtc.net/tryreplicas/apis/replica-api.md) · [All operations](https://skmtc.net/tryreplicas/apis/replica-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tryreplicas/replica-api/versions/aa3b4c932f7a/schema)
