Skip to content

Restyle Image

Request

Description

Transform the artistic style of an image. Accepts either a preset Style ID or a custom description.

Supported Enum IDs:

  • render_3d
  • cubism
  • oil_painting
  • anime
  • cartoon
  • coloring_book
  • retro_ad
  • pop_art_halftone
  • vector_art
  • story_board
  • art_nouveau
  • cross_etching
  • wood_cut

Example: Style: "oil_painting"

Input ImageOutput Image
Security
api_token
Bodyapplication/json
imagestringrequired

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.

stylestringrequired

Style Enum OR custom free text description.

Enum:"render_3d""cubism""oil_painting""anime""cartoon""coloring_book""retro_ad""pop_art_halftone""vector_art""story_board"
webhook_urlstring, (uri)

Optional URL for receiving the result via webhook when the async job completes. See webhooks.

POST
/restyle
from bria_client import BriaSyncClient

client = BriaSyncClient()  # reads BRIA_API_TOKEN

job = client.submit(
    endpoint="image/edit/restyle",
    payload={
        "image": "<image>",
        "style": "render_3d",
    },
)
result = client.poll(job, interval=2, timeout=120)
print(result.result.image_url)

Responses

Successful operation (Synchronous Success)

Bodyapplication/json
resultobjectrequired
request_idstringrequired
warningstring

Returned only when ip_signal = true and the instruction field included IP content.

Response
{ "result": { "image_url": "string", "seed": 0, "structured_instruction": "string" }, "request_id": "string", "warning": "string" }