> For the complete documentation index, see [llms.txt](https://apps.docs.rootflo.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apps.docs.rootflo.ai/ai-gold-auditor-app/image-quality-api-real-time.md).

# Image Quality API (Real time)

Use this endpoint to assess image quality in real time.

The service returns clarity and overlap scores for the submitted image.

Use these scores before sending images for downstream audit workflows.

### Endpoint

* **Method:** `POST`
* **URL:** `https://<base_url>/floware/v1/api-services/image-quality-service/apis/v1/predict`
* **Content type:** `multipart/form-data`

### Request

Submit the request as form-data.

The exact form-data field names depend on your integration setup.

At minimum, send the image input required by your deployment.

### Response

On success, the API returns `200 OK` with a JSON body.

#### Response fields

* `meta.status` — Request status.
* `meta.message` — Status message.
* `meta.trace` — Trace details, if available.
* `data.status` — Image quality result status.
* `data.clarity_score` — Clarity score from `0` to `100`.
* `data.overlap_score` — Overlap score from `0` to `100`.
* `data.filename` — Filename associated with the request.
* `http_status_code` — HTTP status code returned by the service.

#### Example response

```json
{
    "meta": {
        "status": "success",
        "message": "Request processed successfully",
        "trace": null
    },
    "data": {
        "status": "success",
        "error": null,
        "clarity_score": 53,
        "overlap_score": 35,
        "has_gold": false // whether the packet has gold in it
    },
    "http_status_code": 200
}
```

### Score interpretation

Use these thresholds to decide whether the image is usable.

| Score                   | Unacceptable | Acceptable |
| ----------------------- | ------------ | ---------- |
| Overlap score (`0-100`) | `> 25`       | `<= 25`    |
| Clarity score (`0-100`) | `<= 45`      | `> 45`     |
| has\_gold               | `false`      | `true`     |

### Recommended usage

* Accept the image when `overlap_score <= 25` and `clarity_score > 45`.
* If `has_gold` is false, means the packet probably doesnt have gold ornament in it
* Retake the image when either threshold fails.
* Use the async audit flow after the image passes quality checks.

Next step: [Gold Loan Submission API (Async)](/ai-gold-auditor-app/gold-loan-submission-api-async.md)

{% content-ref url="/pages/dd2YKnoHkmgvYrEIYsIj" %}
[Authentication](/authentication.md)
{% endcontent-ref %}


---

# 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://apps.docs.rootflo.ai/ai-gold-auditor-app/image-quality-api-real-time.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.
