> ## Documentation Index
> Fetch the complete documentation index at: https://docs.creem.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Screen a prompt

> Evaluate a text prompt against content policies before generation. This endpoint is experimental and may change.



## OpenAPI

````yaml post /v1/moderation/prompt
openapi: 3.0.0
info:
  title: Creem API
  description: >-
    Creem is an all-in-one platform for managing subscriptions and recurring
    revenue, tailored specifically for today's SaaS companies. It enables you to
    boost revenue, enhance customer retention, and scale your operations
    seamlessly.
  version: v1
  contact:
    name: Creem Support
    url: https://creem.io
    email: support@creem.io
  license:
    name: Commercial
    url: https://creem.io/terms
  termsOfService: https://creem.io/terms
servers:
  - url: https://api.creem.io
    description: Production — live API for processing real transactions and data.
    x-speakeasy-server-id: prod
  - url: https://test-api.creem.io
    description: Test — sandbox API for development and testing with no real charges.
    x-speakeasy-server-id: test
security: []
tags: []
externalDocs:
  description: Creem Documentation
  url: https://docs.creem.io
paths:
  /v1/moderation/prompt:
    post:
      tags:
        - Moderation
      summary: Screen a prompt
      description: >-
        Evaluate a text prompt against content policies before generation. This
        endpoint is experimental and may change.
      operationId: screenPrompt
      parameters: []
      requestBody:
        required: true
        description: Prompt screening request payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScreenPromptRequest'
      responses:
        '200':
          description: Prompt screening result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScreenPromptResponse'
        '400':
          description: Bad Request - Invalid input parameters
        '401':
          description: Unauthorized - Invalid or missing API key
        '404':
          description: Not Found - Resource does not exist
      security:
        - ApiKey: []
components:
  schemas:
    ScreenPromptRequest:
      type: object
      properties:
        prompt:
          type: string
          description: The text prompt to evaluate against content policies.
        external_id:
          type: string
          description: An optional identifier to associate this request with.
      required:
        - prompt
    ScreenPromptResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the moderation result.
        object:
          type: string
          description: Object type.
          example: moderation_result
        prompt:
          type: string
          description: The prompt that was screened.
        external_id:
          type: string
          description: The external identifier provided in the request.
        decision:
          type: string
          description: The moderation decision.
          enum:
            - allow
            - deny
            - flag
        usage:
          description: Usage information for this call.
          allOf:
            - $ref: '#/components/schemas/UsageEntity'
      required:
        - id
        - object
        - prompt
        - decision
        - usage
    UsageEntity:
      type: object
      properties:
        units:
          type: number
          description: Number of units consumed by this call.
      required:
        - units
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. You can find your API key in the Creem
        dashboard under Settings > API Keys.

````