# Image To Text

## 1. Khái niệm

API dùng để tạo yêu cầu giải captcha, được phân loại theo danh sách như link sau:

{% embed url="<https://baliyun.net/price-solve-captcha>" %}

## 2. Cấu hình API

#### HTTP Request

* **URL:** `https://baliyun.net/api/captcha/solve`
* **Method:** <mark style="color:red;">`POST`</mark>
* **Content-Type:** `application/json`

#### Request Parameters

| Key      | Type   | Required | Default | Description                                                                                                                                                |
| -------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| xBaliyun | String | Có       |         | Key dùng xác thực người dùng                                                                                                                               |
| captcha  | String | Có       |         | <p>Hình ảnh dạng base64.<br><strong>Lưu ý</strong>:<br>- <mark style="color:red;"><strong>vietinbank</strong></mark>: Chuỗi là thẻ \<svg> của hình ảnh</p> |
| type     | Number | Có       |         | Mã số loại captcha, được thể hiện ở link bảng giá.                                                                                                         |
| calc     | Number | Không    | 0       | <p><strong>0</strong> - Không yêu cầu<br><strong>1</strong> - Yêu cầu captcha cần tính toán, dựa vào các dấu hiệu như + - x %</p>                          |
| numeric  | Number | Không    | 0       | <p><strong>0</strong> - Không yêu cầu<br><strong>1</strong> - Yêu cầu kết quả giải là dạng số</p>                                                          |

#### Sample Request

{% code overflow="wrap" %}

```json
{
    "xBaliyun": "hBTSdZGEgYEJ2LTmpr0NuElBnbEFu8JX",
    "captcha": "iVBORw0KGgoAAAANSUhEUgAAAMgAAAAjCAYAAADR20XfAAAB0UlEQVR42u3bTWrEIBiA4UDv0fsM9EBeolcq3c4N5gBd9BaWQAUJ0TF+P2r7vuAu7WLwwujrZQbLpv94+CojV6+09m24rIF6rB0CccVh+MOWBQwKk5W9rDwM1N+YSIP8GiTWKs4lu8cmt9QdRPce30qNfi1dLeo5vOfolIiIiIiIiIiIiIuV+AOS3fYYNCwXdAAAAAElFTkSuQmCC",
    "type": 9
}
```

{% endcode %}

#### Sample Response

{% tabs %}
{% tab title="Thành công" %}

```json
{
    "status": 200,
    "success": true,
    "message": "Thành công",
    "result": "9H9AbA"
}
```

{% endtab %}

{% tab title="Thất bại" %}

```json
{
    "status": 400,
    "success": false,
    "message": "Không đủ số dư, vui lòng kiểm tra số coin tài khoản của bạn",
    "result": null
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

```
GET https://docs.baliyun.net/giai-bang-ai/image-to-text.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
