> For the complete documentation index, see [llms.txt](https://docs.photoroom.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.photoroom.com/visual-qa-api-enterprise-plan/overview.md).

# Overview

## Who is this API for?

The Visual QA API lets you automatically compare an edited image with the original one, to ensure product fidelity.

More specifically, this API outputs a score that tells you how much the product in the edited image is true to the one in the original image.

This is particularly useful when using editing features powered by generative AI, because these features can create hallucinations on the product.

Here are some examples of how the Visual QA API can be used depending on the industry:

### Fashion & Apparel

Garments contain a lot of fine details that the best AI editing models will sometimes get wrong.

The Visual QA API allows you to work around this problem:

1. instead of a generating a single edited image, generate three of them
2. use the Visual QA API to measure the amount of product fidelity in each
3. select the edited image with the highest fidelity score

Here are some examples of this approach:

<figure><img src="/files/zpMMmI1iznpwhD0cNBOM" alt=""><figcaption><p>(the red arrows point to hallucinations)</p></figcaption></figure>

<figure><img src="/files/yKMba8GUomHJzPboL82E" alt=""><figcaption><p>(the red arrows point to hallucinations)</p></figcaption></figure>

<figure><img src="/files/d3XgAKvqGyrCisjj4U2Y" alt=""><figcaption><p>(the red arrows point to hallucinations)</p></figcaption></figure>

### Food Delivery

Pictures of dishes taken by restaurant owners can be of varying quality and AI editing is a great way to improve their quality.

However, it's important to ensure that the content of the dish stays the same and that no ingredient has been added or removed.

The Visual QA API solves this problem.

It analyzes the edited image and validates it when the dish hasn't been altered:

<div><figure><img src="/files/IKp9NFJIaiDv3JlKYEJa" alt=""><figcaption></figcaption></figure> <figure><img src="/files/bIP3NJISS7Z9XlOE81SQ" alt=""><figcaption></figcaption></figure></div>

And it flags the edited image when the dish has been altered in a way that would mislead buyers:

<div><figure><img src="/files/U3WkWnq0NoVvAKFAVR8k" alt=""><figcaption><p>an extra recipient has been added</p></figcaption></figure> <figure><img src="/files/oBjJ1y8myRKpfl2G6fe5" alt=""><figcaption><p>an extra sushi has been added</p></figcaption></figure></div>

When an edited image is flagged, you can then retry the generation and re-evaluate the new output:

<figure><img src="/files/lHSaTzV0AIzavddwa6vp" alt=""><figcaption><p>in the first attempt, extra sushis had been added</p></figcaption></figure>

If after 2 retries the image still doesn't pass validation, it's then safe to assume that the input image is likely too low quality to be meaningfully improved.

## How do I call the Visual QA API?

The Visual QA API is only available for Enterprise plans.

If you're interested to use the Visual API, please [contact our team to book a demo](https://www.photoroom.com/contact-sales?utm_source=apidocumentation\&utm_medium=enterprisegated).

<a href="https://www.photoroom.com/contact-sales?utm_source=apidocumentation&#x26;utm_medium=enterprisegated" class="button primary">Book a demo</a>&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.photoroom.com/visual-qa-api-enterprise-plan/overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
