---
title: "Inpaint an Audio Segment"
method: POST
path: "/v1/inpaint"
---

# Inpaint an Audio Segment

`POST /v1/inpaint`

This endpoint allows users to replace a specific time segment of an audio clip using a textual prompt and optional lyrics. The inpainting operation blends new audio content into the selected range, guided by user-defined style and voice preferences.  

To use the inpaint feature, upload a song and specify the lyrics you want to replace in the field **'lyrics_section_to_replace'**. For best results, also provide the complete song lyrics in the **lyrics**.

## Response `200`

Successfully initiated inpaint task

- object
  - `success` boolean
  - `message` string
  - `task_id` string
  - `conversion_id_1` string
  - `conversion_id_2` string
  - `eta` integer — Estimated processing time in seconds
  - `credit_estimate` number, float

## Other responses

- `422` — Validation Error
- `500` — Server Error

---

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