---
title: "Refine Image Transcription"
method: POST
path: "/image/refine"
tags: ["image"]
---

# Refine Image Transcription

`POST /image/refine`

Refines an existing transcription by focusing on a faulty line + user feedback.
    Does NOT require image URLs; it just updates the text with LLM logic.

    Example input:
        {
          "old_transcription": "Line1
Line2
Line3",
          "faulty_line": "Line2",
          "user_feedback": "Spelling is wrong",
          "lang": "en",
          "url": "https://example.com/image.jpg"
        }

## Request body

- RefineTranscriptionRequest — Data the frontend sends when refining a transcription: - old_transcription: the entire existing transcription - faulty_lines: array of lines identified as incorrect - user_feedback: what the user says is wrong or needs changing - lang: language code, e.g. "en"
  - `old_transcription` string, required
  - `faulty_lines` string[], nullable
  - `user_feedback` string, nullable
  - `lang` string, nullable
  - `url` string, nullable

## Response `200`

Successful Response

- RefineTranscriptionResponse — The response after refinement: - status: e.g. "success" - message: any message - refined_text: the new transcription after the fix
  - `status` string, required
  - `message` string, required
  - `refined_text` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/excellence-ai/apis/excellence-learning.md) · [All operations](https://skmtc.dev/excellence-ai/apis/excellence-learning/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/excellence-ai/excellence-learning/revisions/c407f3b5a05b/schema)
