---
title: "Create Pr From Chat"
method: POST
path: "/api/create-pr/from-chat"
tags: ["create-pr"]
---

# Create Pr From Chat

`POST /api/create-pr/from-chat`

## Request

- Base URL: `https://api.deeptrace.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.deeptrace.com/api/create-pr/from-chat`
- Auth: none declared

Create a PR from a chat's suggest_pr tool call.

## Request body

- ChatCreatePRRequest: Request to create a PR from a chat's suggest_pr tool call.
  - `chat_id` string, required
  - `repo` string, required
  - `change` string, required
  - `base_branch` string

## Response `200`

Successful Response

- ApiCodeGenRouterCreatePRResponse: Response after kicking off PR creation.
  - `status` string, required
  - `task_id` string, required
  - `message` string, required
  - `target_repo` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/deeptrace/apis/deeptrace-api.md) - [All operations](https://skmtc.dev/deeptrace/apis/deeptrace-api/llms.txt) - [OpenAPI document](https://skmtc.dev/deeptrace/apis/deeptrace-api/revisions/855e59bb07f0?raw)
