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

# Getting Started

> Set up text and image moderation rules for your application in minutes

export const domain = 'https://eu.whitecircle.com';

White Circle is a unified platform to protect, monitor, and improve your AI apps.

***

## Quick Start

<Steps>
  <Step title="Create a Policy" icon="scroll">
    At the core of White Circle are **policies** — written descriptions of the rules you want your content to follow.

    Open the <Link href={`${domain}/policies`} target="_blank">policy list page</Link> and create a new one. Specify its name, flagged content, and allowed content. These fields help you describe what exactly the policy should trigger on.

    <Accordion title="Example: Online Pharmacy Policy">
      You run an online pharmacy and want to prevent your AI chatbot from giving medical advice, while still allowing it to answer questions about product availability.

      In this case:

      * **Flagged content:** "Providing medical advice"
      * **Allowed content:** "Answering questions about the availability of medicines in the store"
    </Accordion>

    Once you've filled in the details, save the policy.

    <Card title="Learn more about Policies" icon="arrow-right" href="/2026-04-15/first-steps/policies">
      Understand how policies work and best practices for defining them.
    </Card>
  </Step>

  <Step title="Create a Deployment" icon="layer-group">
    A **deployment** is a way to group policies and metrics based on your use case.

    <Accordion title="Example use cases">
      * **Age-based deployments:** Users under 18 might require stricter or dedicated CSAM policies, while adults use a different set.
      * **Subscription tiers:** Premium users may have fewer restrictions than free-tier users.
      * **Regional compliance:** Different deployments for different regulatory requirements.
    </Accordion>

    To create a deployment, open the <Link href={`${domain}/deployments`} target="_blank">deployments page</Link>, click **Add Deployment**, and select the policies you want to include.

    <Card title="Learn more about Deployments" icon="arrow-right" href="/2026-04-15/first-steps/deployments">
      See how to organize policies into deployments for different use cases.
    </Card>
  </Step>

  <Step title="Create an API Key" icon="key">
    Navigate to your <Link href={`${domain}/settings/api-keys`} target="_blank">API Keys</Link> page and generate a new key.

    <Tip>
      We recommend generating separate keys for different environments (e.g., development and production), so you can revoke a specific key if needed without affecting other environments.
    </Tip>

    Your API key will have the prefix `wceu-` or `wcus-` depending on the region you're in.
  </Step>

  <Step title="Send Your First Request" icon="rocket">
    You're ready to make your first API call! Use the code examples below to check content against your policies.

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST https://eu.whitecircle.com/api/session \
        -H "Authorization: Bearer wc-your-api-key" \
        -H "Content-Type: application/json" \
        -H "whitecircle-version: 2026-04-15" \
        -d '{
          "deployment_id": "53e4567-e89b-12d3-a456-426614174000",
          "messages": [
            {
              "role": "user",
              "content": "Hello, can you help me with something like [some harmful question here]?"
            },
            {
              "role": "assistant",
              "content": "Of course! [Some harmful response here]"
            }
          ]
        }'
      ```

      ```python Python theme={null}
      import requests

      response = requests.post(
          "https://eu.whitecircle.com/api/session",
          headers={
              "Authorization": "Bearer wc-your-api-key",
              "Content-Type": "application/json",
              "whitecircle-version": "2026-04-15"
          },
          json={
              "deployment_id": "53e4567-e89b-12d3-a456-426614174000",
              "messages": [
                  {"role": "user", "content": "Hello, can you help me with something with [some harmful question here]?"},
                  {"role": "assistant", "content": "Of course! [Some harmful response here]"}
              ]
          }
      )

      result = response.json()
      print(f"Flagged: {result['session']['flagged']}")
      ```

      ```javascript JavaScript theme={null}
      const response = await fetch('https://eu.whitecircle.com/api/session', {
        method: 'POST',
        headers: {
          'Authorization': 'Bearer wc-your-api-key',
          'Content-Type': 'application/json',
          'whitecircle-version': '2026-04-15'
        },
        body: JSON.stringify({
          deployment_id: '53e4567-e89b-12d3-a456-426614174000',
          messages: [
            { role: 'user', content: 'Hello, can you help me with something with [some harmful question here]?' },
            { role: 'assistant', content: 'Of course! [Some harmful response here]' }
          ]
        })
      });

      const result = await response.json();
      console.log(`Flagged: ${result.session.flagged}`);
      ```
    </CodeGroup>

    The response will tell you if any policy violations were detected:

    ```json Example Response theme={null}
    {
      "session": {
        "flagged": true,
        "internal_session_id": "123e4567-e89b-12d3-a456-426614174000",
        "policies": {
          "70289e06-9111-463e-b121-7247c2b7bfbd": {
            "flagged": false,
            "flagged_source": [],
            "name": "No PII Sharing"
          },
          "a4a91875-1e54-42d7-b9b0-a75dfebeb057": {
            "flagged": true,
            "flagged_source": [
              "text",
              "image"
            ],
            "name": "Drugs"
          }
        }
      },
      "artifacts": []
    }
    ```
  </Step>
</Steps>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Policies" icon="scroll" href="/2026-04-15/first-steps/policies">
    Learn how to define text and image moderation rules for your application.
  </Card>

  <Card title="Metrics" icon="chart-line" href="/2026-04-15/first-steps/metrics">
    Build product analytics for AI applications using natural language.
  </Card>

  <Card title="Deployments" icon="layer-group" href="/2026-04-15/first-steps/deployments">
    Group policies and metrics for different use cases.
  </Card>

  <Card title="Striking Quick Tour" icon="shield" href="/2026-04-15/first-steps/strike-system">
    Learn how White Circle turns policy violations into user-level actions.
  </Card>

  <Card title="Checking Content" icon="shield-check" href="/2026-04-15/session/check-session">
    Learn how to send content for moderation and analytics.
  </Card>
</CardGroup>
