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

# Quickstart

> Get started with RegPilot in 5 minutes using our step-by-step guide.

## Get Started with RegPilot

This quickstart guide will help you set up your first AI compliance project and make your first API call in under 5 minutes.

<Steps>
  <Step title="Create an account">
    Sign up for a free RegPilot account at [regpilot.dev/signup](https://regpilot.dev/signup).

    You'll need to:

    * Provide your email address
    * Create a company/organization
    * Set up your first project
  </Step>

  <Step title="Generate an API key">
    Navigate to **AI Gateway → Overview** and click "Manage Keys" to create your first API key.

    ```bash theme={null}
    # Your API key will look like this:
    sk_1a2b3c4d5e6f7g8h9i0j...
    ```

    <Warning>
      **Save your API key immediately!** It's only shown once. If you lose it, you'll need to generate a new one.
    </Warning>
  </Step>

  <Step title="Make your first API call">
    Test your setup with a simple chat completion request:

    ```bash theme={null}
    curl -X POST https://regpilot.dev/api/ai/chat \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "messages": [
          {"role": "user", "content": "Hello, test my compliance setup"}
        ]
      }'
    ```

    You should receive a response with compliance validation headers:

    ```json theme={null}
    {
      "response": "Hello! Your compliance setup is working correctly.",
      "headers": {
        "X-Governor-Validated": "true",
        "X-Governor-Risk-Score": "5"
      }
    }
    ```
  </Step>

  <Step title="View your analytics">
    Go to your project dashboard to see:

    * Request analytics and costs
    * Compliance scores
    * Usage statistics
    * Any violations or alerts
  </Step>
</Steps>

## Integration Examples

Choose your preferred language or framework:

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch('https://regpilot.dev/api/ai/chat', {
    method: 'POST',
    headers: {
      'X-API-Key': process.env.REGPILOT_API_KEY,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      messages: [
        { role: 'user', content: 'Hello from Node.js!' }
      ]
    })
  });

  const data = await response.json();
  console.log(data);
  ```

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

  response = requests.post(
      'https://regpilot.dev/api/ai/chat',
      headers={
          'X-API-Key': os.environ['REGPILOT_API_KEY'],
          'Content-Type': 'application/json'
      },
      json={
          'messages': [
              {'role': 'user', 'content': 'Hello from Python!'}
          ]
      }
  )

  print(response.json())
  ```

  ```typescript Next.js theme={null}
  export default async function handler(req, res) {
    const response = await fetch('https://regpilot.dev/api/ai/chat', {
      method: 'POST',
      headers: {
        'X-API-Key': process.env.REGPILOT_API_KEY!,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        messages: [{ role: 'user', content: req.body.message }],
      }),
    });
    
    const data = await response.json();
    res.status(200).json(data);
  }
  ```
</CodeGroup>

## Enable Governor (Optional)

Upgrade to Governor for advanced compliance validation:

<Steps>
  <Step title="Enable Governor">
    Navigate to **AI Gateway → Governor** and toggle on the Governor feature.
  </Step>

  <Step title="Configure settings">
    Set your compliance preferences:

    * **Strict Mode**: Block high-risk content automatically
    * **Auto-approve Threshold**: Set risk tolerance (0-100)
    * **Custom Rules**: Add project-specific compliance rules
  </Step>

  <Step title="Test validation">
    Send a test request to see Governor in action:

    ```bash theme={null}
    curl -X POST https://regpilot.dev/api/ai/chat \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "messages": [
          {"role": "user", "content": "Process this customer refund denial"}
        ],
        "governorMetadata": {
          "actionType": "refund_denial",
          "recipientCountry": "DE"
        }
      }'
    ```
  </Step>
</Steps>

## Next Steps

Now that you're set up, explore these features:

<CardGroup cols={2}>
  <Card title="Register AI Models" icon="microchip" href="/features/models-registry">
    Add your AI models to the compliance registry
  </Card>

  <Card title="Set Up Alerts" icon="bell" href="/features/alerts">
    Configure real-time compliance alerts
  </Card>

  <Card title="Create Policies" icon="shield" href="/features/policies">
    Define custom compliance policies
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Explore the full API documentation
  </Card>
</CardGroup>

## Common Issues

<AccordionGroup>
  <Accordion title="401 Unauthorized Error" icon="lock">
    **Problem**: Your API key is invalid or inactive.

    **Solution**:

    * Verify your API key is correct
    * Check that the key is active in AI Gateway → Overview
    * Ensure you're using the header `X-API-Key` (not `Authorization`)
  </Accordion>

  <Accordion title="No Response from API" icon="network-wired">
    **Problem**: Request times out or fails.

    **Solution**:

    * Check your internet connection
    * Verify the endpoint URL is correct: `https://regpilot.dev/api/ai/chat`
    * Check RegPilot status page for any outages
  </Accordion>

  <Accordion title="High Risk Score" icon="triangle-exclamation">
    **Problem**: Governor is blocking your requests.

    **Solution**:

    * Review the violation details in the response
    * Adjust your auto-approve threshold in Governor settings
    * Review and modify your content to meet compliance requirements
  </Accordion>
</AccordionGroup>

<Note>
  **Need help?** Contact us at [support@regpilot.com](mailto:support@regpilot.com) or visit our [community forum](https://github.com/regpilot/regpilot/discussions).
</Note>
