Reference/moderations

Create Moderation

Create Moderation Project API key or dashboard access token (JWT). Request examples use snake_case; schemas may also display accepted camelCase aliases. Replace resource placeholders with accessible IDs. See the guides for runtime model constraints and workflows.

POST/v1/moderations/text
Open playground
Project API key or dashboard access token (JWT). See authentication.

Authorizations

Project API key or dashboard access token (JWT).

Body (application/json)

inputstringrequired

The input text or list of texts to moderate.

modelstringoptionaldefault: text-moderation-v1

Moderation model identifier (e.g. text-moderation-v1).

featurestringoptionaldefault: generation_prompt

Contextual rule set: 'generation_prompt' (default) or 'text_input'.

customBlockedWordsarrayoptional

Optional list of custom prohibited keywords or brand phrases.

customRegexPatternsarrayoptional

Optional list of custom regex patterns for deterministic blocking.

customInstructionsstringoptional

Optional custom rules or instructions evaluated by the LLM classifier.

Response

200 - application/json
Successful Response
idstringrequired
modelstringrequired
resultsarrayrequired
usageobjectoptional
Request Example
curl --fail-with-body -X POST "https://api.apimarketplace.com/v1/moderations/text" -H "Authorization: Bearer $API_KEY" -H 'Content-Type: application/json' --data '{"input": "Hello from API Marketplace."}'