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

# Apps & APIs

> Add PII and secrets protection to apps and SDKs that call AI providers

Use this path for apps, SDKs, internal AI products, customer-facing AI features, and automation that calls model providers through HTTP APIs.

Point the app to PasteGuard instead of the provider directly. PasteGuard masks PII and secrets, forwards the request, and restores supported placeholders in the response.

## OpenAI SDK

<CodeGroup>
  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      base_url="http://localhost:3000/openai/v1"
  )
  ```

  ```javascript JavaScript theme={null}
  import OpenAI from 'openai';

  const client = new OpenAI({
    baseURL: 'http://localhost:3000/openai/v1'
  });
  ```
</CodeGroup>

## Anthropic SDK

<CodeGroup>
  ```python Python theme={null}
  from anthropic import Anthropic

  client = Anthropic(
      base_url="http://localhost:3000/anthropic"
  )
  ```

  ```javascript JavaScript theme={null}
  import Anthropic from '@anthropic-ai/sdk';

  const client = new Anthropic({
    baseURL: 'http://localhost:3000/anthropic'
  });
  ```
</CodeGroup>

## Self-Hosted App Examples

Self-hosted products such as Open WebUI and LibreChat can also use PasteGuard as their OpenAI-compatible endpoint.

<Card title="Open WebUI and LibreChat" icon="table-columns" href="/use-cases/apps">
  Example configuration for self-hosted chat products
</Card>

## LangChain

```python theme={null}
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    base_url="http://localhost:3000/openai/v1"
)
```

## LlamaIndex

```python theme={null}
from llama_index.llms.openai_like import OpenAILike

llm = OpenAILike(
    api_base="http://localhost:3000/openai/v1",
    model="gpt-5.2",
    is_chat_model=True
)
```

## When To Use This Path

Use this path when you are building or operating the app:

* Internal support, legal, finance, or operations apps
* Customer-facing AI features that may process user data
* Self-hosted AI interfaces for teams
* Regulated teams that need a local or self-hosted control point before requests reach a provider
