Skip to main content
POST
/
v1
/
moderation
/
prompt
Screen a prompt
curl --request POST \
  --url https://api.creem.io/v1/moderation/prompt \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "prompt": "<string>",
  "external_id": "<string>"
}
'
{
  "id": "<string>",
  "object": "moderation_result",
  "prompt": "<string>",
  "decision": "allow",
  "usage": {
    "units": 123
  },
  "external_id": "<string>"
}

Authorizations

x-api-key
string
header
required

API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.

Body

application/json

Prompt screening request payload

prompt
string
required

The text prompt to evaluate against content policies.

external_id
string

An optional identifier to associate this request with.

Response

Prompt screening result

id
string
required

Unique identifier for the moderation result.

object
string
required

Object type.

Example:

"moderation_result"

prompt
string
required

The prompt that was screened.

decision
enum<string>
required

The moderation decision.

Available options:
allow,
deny,
flag
usage
object
required

Usage information for this call.

external_id
string

The external identifier provided in the request.