Skip to content

Attribution by image embedding

Request

Send the embedding of a generated image, computed in your environment by the Bria attribution model. Only the irreversible vector reaches Bria. See the bria-attribution repository.

Send one request per image embedding.

Legacy request format (deprecated): requests that send model_version and a list of embeddings (embeddings_base64 as an array, with optional embeddings_uid and model_name) are still accepted. Use model in new integrations.

Security
api_token
Bodyapplication/jsonrequired
One of:
modelstring(ImageAttributionModel)required

The Bria image model that produced the image, as model_name:version.

ValueModel
image_fibo:2Fibo 2
image_fibo_turbo:2Fibo 2 Turbo
image_fibo:1Fibo 1
image_fibo_edit:1Fibo Edit
image_eraser:1Eraser
image_expansion:1Image expansion
image_increase_res:1Increase resolution
image_rmbg:1Remove background (RMBG 2.0)
image_rmbg:3Remove background (RMBG 3.0)
image_replace_bg:1Replace background 1
image_replace_bg:2Replace background 2
Enum:"image_fibo:2""image_fibo_turbo:2""image_fibo:1""image_fibo_edit:1""image_eraser:1""image_expansion:1""image_increase_res:1""image_rmbg:1""image_rmbg:3""image_replace_bg:1"
Example:"image_fibo:2"
embeddings_base64stringrequired

Base64-encoded embedding of the image, produced by the Bria attribution model in your environment.

Example:"<embeddings_base64>"
unique_idstring(UniqueId)

Optional. Your identifier for this embedding; use a new value per asset. Bria generates one if omitted.

Example:"3f2b9c1e8a7d4f6b9e0c1a2b3c4d5e6f"
agentstring(Agent)

Optional. A name for the application, integration or end customer that produced the asset. Stored with the attribution record.

Example:"my-app"
syncboolean(Sync)

Specifies the response mode. Optional.

  • When false (default), the API returns 202 with a request_id and status_url right away.
  • When true, the API returns 200 with the outcome once the attribution request is queued.
Default:false
Example:false
webhook_urlstring, (uri)(WebhookUrl)

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

Example:"https://example.com/webhooks/bria"
POST
/v2/image/attribution/by_embedding
from bria_client import BriaSyncClient

client = BriaSyncClient()  # reads BRIA_API_TOKEN

job = client.submit(
    endpoint="image/attribution/by_embedding",
    payload={
        "model": "image_fibo:2",
        "embeddings_base64": "<embeddings_base64>",
        "agent": "my-app",
    },
)
result = client.poll(job, interval=2, timeout=120)
print(result.result)

Responses

Attribution triggered (returned when sync is true).

Bodyapplication/json
resultobjectrequired
request_idstringrequired
Response
{ "result": { "content": "Attribution triggered successfully" }, "request_id": "string" }