---
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`

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.net/deeptrace/apis/fastapi.md) · [All operations](https://skmtc.net/deeptrace/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deeptrace/fastapi/versions/911db8c1d636/schema)
