Audio Moderation

Audio messages are a common way for users to communicate with each other, and they can contain a variety of content that may be inappropriate or harmful. Audio moderation helps you ensure that your platform is a safe and respectful environment for all users.


POST/v1/moderate/audio

Request Audio Moderation

This endpoint allows you to moderate audio.

Required attributes

  • Name
    audio_url
    Type
    string
    Description

    The URL to the audio file to moderate.

  • Name
    type
    Type
    string
    Description

    If you haven't specified a type via the URL (i.e. you've used /v1/moderate instead of /v1/moderate/audio), you must specify the type of content you are moderating here. For audio moderation, this must be set to audio.

Optional attributes

  • Name
    immediate
    Type
    boolean
    Default
    default: true
    Description

    If set to true, the API will return a decision immediately.

Webhooks

If you've set immediate to false, we'll send you a webhook when the moderation is complete.

See the webhooks guide for more information on how webhooks work.

Request

POST
/v1/moderate
curl -X POST https://api.kayle.ai/v1/moderate \
	-H "Authorization: Bearer {token}" \
	-H "Content-Type: application/json" \
	-d '{"audio_url": "{audio_url}", "type": "audio" }'

Audio Moderation Response

{
  "is_safe": false,
  "violations": [
	"hate",
	"self-harm"
  ],
  "severity": 9
}

Audio Moderation Webhook

{
	"id": "WAz8eIbvDR60rouK",
	"type": "audio.moderation",
	"payload": {
		"is_safe": false,
		"violations": [
			"hate",
			"self-harm"
		],
		"severity": 9
	}
}

Was this page helpful?