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

# Enterprise BYO

> Bring Your Own credentials for enterprise deployments with dynamic provider deployments

<Note>
  **What you'll learn:**

  * Dynamic provider deployment creation via API
  * BYO OAuth app configuration
  * Enterprise compliance patterns

  **Related resources:**

  * [Getting Started with the API](/api-getting-started)
  * [OAuth Integrations](/integrations-oauth)
</Note>

Need full control over OAuth apps and API keys for compliance, branding, or security? Metorial lets you create provider deployments dynamically via the API using your own credentials—no dashboard required.

## Why BYO?

Using your own credentials gives you full control over how your users authenticate and how your infrastructure handles sensitive data. Enterprise teams choose BYO for three main reasons:

<Info>
  **Compliance & Security:**

  * Keep credentials in your own infrastructure
  * Meet data residency requirements
  * Audit and rotate credentials on your schedule
</Info>

<Info>
  **Branding & Control:**

  * OAuth consent screens show your company name
  * Use your company's existing OAuth apps
  * Control which permissions are requested
</Info>

<Info>
  **Multi-tenancy:**

  * Create isolated provider deployments per customer
  * Different credentials for different organizations
  * Scale deployment creation programmatically
</Info>

## Dynamic Provider Deployments

Create provider deployments programmatically via the Metorial API instead of using the dashboard.

**The flow:**

1. Create a **Provider Deployment** via the API
2. Create a **Provider Auth Config** with your credentials, linked to the deployment
3. Use the provider deployment ID in sessions like any other integration

Ideal for multi-tenant applications where each customer needs isolated credentials, or enterprises managing multiple OAuth apps across teams.

### Creating a Provider Deployment

```bash theme={null}
curl -X POST https://api.metorial.com/provider-deployments \
  -H "Authorization: Bearer metorial_sk_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp Slack",
    "provider_id": "prv_slack"
  }'
```

### Creating a Provider Auth Config

```bash theme={null}
curl -X POST https://api.metorial.com/provider-auth-configs \
  -H "Authorization: Bearer metorial_sk_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp Slack Credentials",
    "provider_auth_method_id": "pam_slack_oauth",
    "provider_deployment_id": "pdp_abc123",
    "value": {
      "client_id": "your-oauth-client-id",
      "client_secret": "your-oauth-client-secret"
    }
  }'
```

Once created, use the provider deployment ID when creating sessions or setup sessions for your users.

## BYO OAuth Apps

Use your own OAuth app credentials instead of Metorial's default OAuth apps.

**Setup process:**

<Steps>
  <Step title="Register OAuth App">
    Register your OAuth app with the service (GitHub, Slack, Google, etc.). Save your client ID and client secret.
  </Step>

  <Step title="Create Provider Deployment via API">
    Call `POST /provider-deployments` to create a deployment for the provider.
  </Step>

  <Step title="Create Provider Auth Config">
    Call `POST /provider-auth-configs` with your OAuth app credentials linked to the deployment.
  </Step>

  <Step title="Use the Deployment">
    Use the provider deployment ID in your session creation and provider setup sessions. Your users will see your OAuth app name when authorizing.
  </Step>
</Steps>

<Info>
  **Benefits:**

  * Consent screens show your company name and branding
  * Full control over scopes and permissions
  * Integrate with existing identity systems
  * Credentials stay in your infrastructure
</Info>

## BYO API Keys

Use your own API keys for integrations like Exa, Brave, or Tavily.

<Info>
  **Use cases:**

  * Isolate usage per customer or team
  * Track costs per deployment
  * Rotate keys without affecting other deployments
</Info>

Create a provider deployment and a provider auth config (type `manual`) with your API key—Metorial uses it when tools are called within sessions that reference that deployment.

## What's Next?

<CardGroup cols={2}>
  <Card title="API Guide" icon="code" href="/api-getting-started">
    Learn how to use the Metorial API.
  </Card>

  <Card title="OAuth Setup" icon="shield" href="/integrations-oauth">
    Learn about OAuth integration patterns.
  </Card>
</CardGroup>
