Bir moderasyon oluştur
Metin veya multimodal girdiyi OpenAI uyumlu bir moderation isteğiyle kontrol etmek için CometAPI POST /v1/moderations uç noktasını kullanın.
Bu uç noktayı, kullanıcı tarafından oluşturulan içeriği bir model uç noktasına göndermeden önce kontrol etmek için kullanın.Documentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
model ve input değeri içeren OpenAI uyumlu bir moderation isteği gönderin.
Authorization: Bearer <COMETAPI_KEY>.İstek gövdesi
| Field | Type | Required | Description |
|---|---|---|---|
input | string or array | Yes | Kontrol edilecek içerik. Tek bir metin girdisi için string, toplu metin kontrolleri için string dizisi veya metin artı image_url gibi OpenAI tarzı multimodal parçalar kullanın. |
model | string | Yes | Moderation model ID. Belirli bir moderation modeli gereksiniminiz yoksa metin ve görsel moderation için omni-moderation-latest kullanın. |
omni-moderation-latest. Herkese açık görsel URL’leri CometAPI sunucuları tarafından indirilebilir olmalıdır. Kopyalanabilir bir görsel testi için base64 data URL kullanın.
İstek örnekleri
Yalnızca tek bir metin girdisini sınıflandırmanız gerektiğinde tek bir metin string’i gönderin:Yanıt yapısı
Yanıtid, model, results ve usage içerir. results içindeki her öğe, eşleşen girdinin işaretlenip işaretlenmediğini, kategori boolean değerlerini, kategori skorlarını ve her kategoriye uygulanan girdi türlerini bildirir. Toplu bir metin isteğinde results, her input string için bir öğe içerir. Faturalama ve izleme alanları için usage kullanın.Yetkilendirmeler
CometAPI API key used for model requests. Send it as Authorization: Bearer <COMETAPI_KEY>.
Gövde
Required moderation model ID. Use omni-moderation-latest for text and image moderation unless you have a specific moderation model requirement.
"omni-moderation-latest"
Content to check. Use a string for one text input, an array of strings for batch text checks, or OpenAI-style multimodal parts such as text plus image_url when the selected model supports it.
"I want to check this text before sending it to a model."
Yanıt
Moderation decisions and token usage.
Moderation request ID.
"modr-1594"
Model used for moderation.
"omni-moderation-latest"
Moderation decisions. For batch text input, this array contains one result per input string.
Token usage for the moderation request. Additional provider accounting fields can be present.