Stream Moderation API
Server-side REST API for AI-powered content moderation across text, images and video — flagging, queues, automoderation policies, harms taxonomy and reviewer decisions.
Server-side REST API for AI-powered content moderation across text, images and video — flagging, queues, automoderation policies, harms taxonomy and reviewer decisions.
components:
schemas:
APIError:
nullable: true
properties:
StatusCode:
description: Response HTTP status code
format: int32
title: Status code
type: integer
x-stream-index: "004"
code:
description: API error code
format: int32
title: Code
type: integer
x-stream-index: "001"
details:
description: Additional error-specific information
items:
type: integer
title: Details
type: array
x-stream-index: "007"
duration:
description: Request duration
title: Duration
type: string
x-stream-index: "005"
exception_fields:
additionalProperties:
type: string
description: Additional error info
title: Exception fields
type: object
x-stream-index: "003"
message:
description: Message describing an error
title: Message
type: string
x-stream-index: "002"
more_info:
description: URL with additional information
title: More info
type: string
x-stream-index: "006"
unrecoverable:
description: Flag that indicates if the error is unrecoverable, requests
that return unrecoverable errors should not be retried, this error only
applies to the request that caused it
title: Unrecoverable
type: boolean
x-stream-index: "008"
required:
- code
- message
- StatusCode
- duration
- more_info
- details
title: Error response
type: object
Action:
nullable: true
properties:
name:
type: string
x-stream-index: "001"
style:
type: string
x-stream-index: "003"
text:
type: string
x-stream-index: "002"
type:
type: string
x-stream-index: "004"
value:
type: string
x-stream-index: "005"
required:
- name
- text
- type
type: object
ActionLogResponse:
nullable: true
properties:
ai_providers:
items:
type: string
type: array
x-stream-index: "012"
created_at:
description: Timestamp when the action was taken
format: date-time
title: Created At
type: string
x-stream-index: "002"
custom:
additionalProperties: {}
description: Additional metadata about the action
title: Custom
type: object
x-stream-index: "008"
id:
description: Unique identifier of the action log
title: ID
type: string
x-stream-index: "001"
reason:
description: Reason for the moderation action
title: Reason
type: string
x-stream-index: "007"
reporter_type:
description: Classification of who triggered the action (e.g. user, moderator,
automod, api_integration)
title: Reporter Type
type: string
x-stream-index: "006"
review_queue_item:
$ref: '#/components/schemas/ReviewQueueItemResponse'
description: Associated review queue item
title: Review Queue Item
x-stream-index: "009"
target_user:
$ref: '#/components/schemas/UserResponse'
description: User who was the target of the action
title: Target User
x-stream-index: "010"
target_user_id:
description: ID of the user who was the target of the action
title: Target User ID
type: string
x-stream-index: "011"
type:
description: Type of moderation action
title: Type
type: string
x-stream-index: "003"
user:
$ref: '#/components/schemas/UserResponse'
description: User who performed the action
title: User
x-stream-index: "004"
user_id:
description: ID of the user who performed the action
title: User ID
type: string
x-stream-index: "005"
required:
- id
- created_at
- type
- user_id
- reporter_type
- reason
- custom
- target_user_id
- ai_providers
type: object
AppealAcceptedEvent:
description: This event is sent when an appeal is accepted
nullable: true
properties:
appeal:
$ref: '#/components/schemas/AppealItemResponse'
description: The appeal that was accepted
title: Appeal
x-stream-index: "002"
created_at:
format: date-time
type: string
x-stream-index: "001.003"
custom:
additionalProperties: {}
type: object
x-stream-index: "001.007"
received_at:
format: date-time
type: string
x-stream-index: "001.004"
type:
default: appeal.accepted
type: string
x-stream-index: "001.002"
required:
- type
- created_at
- custom
title: AppealAcceptedEvent
type: object
x-stream-event-client-type: true
x-stream-event-doc-group: other
x-stream-is-event: true
x-stream-ws-base-event-name: VideoEvent
AppealCreatedEvent:
description: This event is sent when an appeal is created
nullable: true
properties:
appeal:
$ref: '#/components/schemas/AppealItemResponse'
description: The appeal that was created
title: Appeal
x-stream-index: "002"
created_at:
format: date-time
type: string
x-stream-index: "001.003"
custom:
additionalProperties: {}
type: object
x-stream-index: "001.007"
received_at:
format: date-time
type: string
x-stream-index: "001.004"
type:
default: appeal.created
type: string
x-stream-index: "001.002"
required:
- type
- created_at
- custom
title: AppealCreatedEvent
type: object
x-stream-event-client-type: true
x-stream-event-doc-group: other
x-stream-is-event: true
x-stream-ws-base-event-name: VideoEvent
AppealItemResponse:
properties:
appeal_reason:
description: Reason Text of the Appeal Item
title: Appeal Reason
type: string
x-stream-index: "006"
attachments:
description: Attachments(e.g. Images) of the Appeal Item
items:
type: string
title: Attachments
type: array
x-stream-index: "009"
created_at:
description: When the flag was created
format: date-time
title: Created At
type: string
x-stream-index: "010"
decision_reason:
description: Decision Reason of the Appeal Item
title: Decision Reason
type: string
x-stream-index: "008"
entity_content:
$ref: '#/components/schemas/ModerationPayload'
x-stream-index: "005"
entity_id:
description: ID of the entity
title: Entity ID
type: string
x-stream-index: "004"
entity_type:
description: Type of entity
title: Entity Type
type: string
x-stream-index: "003"
id:
type: string
x-stream-index: "001"
status:
description: Status of the Appeal Item
title: Status
type: string
x-stream-index: "007"
updated_at:
description: When the flag was last updated
format: date-time
title: Updated At
type: string
x-stream-index: "011"
user:
$ref: '#/components/schemas/UserResponse'
description: Details of the user who created the appeal
title: User
x-stream-index: "002"
required:
- id
- entity_type
- entity_id
- appeal_reason
- status
- created_at
- updated_at
type: object
AppealRejectedEvent:
description: This event is sent when an appeal is rejected
nullable: true
properties:
appeal:
$ref: '#/components/schemas/AppealItemResponse'
description: The appeal that was rejected
title: Appeal
x-stream-index: "002"
created_at:
format: date-time
type: string
x-stream-index: "001.003"
custom:
additionalProperties: {}
type: object
x-stream-index: "001.007"
received_at:
format: date-time
type: string
x-stream-index: "001.004"
type:
default: appeal.rejected
type: string
x-stream-index: "001.002"
required:
- type
- created_at
- custom
title: AppealRejectedEvent
type: object
x-stream-event-client-type: true
x-stream-event-doc-group: other
x-stream-is-event: true
x-stream-ws-base-event-name: VideoEvent
AsyncBulkImageModerationEvent:
nullable: true
properties:
created_at:
format: date-time
type: string
x-stream-index: "003.003"
custom:
additionalProperties: {}
type: object
x-stream-index: "003.007"
finished_at:
format: date-time
type: string
x-stream-index: "002.003"
received_at:
format: date-time
type: string
x-stream-index: "003.004"
started_at:
format: date-time
type: string
x-stream-index: "002.002"
task_id:
type: string
x-stream-index: "002.001"
type:
default: export.bulk_image_moderation.success
type: string
x-stream-index: "003.002"
url:
type: string
x-stream-index: "001"
required:
- url
- task_id
- started_at
- finished_at
- type
- created_at
- custom
title: AsyncBulkImageModerationEvent
type: object
x-stream-event-client-type: true
x-stream-event-doc-group: other
x-stream-is-event: true
x-stream-ws-base-event-name: VideoEvent
AsyncExportErrorEvent:
nullable: true
properties:
created_at:
format: date-time
type: string
x-stream-index: "003.003"
custom:
additionalProperties: {}
type: object
x-stream-index: "003.007"
error:
type: string
x-stream-index: "001"
finished_at:
format: date-time
type: string
x-stream-index: "002.003"
received_at:
format: date-time
type: string
x-stream-index: "003.004"
started_at:
format: date-time
type: string
x-stream-index: "002.002"
task_id:
type: string
x-stream-index: "002.001"
type:
default: export.bulk_image_moderation.error
type: string
x-stream-index: "003.002"
required:
- error
- task_id
- started_at
- finished_at
- type
- created_at
- custom
title: AsyncExportErrorEvent
type: object
x-stream-event-client-type: true
x-stream-event-doc-group: other
x-stream-is-event: true
x-stream-ws-base-event-name: VideoEvent
AsyncExportModerationLogsEvent:
nullable: true
properties:
created_at:
format: date-time
type: string
x-stream-index: "003.003"
custom:
additionalProperties: {}
type: object
x-stream-index: "003.007"
finished_at:
format: date-time
type: string
x-stream-index: "002.003"
received_at:
format: date-time
type: string
x-stream-index: "003.004"
started_at:
format: date-time
type: string
x-stream-index: "002.002"
task_id:
type: string
x-stream-index: "002.001"
type:
default: export.moderation_logs.success
type: string
x-stream-index: "003.002"
url:
type: string
x-stream-index: "001"
required:
- url
- task_id
- started_at
- finished_at
- type
- created_at
- custom
title: AsyncExportModerationLogsEvent
type: object
x-stream-event-client-type: true
x-stream-event-doc-group: other
x-stream-is-event: true
x-stream-ws-base-event-name: VideoEvent
Attachment:
description: An attachment is a message object that represents a file uploaded
by a user.
nullable: true
properties:
actions:
items:
$ref: '#/components/schemas/Action'
type: array
x-stream-index: "015"
asset_url:
type: string
x-stream-index: "017"
author_icon:
type: string
x-stream-index: "007"
author_link:
type: string
x-stream-index: "006"
author_name:
type: string
x-stream-index: "005"
color:
type: string
x-stream-index: "003"
custom:
additionalProperties: {}
type: object
x-stream-index: "018"
fallback:
type: string
x-stream-index: "002"
fields:
items:
$ref: '#/components/schemas/Field'
type: array
x-stream-index: "016"
footer:
type: string
x-stream-index: "013"
footer_icon:
type: string
x-stream-index: "014"
giphy:
$ref: '#/components/schemas/Images'
x-stream-index: "019"
image_url:
type: string
x-stream-index: "011"
og_scrape_url:
type: string
x-stream-index: "020"
original_height:
format: int32
type: integer
x-stream-index: "022"
original_width:
format: int32
type: integer
x-stream-index: "021"
pretext:
type: string
x-stream-index: "004"
text:
type: string
x-stream-index: "010"
thumb_url:
type: string
x-stream-index: "012"
title:
type: string
x-stream-index: "008"
title_link:
type: string
x-stream-index: "009"
type:
description: Attachment type (e.g. image, video, url)
title: Type
type: string
x-stream-index: "001"
required:
- custom
title: Attachment
type: object
x-stream-docs-page-id: file_uploads
BanInfoResponse:
description: Ban information
nullable: true
properties:
created_at:
description: When the ban was created
format: date-time
title: Created At
type: string
x-stream-index: "006"
created_by:
$ref: '#/components/schemas/UserResponse'
description: User who created the ban
title: Created By
x-stream-index: "005"
expires:
description: When the ban expires
format: date-time
title: Expires
type: string
x-stream-index: "002"
reason:
description: Reason for the ban
title: Reason
type: string
x-stream-index: "003"
shadow:
description: Whether this is a shadow ban
title: Shadow
type: boolean
x-stream-index: "004"
user:
$ref: '#/components/schemas/UserResponse'
description: The banned user
title: User
x-stream-index: "001"
required:
- created_at
title: BanInfo
type: object
BlockListOptions:
properties:
behavior:
description: 'Blocklist behavior. One of: flag, block, shadow_block'
enum:
- flag
- block
- shadow_block
title: Behavior
type: string
x-stream-index: "002"
blocklist:
description: Blocklist name
title: Blocklist
type: string
x-stream-index: "001"
required:
- blocklist
- behavior
type: object
CallResponse:
properties:
backstage:
type: boolean
x-stream-index: "007"
blocked_user_ids:
items:
type: string
type: array
x-stream-index: "009"
captioning:
type: boolean
x-stream-index: "017"
channel_cid:
type: string
x-stream-index: "014"
cid:
type: string
x-stream-index: "001"
created_at:
format: date-time
type: string
x-stream-index: "004"
created_by:
$ref: '#/components/schemas/UserResponse'
x-stream-index: "010"
current_session_id:
type: string
x-stream-index: "006"
custom:
additionalProperties: {}
type: object
x-stream-index: "008"
ended_at:
format: date-time
type: string
x-stream-index: "011"
id:
type: string
x-stream-index: "002"
join_ahead_time_seconds:
format: int32
type: integer
x-stream-index: "019"
recording:
type: boolean
x-stream-index: "015"
routing_number:
type: string
x-stream-index: "020"
starts_at:
format: date-time
type: string
x-stream-index: "012"
team:
type: string
x-stream-index: "013"
transcribing:
type: boolean
x-stream-index: "016"
translating:
type: boolean
x-stream-index: "018"
type:
type: string
x-stream-index: "003"
updated_at:
format: date-time
type: string
x-stream-index: "005"
required:
- cid
- id
- type
- created_at
- updated_at
- current_session_id
- backstage
- custom
- blocked_user_ids
- recording
- transcribing
- captioning
- translating
type: object
ChannelConfigWithInfo:
properties:
allowed_flag_reasons:
items:
type: string
type: array
x-stream-index: 001.002.028
automod:
enum:
- disabled
- simple
- AI
type: string
x-stream-index: 001.002.023
automod_behavior:
enum:
- flag
- block
- shadow_block
type: string
x-stream-index: 001.002.024
automod_thresholds:
$ref: '#/components/schemas/Thresholds'
x-stream-index: 001.002.029
blocklist:
type: string
x-stream-index: 001.002.025
blocklist_behavior:
enum:
- flag
- block
- shadow_block
type: string
x-stream-index: 001.002.026
blocklists:
items:
$ref: '#/components/schemas/BlockListOptions'
type: array
x-stream-index: 001.002.027
chat_preferences:
$ref: '#/components/schemas/ChatPreferences'
x-stream-index: 001.002.034
commands:
items:
$ref: '#/components/schemas/Command'
type: array
x-stream-index: "001.003"
connect_events:
type: boolean
x-stream-index: 001.002.004
count_messages:
type: boolean
x-stream-index: 001.002.020
created_at:
format: date-time
type: string
x-stream-index: 001.001.003
custom_events:
type: boolean
x-stream-index: 001.002.013
delivery_events:
type: boolean
x-stream-index: 001.002.005
grants:
additionalProperties:
items:
type: string
type: array
type: object
x-stream-index: "002"
mark_messages_pending:
type: boolean
x-stream-index: 001.002.016
max_message_length:
format: int32
maximum: 20000
type: integer
x-stream-index: 001.002.022
mutes:
type: boolean
x-stream-index: 001.002.010
name:
type: string
x-stream-index: 001.002.001
partition_size:
format: int32
type: integer
x-stream-index: 001.002.030
partition_ttl:
example: 24h
format: duration
nullable: true
type: string
x-stream-index: 001.002.031
polls:
type: boolean
x-stream-index: 001.002.017
push_level:
enum:
- all
- all_mentions
- mentions
- direct_mentions
- none
type: string
x-stream-index: 001.002.033
push_notifications:
type: boolean
x-stream-index: 001.002.014
quotes:
type: boolean
x-stream-index: 001.002.009
reactions:
type: boolean
x-stream-index: 001.002.007
read_events:
type: boolean
x-stream-index: 001.002.003
reminders:
type: boolean
x-stream-index: 001.002.015
replies:
type: boolean
x-stream-index: 001.002.008
search:
type: boolean
x-stream-index: 001.002.006
shared_locations:
type: boolean
x-stream-index: 001.002.019
skip_last_msg_update_for_system_msgs:
type: boolean
x-stream-index: 001.002.032
typing_events:
type: boolean
x-stream-index: 001.002.002
updated_at:
format: date-time
type: string
x-stream-index: 001.001.004
uploads:
type: boolean
x-stream-index: 001.002.011
url_enrichment:
type: boolean
x-stream-index: 001.002.012
user_message_reminders:
type: boolean
x-stream-index: 001.002.018
required:
- created_at
- updated_at
- name
- typing_events
- read_events
- connect_events
- delivery_events
- search
- reactions
- replies
- quotes
- mutes
- uploads
- url_enrichment
- custom_events
- push_notifications
- reminders
- mark_messages_pending
- polls
- user_message_reminders
- shared_locations
- count_messages
- message_retention
- max_message_length
- automod
- automod_behavior
- skip_last_msg_update_for_system_msgs
- commands
type: object
ChannelMemberResponse:
properties:
channel_role:
type: string
x-stream-index: "001"
notifications_muted:
type: boolean
x-stream-index: "002"
required:
- channel_role
- notifications_muted
type: object
ChannelOwnCapability:
description: All possibility of string to use
enum:
- ban-channel-members
- cast-poll-vote
- connect-events
- create-attachment
- delete-any-message
- delete-channel
- delete-own-message
- delivery-events
- flag-message
- freeze-channel
- join-channel
- leave-channel
- mute-channel
- pin-message
- query-poll-votes
- quote-message
- read-events
- search-messages
- send-custom-events
- send-links
- send-message
- send-poll
- send-reaction
- send-reply
- send-restricted-visibility-message
- send-typing-events
- set-channel-cooldown
- share-location
- skip-slow-mode
- slow-mode
- typing-events
- update-any-message
- update-channel
- update-channel-members
- update-own-message
- update-thread
- upload-file
title: ChannelOwnCapability
type: string
ChannelResponse:
description: Represents channel in chat
properties:
auto_translation_enabled:
description: Whether auto translation is enabled or not
title: Auto translation
type: boolean
x-stream-index: "017"
auto_translation_language:
description: Language to translate to when auto translation is active
title: Auto translation language
type: string
x-stream-index: "018"
blocked:
description: Whether this channel is blocked by current user or not
title: Blocked
type: boolean
x-stream-index: "023"
cid:
description: Channel CID (<type>:<id>)
title: CID
type: string
x-stream-index: "003"
config:
$ref: '#/components/schemas/ChannelConfigWithInfo'
description: Channel configuration
title: ChannelConfigWithInfo
x-stream-index: "013"
cooldown:
description: Cooldown period after sending each message
format: int32
title: Cooldown
type: integer
x-stream-index: "020"
created_at:
description: Date/time of creation
format: date-time
title: Created at
type: string
x-stream-index: "005"
created_by:
$ref: '#/components/schemas/UserResponse'
description: Creator of the channel
title: UserResponse
x-stream-index: "008"
custom:
additionalProperties: {}
description: Custom data for this object
title: Custom data
type: object
x-stream-index: "026"
deleted_at:
description: Date/time of deletion
format: date-time
title: Deleted at
type: string
x-stream-index: "007"
disabled:
type: boolean
x-stream-index: "010"
filter_tags:
description: List of filter tags associated with the channel
items:
type: string
title: Filter tags
type: array
x-stream-index: "028"
frozen:
description: Whether channel is frozen or not
title: Frozen
type: boolean
x-stream-index: "009"
hidden:
description: Whether this channel is hidden by current user or not
title: Hidden
type: boolean
x-stream-index: "022"
hide_messages_before:
description: Date since when the message history is accessible
format: date-time
title: Hide messages before
type: string
x-stream-index: "019"
id:
description: Channel unique ID
title: ID
type: string
x-stream-index: "001"
last_message_at:
description: Date of the last message sent
format: date-time
title: Last message at
type: string
x-stream-index: "004"
member_count:
description: Number of members in the channel
format: int32
title: Member count
type: integer
x-stream-index: "012"
members:
description: List of channel members (max 100)
items:
$ref: '#/components/schemas/ChannelMemberResponse'
title: Channel members
type: array
x-stream-index: "011"
message_count:
description: Number of messages in the channel
format: int64
title: Message count
type: integer
x-stream-index: "027"
mute_expires_at:
description: Date of mute expiration
format: date-time
title: Mute expires at
type: string
x-stream-index: "015"
muted:
description: Whether this channel is muted or not
title: Muted
type: boolean
x-stream-index: "014"
own_capabilities:
description: List of channel capabilities of authenticated user
items:
$ref: '#/components/schemas/ChannelOwnCapability'
title: ChannelOwnCapability
type: array
x-stream-index: "021"
team:
description: Team the channel belongs to (multi-tenant only)
title: Team
type: string
x-stream-index: "016"
truncated_at:
description: Date of the latest truncation of the channel
format: date-time
title: UserResponse
type: string
x-stream-index: "024"
truncated_by:
$ref: '#/components/schemas/UserResponse'
x-stream-index: "025"
type:
description: Type of the channel
title: Type
type: string
x-stream-docs-page-id: channel_features
x-stream-index: "002"
updated_at:
description: Date/time of the last update
format: date-time
title: Updated at
type: string
x-stream-index: "006"
required:
- id
- type
- cid
- created_at
- updated_at
- frozen
- disabled
- custom
title: Channel
type: object
ChatDraftPayloadResponse:
properties:
attachments:
items:
$ref: '#/components/schemas/Attachment'
type: array
x-stream-index: "004"
custom:
additionalProperties: {}
type: object
x-stream-index: "007"
html:
type: string
x-stream-index: "010"
id:
type: string
x-stream-index: "001"
mentioned_users:
items:
$ref: '#/components/schemas/UserResponse'
type: array
x-stream-index: "008"
mml:
type: string
x-stream-index: "003"
parent_id:
type: string
x-stream-index: "005"
poll_id:
type: string
x-stream-index: "013"
quoted_message_id:
type: string
x-stream-index: "009"
show_in_channel:
type: boolean
x-stream-index: "006"
silent:
type: boolean
x-stream-index: "012"
text:
type: string
x-stream-index: "002"
type:
type: string
x-stream-index: "011"
required:
- id
- text
- custom
type: object
ChatDraftResponse:
properties:
channel_cid:
type: string
x-stream-index: "002"
created_at:
format: date-time
type: string
x-stream-index: "006"
message:
$ref: '#/components/schemas/ChatDraftPayloadResponse'
x-stream-index: "001"
parent_id:
type: string
x-stream-index: "003"
parent_message:
$ref: '#/components/schemas/ChatMessageResponse'
x-stream-index: "004"
quoted_message:
$ref: '#/components/schemas/ChatMessageResponse'
x-stream-index: "005"
required:
- message
- channel_cid
- created_at
type: object
ChatMessageResponse:
properties:
attachments:
items:
$ref: '#/components/schemas/Attachment'
type: array
x-stream-index: "009"
cid:
type: string
x-stream-index: "022"
command:
type: string
x-stream-index: "004"
created_at:
format: date-time
ty
# --- truncated at 32 KB (163 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/stream-io/refs/heads/main/openapi/stream-io-moderation-openapi.yml