Create moderation
Classify text and images against the model's content policy categories, in the OpenAI Moderations format.
ApiKeyAuthAuthorization<token>application/json- body
input*|array<>|array<|>Input (or inputs) to classify. Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models.
model?|The content moderation model you would like to use. Learn more in the moderation guide, and learn about available models here.
"omni-moderation-latest"Successful response
application/json- response
Represents if a given text input is potentially harmful.
id*stringThe unique identifier for the moderation request.
model*stringThe model used to generate the moderation results.
results*array<>A list of moderation objects.
curl -X POST 'https://api.ohmygpt.com/v1/moderations' \ -H 'Content-Type: application/json' \ -d '{ "input": ""}'{ "id": "string", "model": "string", "results": [ { "categories": { "harassment": true, "harassment/threatening": true, "hate": true, "hate/threatening": true, "illicit": true, "illicit/violent": true, "self-harm": true, "self-harm/instructions": true, "self-harm/intent": true, "sexual": true, "sexual/minors": true, "violence": true, "violence/graphic": true }, "category_applied_input_types": { "harassment": [ "text" ], "harassment/threatening": [ "text" ], "hate": [ "text" ], "hate/threatening": [ "text" ], "illicit": [ "text" ], "illicit/violent": [ "text" ], "self-harm": [ "text" ], "self-harm/instructions": [ "text" ], "self-harm/intent": [ "text" ], "sexual": [ "text" ], "sexual/minors": [ "text" ], "violence": [ "text" ], "violence/graphic": [ "text" ] }, "category_scores": { "harassment": 0, "harassment/threatening": 0, "hate": 0, "hate/threatening": 0, "illicit": 0, "illicit/violent": 0, "self-harm": 0, "self-harm/instructions": 0, "self-harm/intent": 0, "sexual": 0, "sexual/minors": 0, "violence": 0, "violence/graphic": 0 }, "flagged": true } ]}List models GET
Returns the models you can call, in an OpenAI-compatible format. A model no provider can currently serve is left out, since every request to it would fail; set `include_unavailable=true` to list it with `available: false`, or retrieve it by ID. Filters are limited to facts derivable from the catalog and enabled route pricing; category and arch are conservative derived mappings, so an unknown value is not treated as a match.
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.