Skip to main content
Moderate content and receive the raw HTTP response. Use this when you need access to HTTP headers, status codes, or other low-level response details.

Arguments

NameTypeDefaultRequiredDescription
modelTEXT-The moderation model to use (e.g., text-moderation-latest, text-moderation-stable)
input_textTEXT-The text content to analyze
api_keyTEXTNULLOpenAI API key. If not provided, uses ai.openai_api_key setting
api_key_nameTEXTNULLName of the secret containing the API key
extra_headersJSONBNULLAdditional HTTP headers to include in the API request
extra_queryJSONBNULLAdditional query parameters for the API request
verboseBOOLEANFALSEEnable verbose logging for debugging
client_configJSONBNULLAdvanced client configuration options

Returns

JSONB: The complete HTTP response including headers and body.