---
title: "Rewrite"
method: POST
path: "/rewrite_text"
tags: ["v2 endpoints"]
---

# Rewrite

`POST /rewrite_text`

[**Try out this capability in Bria's sandbox**](https://platform.bria.ai/image-editing/rewrite)

**Description**

Change existing text within an image to new specific text.

**Example:** new_text: "FIBO Edit!"


<table>
  <tr>
    <th style="text-align: center;">Input Image</th>
    <th style="text-align: center;">Output Image</th>
  </tr>
  <tr>
    <td align="center" style="vertical-align: middle;">
      <img src="https://bria-datasets.s3.us-east-1.amazonaws.com/Liza/create_an_image_of_cake__with_text_on_it_saying___Hi_there__.png" width="300" style="border-radius: 8px;">
    </td>
    <td align="center" style="vertical-align: middle;">
      <img src="https://bria-datasets.s3.us-east-1.amazonaws.com/Liza/bria_result+(4).png" width="300" style="border-radius: 8px;">
    </td>
  </tr>
</table>

## Headers

- `api_token` string, required

## Request body

- object
  - `image` string, required — The source image to be handled by the API. Supported input types: - **Base64-encoded string** - **URL** pointing to an image file that is publicly accessible and available at the time of processing. Accepted formats: **JPEG**, **JPG**, **PNG**, **WEBP**.
  - `new_text` string, required — The new string to appear in the image.
  - `webhook_url` string, uri — Optional URL for receiving the result via webhook when the async job completes. See [Webhooks](https://docs.bria.ai/webhooks).

## Response `200`

Successful operation (Synchronous Success)

- SyncEditResponse
  - `result` object, required
    - `image_url` string, required
    - `seed` integer, required
    - `structured_instruction` string, required
  - `request_id` string, required
  - `warning` string — Returned only when ip_signal = true and the instruction field included IP content.

## Other responses

- `202` — Accepted (Asynchronous). You can track the progress and retrieve the final result using the Status Service. For more details, refer to the [Status Service](https://docs.bria.ai/status) section.
- `400` — Bad request.
- `401` — Unauthorized.
- `403` — Forbidden.
- `404` — Not found.
- `415` — Unsupported media type.
- `422` — Unprocessable Entity.
- `429` — Request limit exceeded.
- `5XX` — Internal Server Error.

---

[API](https://skmtc.dev/bria-ai/apis/image-editing-api-reference.md) · [All operations](https://skmtc.dev/bria-ai/apis/image-editing-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/bria-ai/image-editing-api-reference/revisions/b69d3f84c7f7/schema)
