Recognize document text
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.
ApiKeyAuthAuthorization<token>application/json- 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?stringThe document or image as a URL or base64 data (Zhipu GLM-OCR)
model*stringAn OCR model ID from GET /v1/models
[key: string]?anyThe model's OCR result
application/json- response
[key: string]?anycurl -X POST 'https://api.ohmygpt.com/v1/ocr' \ -H 'Content-Type: application/json' \ -d '{ "model": "string"}'{}Create moderation POST
Classify text and images against the model's content policy categories, in the OpenAI Moderations format.
Rerank documents POST
Orders documents by how relevant each is to a query, in the Cohere and Jina rerank format. `model`, `query` and `documents` are read; every other field (`top_n`, `return_documents`, `max_tokens_per_doc` and so on) is passed to the model unchanged, and the response is the model's own. Billed per query.