glmocrdemojava/api-test.http

54 lines
1.2 KiB
HTTP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### GLM-OCR API Java
###
GET http://localhost:9090/api/v1/health
###
POST http://localhost:9090/api/v1/ocr/text
Content-Type: application/json
{
"image": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
"imageType": "base64"
}
###
POST http://localhost:9090/api/v1/ocr/formula
Content-Type: application/json
{
"image": "<base64>",
"imageType": "base64"
}
###
POST http://localhost:9090/api/v1/ocr/table
Content-Type: application/json
{
"image": "<base64>",
"imageType": "base64"
}
###
POST http://localhost:9090/api/v1/ocr/extract
Content-Type: application/json
{
"image": "<base64>",
"imageType": "base64",
"extractionTemplate": "{\n \"name\": \"\",\n \"id_number\": \"\",\n \"address\": \"\"\n}"
}
### OCR
POST http://localhost:9090/api/v1/ocr
Content-Type: application/json
{
"image": "<base64>",
"imageType": "base64",
"taskType": "text"
}
###
POST http://localhost:9090/api/v1/model/reload