OhMyGPT
Ocr

Recognize document text

POST
/v1/ocr

Extract the text of a document or image. Send the document in the model's own field: file (a URL or base64 data) for Zhipu GLM-OCR, document for Mistral OCR. Other fields go to the model unchanged, and the response is the model's own. Billed per page or by tokens, as listed in each model's pricing.

授权

ApiKeyAuth
headerAuthorization<token>

请求主体

application/json
  1. body

Send file or document, whichever the model reads; other fields are passed to the model unchanged.

document?

The document input, such as {"type": "document_url", "document_url": "https://…"} (Mistral OCR)

file?string

The document or image as a URL or base64 data (Zhipu GLM-OCR)

model*string

An OCR model ID from GET /v1/models

[key: string]?any

响应主体

The model's OCR result

application/json
  1. response
[key: string]?any
示例请求
curl -X POST 'https://api.ohmygpt.com/v1/ocr' \  -H 'Content-Type: application/json' \  -d '{  "model": "string"}'
示例响应
{}