InsionInsion
Python

Moderate a record

Persist a record and return its moderation result immediately

result = client.moderate_a_record(
    client_id="post-123",
    name="A post",
    entity="post",
    content="Hello world",
    metadata={"source": "community"},
)

client_id, name, entity, and content are required. content accepts a string or ContentExternalUrls(text="...", image_urls=[...], external_urls=[...]). You can also pass client_url, metadata, and user.

Set passthrough=True to moderate without persisting the record or user content. The returned ModerateResponse includes the record ID, moderation status, moderation ID, and matched category IDs.

Use this method when the application needs a decision before it continues. For asynchronous moderation, use Ingest a record.