Rerank documents
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 or per token, whichever the model's price in GET /v1/models lists.
ApiKeyAuthAuthorization<token>application/json- body
Fields other than these three, such as top_n and return_documents, are passed to the model unchanged.
documents*array<string|>The documents to order, as strings or as objects with a text field.
1 <= itemsmodel*stringA rerank model ID from GET /v1/models
query*stringtop_n?integerReturn only the most relevant N documents.
1 <= value[key: string]?anySuccessful response
application/json- response
The model's rerank response.
id?stringresults?array<>Documents ordered from most to least relevant.
[key: string]?anycurl -X POST 'https://api.ohmygpt.com/v1/rerank' \ -H 'Content-Type: application/json' \ -d '{ "documents": [ "string" ], "model": "string", "query": "string"}'{ "id": "string", "results": [ { "index": 0, "relevance_score": 0 } ]}Recognize document text POST
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.
Retrieve incident GET
Returns a public incident and its update timeline when the incident is active or resolved within the last 30 days.