Image Generation
/- Generate Structured Prompt from Diff
Generate Image
Generate Image - Lite
Generate Structured Prompt
Generate Structured Prompt - Lite
Generate Structured Promp...
Generates a new, optimized structured_prompt by analyzing the semantic difference between an original structred_prompt and a user-edited version. This endpoint is relevant for applications that allow for manual inline structured_prompt editing.
Security
api_token
A string containing the manually modified structured prompt in JSON format.
Response mode.
false(default): Asynchronous. Returns 202.true: Synchronous. Returns 200 with result.
Default:false
Optional URL for receiving the result via webhook when the async job completes. See webhooks.
POST
from bria_client import BriaSyncClient
client = BriaSyncClient() # reads BRIA_API_TOKEN
response = client.run(
endpoint="structured_prompt/generate_from_diff",
payload={
"structured_prompt": "<structured_prompt>",
"user_adjusted_structured_prompt": "<user_adjusted_structured_prompt>",
},
)
print(response.result.structured_prompt)Response
{ "result": { "seed": 0, "structured_prompt": "string" }, "request_id": "string", "warning": "string" }